Changelog

Release notes for quimb.

v1.16.0 (unreleased)

Breaking changes

Decomposition and compression defaults

  • array_split and low-level rank-revealing decompositions now default to cutoff_mode="rel" instead of "rsum2". 1D zipup compression also defaults to "rel".

  • Randomized SVD and batched decompositions reject active cumulative cutoff modes. Use "abs" or "rel" instead.

  • tensor_network_1d_compress with an arbitrary-geometry method always returns a 1D network, inserting identities along long-range bonds. To keep the geometry, call tensor_network_ag_compress directly, as 2D boundary contraction now does for periodic boundaries, which therefore need an ag method.

Hilbert spaces and Hubbard models

  • HilbertSpace: site ordering is now immutable. set_ordering raises TypeError. Use with_ordering to create a space with a different ordering.

  • fermi_hubbard_from_edges: default to order="interleaved", alternating spins at each coordinate to avoid MPO bond dimensions growing with system size, with slightly slower matrix-vector products. Rebuild anything keyed by rank or flat configuration. Use order="blocked" for the old layout.

Partial traces and local expectations

Enhancements

Tensor decompositions

  • Split functions accept cutoff="auto": 1e-10 for exact decompositions, disabled for randomized SVD.

  • svd_rand_truncated: support "abs" and "rel" cutoffs on the sketched spectrum, and noise_dist="normal" or "rademacher" for the random sketch.

  • Batched "abs" and "rel" cutoffs treat blocks as one spectrum and retain a common bond dimension. Both modes support renormalization, including for batched decompositions.

