Breaking Changes
- renamed
MatrixProductState.partial_trace
andMatrixProductState.ptr
to MatrixProductState.partial_trace_to_mpo to avoid confusion with otherpartial_trace
methods that usually produce a dense matrix.
Enhancements:
- add
Circuit.sample_gate_by_gate
and related methodsCircuitMPS.reordered_gates_dfs_clustered
andCircuitMPS.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 onsimplify_equalize_norms
and use agroup_size=10
for sampling. This should result in faster and more stable sampling. -
Circuit
: usenumpy.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
andcompress_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"
toisel
selectors to use this. - add
fit-zipup
andfit-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 adddamping
andtouched_tids
options. -
qtn.SimpleUpdateGen
: add gauge difference update checking andtol
andequilibrate
settings. Update.plot()
method. Default to a smallcutoff
. - add
psi.sample_configuration_cluster
for sampling a tensor network using the simple update or cluster style environment approximation. - add the new example doc Exploring circuit sampling with various methods