Skip to content

v1.16.0

Latest

Choose a tag to compare

@jcmgray jcmgray released this 10 Nov 05:28
· 4 commits to main since this release

Highlights for this release include: 2D periodic local expectations, fermionic and abelian compression method support and a 1D compression guide.

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 arbitrary-geometry 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

Dependencies

  • Require autoray v0.10.0 or newer and cotengra v0.8.3 or newer.

Enhancements

Tensor decompositions

  • qr_via_cholesky supports repeated orthogonalization with passes.
  • Add method="qr:auto", which tries Cholesky QR for suitable matrices and uses standard QR if it fails or loses too much orthogonality.
  • 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 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. 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

  • Add Tensor.multiply_index_diagonals for applying multiple diagonal weights together, also used by simple gauging.
  • 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.

Contraction

  • TensorNetwork.contract with strip_exponent=True can now take check_zero=True to return an exactly zero result as (0.0, 0.0) instead of nan (not yet for compressed contraction).

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 (#432).

Operators and time evolution

  • SpinHam1D.build_sparse: include the last term with cyclic=True (#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

Documentation

PRs

  • operator: arbitrary orders with u1u1 symmetry sectors by @jcmgray in #407
  • gate-sandwich and other variants: add dagger kwarg, gate: also add transpose kwarg by @jcmgray in #408
  • LocalHam: add get_trotter_gates method by @jcmgray in #409
  • MatrixProductOperator: add gate_sandwich_with_auto_swap by @jcmgray in #410
  • TN compress 1d fns: use autoray 'random.array' for src, srcmps, fit methods by @jcmgray in #411
  • TN 1d compress: add successive deterministic compression (method="sdc") by @jcmgray in #412
  • TN1D compression: fix sdc for fermionic networks, safe_inverse for symmray arrays by @jcmgray in #414
  • fix various fermionic compression routines by @jcmgray in #416
  • D1BP: for sparse coo tensors, use specialized numba contraction kernels by @jcmgray in #417
  • BP: fix loop series expansion by enumerating edge induced gloops by @jcmgray in #418
  • fully fix dm and fit methods fermionic compression, extend test matrix by @jcmgray in #420
  • fix #419, SpinHam1D with cyclic=True dropping a term by @jcmgray in #421
  • tn1d compress: add "sdcr" and "sdcr-oversample" methods by @jcmgray in #423
  • TN: add rand_hidden_cactus builders by @jcmgray in #424
  • Bump prefix-dev/setup-pixi from 0.10.0 to 0.10.1 in the dependencies group by @dependabot[bot] in #422
  • tensor network compress methods: accept site_tags as sequence of groups by @jcmgray in #425
  • cutoff_mode changes include default 'rel' by @jcmgray in #426
  • TEBDSweepMixin: add logging features and graceful stopping by @jcmgray in #427
  • D2BP: fix fermionic TNs for most use cases including gating and projector gauging by @jcmgray in #428
  • Add machinery for 1d/2d/3d periodic boundary expectations by @jcmgray in #429
  • more fermionic compression fixes: support norm networks with odd parities in dm+projector methods by @jcmgray in #430
  • Bump prefix-dev/setup-pixi from 0.10.1 to 0.10.2 in the dependencies group by @dependabot[bot] in #431
  • add cutpair pbc contract schedule, more max_separation=0.5 support and other improvements by @jcmgray in #433
  • Bump the dependencies group with 2 updates by @dependabot[bot] in #435
  • Respect tol parameter in decomp print mode by @davrens101 in #436

New Contributors

Full Changelog: v1.15.0...v1.16.0