1D compression and MPS

  • Add a 1D compression guide with method comparisons, benchmarks, and usage examples.

  • Add successive deterministic compression (method="sdc"), sdc-oversample, and randomized variants sdcr and sdcr-oversample, supporting fermionic networks, based on https://arxiv.org/abs/2601.19650.

  • direct, dm, zipup, sdc, sdcr, src, srcmps, fit, and their oversampling variants handle long-range bonds directly, supporting symmray abelian and fermionic tensors (for srcmps and fit, with a supplied tn_fit).

  • dm uses QR-SVD when a site’s density matrix would exceed its rank bound, reducing layered PEPS norm boundary contraction costs (https://arxiv.org/abs/2406.09769), including for fermionic networks.

  • src, srcmps, fit, and their oversampling variants accept a seed or random generator and match the backend’s device and dtype (autoray v0.10.0 or newer). By default, use the backend’s global random state.

  • tensor_network_1d_compress defaults to cutoff="auto", choosing the cutoff for each method: 0.0 for src and srcmps, disabled for sdcr with its default randomized SVD, and 1e-10 otherwise.

  • zipup, sdc, and sdcr oversampling accept cutoff_mode_oversample. Zipup also accepts cutoff_oversample="auto". All 1D oversampling methods accept compress_opts_final to configure the final direct sweep separately.

  • fit with bsz=1 now supports fermionic tensor networks, including odd-parity tensors.

  • Add MatrixProductState.from_product, also used by MPS_product_state, with support for block-sparse single-site vectors.

  • Compression functions accept tag groups in site_tags; see parse_site_tag_groups. The 1D, 2D, and arbitrary-geometry wrappers also accept custom method callables.

Partial traces, environments, and 2D contraction

Gates and circuits

Time evolution and run management

  • Add LocalHamGen.get_trotter_gates for first-, second-, and fourth-order Trotter approximations over multiple steps, inherited by 1D, 2D, and 3D Hamiltonians. TrotterGate objects unpack as U, where. Consecutive uses of the same commuting layer are fused by default. trotter_schedule returns the product formula alone.

  • build_mpo_propagator_trotterized and build_pepo_propagator_trotterized accept order (default 1). The 1D method also gains ordering, matching the 2D method.

  • TEBD and simple-update classes accept logdir and log_every to write progress.json. Use plot_progress_log with watch=True to monitor a running job, or load_progress_log for raw data.

  • These classes accept checkpoint_every to save checkpoint.pkl in logdir, including a final checkpoint on normal or graceful completion. Continue with resume=True or load with from_checkpoint; resumed runs restore state and evolution options, so omit psi0 and ham.

  • log_every and checkpoint_every accept sweep counts or durations such as "10mins"; see parse_time_spec.

  • A STOP file in logdir or the first Ctrl-C during evolve stops the run after the current sweep. The file is removed once seen; a second interrupt stops immediately. Use graceful_interrupt=False for the previous interrupt behavior.

Belief propagation and loop expansions

  • Support fermionic BP projector compression with method="projector", canonize="bp" and fermionic gates with D2BP.gate_.

  • All BP classes accept diis and damping in both __init__ and run. Values passed to run become the new defaults.

  • D1BP, D2BP, L1BP, L2BP, and TensorNetwork.gauge_all_simple accept sweep_order, with an efficient alternating schedule for trees. See SweepScheduler for other options.

  • Add gen_gloops_edge_induced (tn.gen_gloops_edge_induced), yielding NetworkPatch objects that distinguish loops using different bonds on the same tensors.

  • Infinite 2D generalized-loop expectations accept max_size and num_joins. Reuse their info cache across loop settings while the state, gauges, and operators remain unchanged.

Network construction

Hilbert spaces and utilities

  • HilbertSpace: support U1U1 sectors with any site ordering and a species argument selecting each site’s conserved charge. Accept sector forms {species: filling}, (ka, kb), and ((na, ka), (nb, kb)). order="blocked" groups species; "interleaved" alternates them at each position.

  • Add distance_from_overlaps for normalized distances and infidelities from three precomputed overlaps.

  • save_to_disk: add atomic to prevent partially written targets.

Deprecations

  • Tensor.gate: rename transposed to transpose. The old name raises FutureWarning.

  • 2D boundary contraction, environment, and norm methods: rename mode to method, with FutureWarning for the old name. With mode="full-bond", a method supplied as well is taken as similarity_method.

  • MatrixProductState.compute_local_expectation: rename method to route, with FutureWarning for the old name.

  • Rename MatrixProductState.partial_trace_to_dense_canonical to partial_trace_canonical. The old name still works but raises a warning.

  • TN_from_strings: deprecate join_avoid_self_loops in favor of join_avoid_loop_length.

Bug fixes

Sparse matrices

  • csr_matrix @ vector: fix wrong results for tall matrices and segfaults for wide matrices on the parallel path, used for nnz > 50000 once quimb is imported (GH #432).

Operators and time evolution

  • SpinHam1D.build_sparse: include the last term with cyclic=True (GH #419).

  • ikron: raise ValueError for out-of-range or repeated indices, which previously placed fewer operators than supplied without an error.

  • build_matrix_ikron: fix incorrect matrices with non-identity ordering or non-integer site labels.

  • HilbertSpace: prevent incorrect rank-to-configuration mappings after reordering, including invalid configurations for mixed dimensions. Ordering is now immutable, as described above.

  • TEBD: fix order=4 to achieve fourth-order accuracy. Correct Suzuki weights include backward evolution during part of each step. Also accept order=1.

  • build_mpo_propagator_trotterized: fix cyclic wrapping terms that are not symmetric under a site swap.

  • FullUpdate: reuse the cached plaquette map in compute_energy.

Decompositions and compression

  • compute_oblique_projectors: avoid inf or nan projectors for rank-deficient environments with cutoff=0.0. The same fix applies to shared diagonal division helpers and D2BP.gauge_insert with return_gauges="inverse".

  • safe_inverse: fix TypeError in projector boundary contractions with block-sparse backends such as symmray.

  • tensor_split: fix method="svd:rand" for complex and single-precision arrays, preserving dtype and device, and method="svd:eig" with nonzero cutoff for single precision and Numba.

  • Oblique projector compression, including L2BP.compress, CTMRG, and HOTRG: fix shape-mismatch errors with symmray block-sparse arrays.

  • 3D boundary contraction: remove temporary site tags from replaced tensors, including those shared with cached environments.

  • 1D fit with max_iterations=1: build any initial guess at max_bond rather than padding a smaller one, and fix a TypeError when only cutoff is given.

  • 1D srcmps: conjugate the sampling MPS, so a supplied guess helps for complex arrays, and odd-parity fermionic networks work.

Fermionic tensors

  • 1D compression: fix fit for fermionic networks, and dm for mixed bond orientations and truncated odd-parity norm networks.

  • Projector compression (method="projector"): fix zero projectors for odd-parity fermionic norm networks with every canonize option.

  • D2BP.compress and D2BP.gauge_symmetric: preserve positive messages and full-rank identity matrices for fermionic networks.

  • Tensor.conj: add output_inds to select output legs for fermionic conjugation phases. Fix conjugation phases for subnetworks and paired and unpaired odd-parity dummy modes in TensorNetwork.conj and Tensor.conj.

Belief propagation and overlaps

Partial traces and general tensor operations

v1.15.0 (2026-08-10)

Breaking changes (1.15.0)

Circuits

  • Circuit.uni: return the non-transposed unitary, so circ.uni.to_dense() gives U acting as U @ psi. Use circ.get_uni(transposed=True) for the old convention.

  • Non-exact circuit simulators now inherit CircuitBase rather than Circuit. Use isinstance(circ, CircuitBase) for any circuit type. Exact-only methods such as get_uni, get_psi_simplified, and sample_gate_by_gate are no longer available on these simulators.

  • MPS circuit methods operate directly on the current, possibly compressed state and no longer accept simplify_* options. Unsupported representation-specific methods raise NotImplementedError consistently.

Gauging and loop expansions

  • TensorNetwork.gauge_all_simple: arguments after max_iterations and tol, including smudge, power, and damping, are keyword-only.

  • Simple-update gauging: smudge and gauge_smudge are relative to the largest gauge value. Results change for unnormalized gauges, but remain unchanged when max(g) == 1.

  • Automatic generalized-loop sizing (max_size=None in tn.gen_gloops, or gloops=None in loop expansions) covers every target tensor or site that belongs to a loop. Targets outside loops are ignored, with UserWarning for explicit targets or trees with no loops. Loops larger than the resolved size are excluded. Use max_size="min" or gloops="min" for the old behavior.

Enhancements (1.15.0)

Circuit simulators and OpenQASM

  • Add CircuitPEPSSimpleUpdate for arbitrary-geometry PEPS circuits with nearest-neighbor simple-update gates and cluster expectations. Define geometry with edges or infer it from gates or psi0; control accuracy with max_bond and gauge equilibration with equilibrate.

  • Add CircuitPEPOSimpleUpdate, a Heisenberg-picture simulator using backward PEPO evolution with simple-update compression and reverse-light-cone filtering. Use get_evolved_operator for the evolved observable or local_expectation for its |00...0> expectation.

  • Add CircuitBase, the shared base for all circuit simulators. Its from_* constructors accept representation-specific options.

  • Add CircuitMPSLazy for deferred gate evaluation and periodic compression, which can be more efficient for long-range gates with src compression. MPS simulators also gain compute_marginal and sample_chaotic.

  • Add OpenQASM 3 parsing through from_openqasm3_str, from_openqasm3_file, and from_openqasm3_url, supporting custom gates, register broadcasting, and symbolic input tracking.

  • CircuitDense: support controlled gates through controls= without building the full dense operator.

Infinite 2D tensor networks

  • Add quimb.tensor.tn2dinf for infinite-PEPS ground states: GeometryInfinite2D defines the unit cell, PEPSInfinite2D stores the state, LocalHamInfinite2D defines the Hamiltonian, and SimpleUpdateInfinite2D performs imaginary-time simple update. Support dense, Abelian-symmetric, and fermionic symmray backends, with cluster (max_distance) or generalized-loop (gloops) expectations. Hamiltonians can include longer-range terms than the state geometry.

  • Add GeometryInfinite2D.square for square-lattice unit cells. Set neighbor range with couplings (neighbor shells or displacement vectors) or radius.

Gates, gauges, and lattice bonds

Belief propagation: gauging and loop expansions

Norms, decompositions, and backend conversion

Bug fixes (1.15.0)

Circuits

  • CircuitDense: fix ValueError in psi, partial_trace, and local_expectation. get_uni raises the same clear ValueError as uni because the dense state cannot provide the unitary.

  • CircuitPermMPS: return amplitude, to_dense, and local_expectation results in logical qubit order after lazy permutations.

  • CircuitPermMPS and CircuitMPSLazy: preserve subclass attributes in copy() (GH #387).

  • CircuitMPSLazy: apply pending gates and configured compression before state accessors run. Results no longer depend on accessor order (GH #387).

  • CircuitMPS and subclasses: raise NotImplementedError for unsupported schrodinger_contract instead of an internal IndexError (GH #387).

  • Circuit.get_rdm_lightcone_simplified: prevent partial_trace and local_expectation from returning results cached before later gates were applied (GH #398).

Belief propagation: messages and loop corrections

Compression, lattice boundaries, and norms

Internal (1.15.0)

  • Convert quimb.tensor.circuit from a module to a package, preserving public imports and existing pickles.

Documentation (1.15.0)

  • Sphinx AutoAPI documents each object only where it is defined. Support short suffix links such as Tensor.

v1.14.0 (2026-05-10)

Breaking Changes

Enhancements:

  • D2BP: support fermionic tensor networks (only computing norm^2 so far, gating/compression need work).

  • tensor_compress_bond: add reduce_opts for controlling the decomposition options used when reducing each tensor before the main truncating decomposition. For example reduce_opts={"method": "qr:cholesky"}.

  • add TensorNetworkGen.select_sites as a convenience method for selecting a sub network given a list of sites.

  • add PEPO_product_operator for bond-dimension-1 PEPOs given by a product of on-site operators, including cyclic boundary conditions via cyclic=True or cyclic=(cyclic_x, cyclic_y).

  • PEPO: accept explicit cyclic kwarg in the constructor, to override shape-based boundary-condition inference (required for bond dimension 1 cyclic PEPOs).

  • TensorNetworkGenOperator: add generic apply (dispatching on operator/vector tensor networks), trace and partial_transpose methods. These now work for arbitrary geometry operator tensor networks (including MPO and PEPO); partial_transpose supports arbitrary hashable site labels. apply also gains an inplace option that propagates to the acting operator rather than the one being acted on.

  • add TensorNetworkGen.has_site to test whether an object is a valid site label of a tensor network. The generic implementation checks membership in the site set; 1D, 2D and 3D tensor networks override it with a fast bounds check.

  • add LocalHam2D.build_pepo_propagator_trotterized for a first-order Trotter decomposition of expm(x H) as a PEPO. Accepts an ordering argument to control the order in which terms are applied.

  • TensorNetwork.split_simplify: consider all candidate bipartitions for each tensor and accept the one that minimizes the resulting maximum tensor size, rather than the first reduction found.

  • contract_hotrg, coarse_grain_hotrg, their 3D counterparts, and tensor_network_ag_compress_projector: add gauge_power parameter to control the power applied to the bond gauge weights when canonize=True before computing the compressed projectors.

  • RegionGraph: add get_maximal_regions, get_minimal_regions, and get_maximal_ancestors helpers for querying the region hierarchy.

Drawing and schematic updates:

  • Drawing: add orthographic projection mode alongside the existing axonometric projection via the new projection parameter (replaces a/b). Named presets include "orthographic", "axonometric", and "isometric".

  • Drawing.translate: new context manager to temporarily offset all draw operations in coordinate space (before projection).

  • Drawing.translate_screen: new context manager to temporarily offset all draw operations in screen space (after projection).

  • Drawing.grid3d: automatically select back-facing planes based on projection so grids always appear behind the scene, use readable tick label orientations for all projections, and place axis labels correctly.

Bug fixes:

  • CircuitPermMPS.sample: fix output bitstring ordering when the internal MPS qubit order is permuted (GH #327).

  • TensorNetwork.split_tensor: fix handling of absorb=None, adding all tensors returned by the split (GH #260).

  • D2BP.gate_: correctly mark touched tensors and rebuild local contraction expressions after applying gates.

  • contract_hotrg and 3D counterpart: fix bug when specifying strip_exponent in final_contract_opts.

v1.13.0 (2026-03-19)

Breaking Changes

  • ham_hubbard_hardcore fix description and sign convention of hopping strength t.

  • heisenberg_from_edges fix sign convention of magnetic field terms.

  • the quimb.tensor submodule structure has been refactored with tn1d, tn2d, tn3d, and tnag submodules for better organization. Imports from old locations will still work, but are deprecated. Public classes and functions such as MatrixProductState are directly accessible from the top level quimb.tensor module as before.

Enhancements:

Major updates to splitting/decomposing individual tensors/arrays:

  • add array_split and array_svals as the primary array-level entry points for matrix decomposition, consolidating dispatch logic that was previously internal to tensor_core.

  • add register_split_driver and register_svals_driver decorators for registering custom matrix decomposition methods with array_split and array_svals.

  • allow array_split to handle batches of matrices (for most methods).

  • array_split: automatically detect and forward valid kwargs to underlying decomposition methods.

  • tensor_split and array_split: expand absorb options significantly beyond "left", "both", "right", None to include "lorthog", "rorthog", "lfactor", "rfactor", "lsqrt", "rsqrt and "s" for returning partial results (single factors or singular values only). Default changed from "both" to "auto", which uses each method’s natural default.

  • add method "svd:eig" with main implementation svd_via_eig for efficient SVD via hermitian eigen-decomposition, with shortcuts for all absorb modes. This can be faster (especially e.g. on GPU) than the standard SVD, but entails some loss of precision.

  • tensor_split: rename method option "eig" to "svd:eig" to make it clearer that this is an SVD split via eigen-decomposition. "eig" remains as a deprecated alias for "svd:eig".

  • add method "svd:rand" with main implementation svd_rand_truncated for randomized SVD with truncation, with shortcuts for all absorb modes. (This is a new and backend agnostic implementation as opposed to the existing 'rsvd' method).

  • add method "qr:cholesky" qr_via_cholesky for efficient QR or LQ like decompositions via cholesky decomposition, with shortcuts for all absorb modes. This can be faster than the standard QR (especially on GPU) but entails some loss of precision.

  • tensor_split and array_split: add "lsqrt" and "rsqrt" absorb options, update cholesky decomposition to cholesky_regularized with shift as exposed parameter.

  • compute_oblique_projectors: allow method kwarg.

  • QR decomposition: add stabilize kwarg for controlling QR stabilization behavior.

  • decomposition methods: various compatibility improvements for JAX backend.

Other enhancements:

Bug fixes:

v1.12.1 (2026-01-12)

Breaking Changes

  • bump minimum required python version to 3.11

Bug fixes:

v1.12.0 (2026-01-09)

Enhancements:

Bug fixes:

v1.11.2 (2025-07-30)

Enhancements:

  • Update the introduction to tensor contraction docs

  • Improve efficiency of 1D structured contractions when default optimize is used, especially for large bond dimension overlaps.

Bug fixes:

  • fixes for MPS and MPO constructors when L=1, (GH #314)

  • tensor splitting with absorb=”left” now correctly marks left indices.

  • tn.isel: fix bug when value could not be compared to string "r"

  • truncated svd, make n_chi comparison more robust to different backends

v1.11.1 (2025-06-20)

Enhancements:

  • add create_bond to tensor_canonize_bond and tensor_compress_bond for optionally creating a new bond between two tensors if they don’t already share one. Add as a flag to TensorNetwork1DFlat.compress and related functions (GH #294).

  • add ensure_bonds_exist for ensuring that all bonds in a 1D flat tensor network exist. Use this in the permute_arrays methods and optionally in the expand_bond_dimension method.

  • tn.draw(): permit empty network, and allow color=True to automatically color all tags.

  • tn.add_tag: add a record: Optional[dict] kwarg, to allow for easy rewinding of temporary tags without tracking the actual networks.

  • add qu.plot as a quick wrapper for calling matplotlib.pyplot.plot with the quimb style.

  • quimb.schematic: add zorder_delta kwarg for fine adjustments to layering of objects in approximately the same position.

  • operatorbuilder: big performance improvements and fixes for building matrix representations including Z2 symmetry. Add default symmetry and sector options that can be overridden at build time. Add lazy (slow, matrix free) ‘apply’ method. Add pauli_decompose transformation. Add experimental PEPO builder for nearest neighbor operators. Add unit tests.

Bug fixes:

v1.11.0 (2025-05-14)

Breaking Changes

  • move belief propagation to quimb.tensor.belief_propagation

  • calling tn.contract() when an non-zero value has been accrued into tn.exponent now automatically re-absorbs that exponent.

  • binary tensor operations that would previously have errored now will align and broadcast

Enhancements:

  • Tensor: make binary operations (+, -, *, /, **) automatically align and broadcast indices. This would previously error.

  • MatrixProductState.measure: add a seed kwarg

  • belief propagation, implement DIIS (direct inversion in the iterative subspace)

  • belief propagation, unify various aspects such as message normalization and distance.

  • belief propagation, add a plot method.

  • belief propagation, add a contract_every option.

  • HV1BP: vectorize both contraction and message initialization

  • add qu.plot_multi_series_zoom for plotting multiple series with a zoomed inset, useful for various convergence plots such as BP

  • add info option to tn.gauge_all_simple for tracking extra information such as number of iterations and max gauge diffs

  • Tensor.gate: add transposed option

  • TensorNetwork.contract: add strip_exponent option for return the mantissa and exponent (log10) separately. Compatible with contract_tags, contract_cumulative, contract_compressed sub modes.

  • tensor_split: add matrix_svals option, if True any returned singular values are put into the diagonal of a matrix (by default, False, they are returned as a vector).

  • add Tensor.new_ind_pair_diag for expanding an existing index into a pair of new indices, such that the diagonal of the new tensor on those indices is the old tensor.

  • TNOptimizer: add ‘cautious’ ADAM

  • TensorNetwork.pop_tensor: allow tid or tags to be specified.

  • add an example notebook for converting hyper tensor networks to normal tensor networks, for approximate contraction - Converting a hyper TN for approximate contraction

  • add “SX” and “SXDG” gates to Circuit (PR #277)

  • add “XXPLUSYY” and “XXPLUSYY” gates to Circuit (PR #279)

  • add progress bar to various Circuit methods (PR #288)

  • quimb.operator: fix MPO building for congested operators (GH #296 and GH #301), allow arbitrary dtype (GH #289). Fix building of sparse and matrix representations for non-translationally symmetric operators and operators with trivial (all identity) terms.

Bug fixes:

  • fix MatrixProductState.measure for cupy backend arrays (GH #276).

  • fix linalg.expm dispatch (GH #275)

  • fix ‘dm’ 1d compress method for disconnected subgraphs

  • fix docs source lookup in quimb.tensor module

  • fix raw gate copying in Circuit (GH #285)

v1.10.0 (2024-12-18)

Enhancements:

  • tensor network fitting: add method="tree" for when ansatz is a tree - tensor_network_fit_tree

  • tensor network fitting: fix method="als" for complex networks

  • tensor network fitting: allow method="als" to use a iterative solver suited to much larger tensors, by default a custom conjugate gradient implementation.

  • tensor_network_distance and fitting: support hyper indices explicitly via output_inds kwarg

  • add tn.make_overlap and tn.overlap for computing the overlap between two tensor networks, \(\langle O |T \rangle\), with explicit handling of outer indices to address hyper networks. Add output_inds to tn.norm and tn.make_norm also, as well as the squared kwarg.

  • replace all numba based paralellism (prange and parallel vectorize) with explicit thread pool based parallelism. Should be more reliable and no need to set NUMBA_NUM_THREADS anymore. Remove env var QUIMB_NUMBA_PAR.

  • Circuit: add dtype and convert_eager options. dtype specifies what the computation should be performed in. convert_eager specifies whether to apply this (and any to_backend calls) as soon as gates are applied (the default for MPS circuit simulation) or just prior to contraction (the default for exact contraction simulation).

  • tn.full_simplify: add check_zero (by default set of "auto") option which explicitly checks for zero tensor norms when equalizing norms to avoid log10(norm) resulting in -inf or nan. Since it creates a data dependency that breaks e.g. jax tracing, it is optional.

  • schematic.Drawing: add shorten kwarg to line drawing and curve drawing and examples to schematic - manual drawing.

  • TensorNetwork: add .backend and .dtype_name properties.

v1.9.0 (2024-11-19)

Breaking Changes

  • renamed MatrixProductState.partial_trace and MatrixProductState.ptr to MatrixProductState.partial_trace_to_mpo to avoid confusion with other partial_trace methods that usually produce a dense matrix.

Enhancements:

  • add Circuit.sample_gate_by_gate and related methods Circuit.reordered_gates_dfs_clustered and Circuit.get_qubit_distances for sampling a circuit using the ‘gate by gate’ method introduced in https://arxiv.org/abs/2112.08499.

  • add CircuitBase.draw for drawing a very simple circuit schematic.

  • Circuit: by default turn on simplify_equalize_norms and use a group_size=10 for sampling. This should result in faster and more stable sampling.

  • Circuit: use numpy.random.default_rng for random number generation.

  • add qtn.circ_a2a_rand for generating random all-to-all circuits.

  • expose qtn.edge_coloring as top level function and allow layers to be returned grouped.

  • add docstring for tn.contract_compressed and by default pick up important settings from the supplied contraction path optimizer (max_bond and compress_late)

  • add Tensor.rand_reduce for randomly removing a tensor index by contracting a random vector into it. One can also supply the value "r" to isel selectors to use this.

  • add fit-zipup and fit-projector shorthand methods to the general 1d tensor network compression function

  • add MatrixProductState.compute_local_expectation for computing many local expectations for a MPS at once, to match the interface for this method elsewhere. These can either be computed via canonicalization (method="canonical"), or via explicit left and right environment contraction (method="envs")

  • specialize CircuitMPS.local_expectation to make use of the MPS form.

  • add PEPS.product_state for constructing a PEPS representing a product state.

  • add PEPS.vacuum for constructing a PEPS representing the vacuum state \(|000\ldots0\rangle\).

  • add PEPS.zeros for constructing a PEPS whose entries are all zero.

  • tn.gauge_all_simple: improve scheduling and add damping and touched_tids options.

  • qtn.SimpleUpdateGen: add gauge difference update checking and tol and equilibrate settings. Update .plot() method. Default to a small cutoff.

  • add psi.sample_configuration_cluster for sampling a tensor network using the simple update or cluster style environment approximation.

  • add the new doc Exploring circuit sampling with various methods


v1.8.4 (2024-07-20)

Bug fixes:


v1.8.3 (2024-07-10)

Enhancements:


v1.8.2 (2024-06-12)

Enhancements:

  • TNOptimizer can now accept an arbitrary pytree (nested combination of dicts, lists, tuples, etc. with TensorNetwork, Tensor or raw array_like objects as the leaves) as the target object to optimize.

  • TNOptimizer can now directly optimize Circuit objects, returning a new optimized circuit with updated parameters.

  • Circuit: add .copy(), .get_params() and .set_params() interface methods.

  • Update generic TN optimizer docs.

  • add tn.gen_paths_loops for generating all loops of indices in a TN.

  • add tn.gen_inds_connected for generating all connected sets of indices in a TN.

  • make SVD fallback error catching more generic (PR #238)

  • fix some windows + numba CI issues.

  • approx_spectral_function add plotting and tracking

  • add dispatching to various tensor primitives to allow overriding


v1.8.1 (2024-05-06)

Enhancements:

Bug fixes:


v1.8.0 (2024-04-10)

Breaking Changes

Enhancements:

Bug fixes:

  • fix scipy sparse monkey patch for scipy>=1.13 (GH #222)

  • fix autoblock bug where connected sectors were not being merged (GH #223)


v1.7.3 (2024-02-08)

Enhancements:

  • qu.randn: support dist="rademacher".

  • support dist and other randn options in various TN builders.

Bug fixes:

  • restore fallback (to scipy.linalg.svd with driver=’gesvd’) behavior for truncated SVD with numpy backend.


v1.7.2 (2024-01-30)

Enhancements:

Bug fixes:

  • removed import of deprecated numba.generated_jit decorator.


v1.7.1 (2024-01-30)

Enhancements:

Bug fixes:

  • fix bug in kruas_op when operator spanned multiple subsystems (GH #214)

  • fix bug in qr_stabilized when the diagonal of R has significant imaginary parts.

  • fix bug in quantum discord computation when the state was diagonal (GH #217)


v1.7.0 (2023-12-08)

Breaking Changes

  • Circuit : remove target_size in preparation for all contraction specifications to be encapsulated at the contract level (e.g. with cotengra)

  • some TN drawing options (mainly arrow options) have changed due to the backend change detailed below.

Enhancements:

  • TensorNetwork.draw: use quimb.schematic for main backend="matplotlib" drawing. Enabling:

    1. multi tag coloring for single tensors

    2. arrows and labels on multi-edges

    3. better sizing of tensors using absolute units

    4. neater single tensor drawing, in 2D and 3D

Bug fixes:

  • fixed bug where an output index could be removed by squeezing when performing tensor network simplifications.


v1.6.0 (2023-09-10)

Breaking Changes

  • Quantum circuit RZZ definition corrected (angle changed by -1/2 to match qiskit).

Enhancements:

Bug fixes:

  • fix gauge size check for some backends


v1.5.1 (2023-07-28)

Enhancements:

Bug fixes:

  • Circuit: use stack for more robust parametrized gate generation

  • fix for gate_with_auto_swap() for i > j.

  • fix bug where calling tn.norm() would mangle indices.


v1.5.0 (2023-05-03)

Enhancements

Bug fixes:


v1.4.2 (2022-11-28)

Enhancements


v1.4.1 (2022-11-28)

Enhancements

  • unify much functionality from 1D, 2D and 3D into general arbitrary geometry class TensorNetworkGen

  • refactor contraction, allowing using cotengra directly

  • add Tensor.visualize() for visualizing the actual data entries of an arbitrarily high dimensional tensor

  • add Gate class for more robust tracking and manipulation of gates in quantum Circuit simulation

  • tweak TN drawing style and layout

  • tweak default gauging options of compressed contraction

  • add TensorNetwork.compute_hierarchical_grouping()

  • add Tensor.as_network()

  • add TensorNetwork.inds_size()

  • add TensorNetwork.get_hyperinds()

  • add TensorNetwork.outer_size()

  • improve tensor_core.group_inds()

  • refactor tensor decompositiona and ‘isometrization’ methods

  • begin supporting pytree specifications in TNOptimizer, e.g. for constants

  • add experimental submodule for new sharing features

  • register tensor and tensor network objects with jax pytree interface (PR #150)

  • update CI infrastructure

Bug fixes:


v1.4.0 (2022-06-14)

Enhancements

  • Add 2D tensor network support and algorithms

  • Add 3D tensor network infrastructure

  • Add arbitrary geometry quantum state infrastructure

  • Many changes to TNOptimizer

  • Many changes to TN drawing

  • Many changes to Circuit simulation

  • Many improvements to TN simplification

  • Make all tag and index operations deterministic

  • Add tensor_network_sum(), tensor_network_distance() and TensorNetwork.fit()

  • Various memory and performance improvements

  • Various graph generators and TN builders


v1.3.0 (2020-02-18)

Enhancements

Bug fixes:

  • Fix consistency of fidelity() by making the unsquared version the default for the case when either state is pure, and always return a real number.

  • Fix a bug in the 2D system example for when j != 1.0

  • Add environment variable QUIMB_NUMBA_PAR to set whether numba should use automatic parallelization - mainly to fix travis segfaults.

  • Make cache import and initilization of petsc4py and slepc4py more robust.


v1.2.0 (2019-06-06)

Enhancements

  • Added kraus_op() for general, noisy quantum operations

  • Added projector() for constructing projectors from observables

  • Added calc.measure() for measuring and collapsing quantum states

  • Added cprint() pretty printing states in computational basis

  • Added calc.simulate_counts() for simulating computational basis counts

  • TN: Add TensorNetwork.rank_simplify()

  • TN: Add TensorNetwork.isel()

  • TN: Add TensorNetwork.cut_iter()

  • TN: Add 'split-gate' gate mode

  • TN: Add TNOptimizer for tensorflow based optimization of arbitrary, contstrained tensor networks.

  • TN: Add Dense1D.rand()

  • TN: Add connect() to conveniently set a shared index for tensors

  • TN: make many more tensor operations agnostic of the array backend (e.g. numpy, cupy, tensorflow, …)

  • TN: allow align_TN_1D() to take an MPO as the first argument

  • TN: add SpinHam1D.build_sparse()

  • TN: add Tensor.unitize() and TensorNetwork.unitize() to impose unitary/isometric constraints on tensors specfied using the left_inds kwarg

  • Many updates to tensor network quantum circuit (Circuit) simulation including:

  • Add from quimb.gates import * as shortcut to import X, Z, CNOT, ....

  • Add U_gate() for parametrized arbitrary single qubit unitary

Bug fixes:

  • Fix pkron for case len(dims) == len(inds) (GH #17, PR #18).

  • Fix qarray printing for older numpy versions

  • Fix TN quantum circuit bug where Z and X rotations were swapped

  • Fix variable bond MPO building (GH #22) and L=2 DMRG

  • Fix norm(X, 'trace') for non-hermitian matrices

  • Add autoray as dependency (GH #21)