Changelog

Release notes for quimb.

v1.14.1 (unreleased)

Enhancements:

  • add CircuitPEPSSimpleUpdate: a high level quantum circuit simulator that keeps the state as an arbitrary geometry PEPS and applies nearest-neighbor gates with ‘simple update’ style gauging. The geometry is given by a set of edges, inferred from the gates or read from a psi0; the accuracy is set by max_bond; gauges can be periodically re-equilibrated with equilibrate; local expectations are computed with the cluster approximation.

  • add CircuitPEPOSimpleUpdate: the Heisenberg-picture companion to CircuitPEPSSimpleUpdate. Gates are recorded lazily, then a local observable is built as a bond dimension 1 PEPO on the edges and evolved backwards through them with simple update gauging and compression (skipping gates outside its reverse lightcone), exposing the evolved operator via get_evolved_operator and its |00...0> expectation via local_expectation.

  • TensorNetwork.gauge_all_simple: add a fuse_multibonds option for updating gauges while preserving multi-index bonds, supported by explicit bond-index selection in tensor_compress_bond.

  • add LatticeBondMap: helper for consistently assigning lattice bond indices across ordinary and periodic boundaries, use it in PEPS, PEPO, PEPS3D, scalar 2D/3D lattice tensor-network construction, and classical Ising tensor-network construction.

  • eigh_truncated: add a shift option for optional diagonal regularization.

  • CircuitMPSLazy: add a MPS-based circuit simulator using lazily evaluated gates and periodic automated compression, performing better compared to CircuitMPS for long-range gates when using src compression method.

  • Circuit.from_openqasm3_str, Circuit.from_openqasm3_file, and Circuit.from_openqasm3_url: add OpenQASM 3 parsing with custom gates, register broadcasting, and symbolic input tracking.

Bug fixes:

  • tensor_network_1d_compress_src and tensor_network_1d_compress_srcmps: call enforce_1d_like like the other 1D compression methods, fixing compression of tensor networks with long range (site skipping) bonds, e.g. from lazily applied long range gates.

  • enforce_1d_like: fix the identity string insertion for long range bonds when the supplied site_tags order the two tensors in reverse (e.g. with sweep_reverse=True), which previously wired the identities to the wrong sites.

  • PEPS, PEPO, and PEPS3D: fix periodic construction for length-1 and length-2 cyclic dimensions so normal and periodic bonds remain distinct, including bond-dimension-1 cyclic tensors.

  • TensorNetwork2DVector.compute_norm: ensure we always return a scalar rather than unwrapped tensor network.

  • D2BP.partial_trace_loop_series_expansion: fix the loop series expansion for complex (hermitian) BP messages, which were inserted with the wrong (ket, bra) index ordering in get_cluster_excited (both boundary messages and inner excitation projectors), giving incorrect reduced density matrices for complex states (GH #380).

  • D2BP.normalize_tensors: keep the cached dual tensors in sync when rescaling, so that repeated reduced density matrix computations no longer drift (GH #381).

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 Circuit.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:

  • add MPS_COPY().

  • add ‘density matrix’ and ‘zip-up’ MPO-MPS algorithms.

  • add drop_tags option to tensor_contract()

  • compress_all_simple(), allow cutoff.

  • add structure checking debug methods: Tensor.check() and TensorNetwork.check().

  • add several direction contraction utility functions: get_symbol(), inds_to_eq() and array_contract().

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 quimb.tensor.tnag.core.TensorNetworkGen

  • refactor contraction, allowing using cotengra directly

  • add 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 compute_hierarchical_grouping()

  • add as_network()

  • add inds_size()

  • add get_hyperinds()

  • add outer_size()

  • improve 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 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

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)