Recent Releases of quimb
quimb - v1.11.2
Enhancements:
- Update the introduction to tensor contrcction docs
- Improve efficiency of 1D structured contractions when default
optimizeis used.
Bug fixes:
- fixes for MPS and MPO constructors when L=1, (#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
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.11.1...v1.11.2
Scientific Software - Peer-reviewed
- Python
Published by jcmgray 11 months ago
quimb - v1.11.1
Enhancements:
- add
create_bondtotensor_canonize_bondandtensor_compress_bondfor optionally creating a new bond between two tensors if they don't already share one. Add as a flag toTensorNetwork1DFlat.compressand related functions (#294). - add
ensure_bonds_existfor ensuring that all bonds in a 1D flat tensor network exist. Use this in thepermute_arraysmethods and optionally in theexpand_bond_dimensionmethod. tn.draw(): permit empty network, and allowcolor=Trueto automatically color all tags.tn.add_tag: add arecord: Optional[dict]kwarg, to allow for easy rewinding of temporary tags without tracking the actual networks.- add
qu.plotas a quick wrapper for callingmatplotlib.pyplot.plotwith thequimbstyle. quimb.schematic: addzorder_deltakwarg 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 defaultsymmetryandsectoroptions that can be overridden at build time. Add lazy (slow, matrix free) 'apply' method. Addpauli_decomposetransformation. Add experimental PEPO builder for nearest neighbor operators. Add unit tests.
Bug fixes:
- Fix
TensorNetwork2D.compute_plaquette_environmentsformode="zipup"and other boundary contraction methods that use the generic 1D compression algorithms. parse_openqasm2_strallow custom gate names to start with the wordgate(#312).MatrixProductState.gate_with_mpo: fix bug to do with inplace argument (#313).
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.11.0...v1.11.1
Scientific Software - Peer-reviewed
- Python
Published by jcmgray 12 months ago
quimb - v1.11.0
Breaking Changes
- move belief propagation to
quimb.tensor.belief_propagation - calling
tn.contract()when an non-zero value has been accrued intotn.exponentnow 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 aseedkwarg- 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
plotmethod. - belief propagation, add a
contract_everyoption. - HV1BP: vectorize both contraction and message initialization
- add
qu.plot_multi_series_zoomfor plotting multiple series with a zoomed inset, useful for various convergence plots such as BP - add
infooption totn.gauge_all_simplefor tracking extra information such as number of iterations and max gauge diffs Tensor.gate: addtransposedoptionTensorNetwork.contract: addstrip_exponentoption for return the mantissa and exponent (log10) separately. Compatible withcontract_tags,contract_cumulative,contract_compressedsub modes.tensor_split: addmatrix_svalsoption, ifTrueany 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_diagfor 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' ADAMTensorNetwork.pop_tensor: allowtidor tags to be specified.- add an example notebook for converting hyper tensor networks to normal tensor networks, for approximate contraction - https://quimb.readthedocs.io/en/latest/examples/exhtntotn2d.html#example-htn-to-2d
- Add SX and SXDG gates by @kevinsung in https://github.com/jcmgray/quimb/pull/277
- Add XXPLUSYY and XXMINUSYY gates by @kevinsung in https://github.com/jcmgray/quimb/pull/279
- Added progbar to qsim, and openqasm2 by @edenian in https://github.com/jcmgray/quimb/pull/288
quimb.experimental.operatorbuilder: fix MPO building for congested operators (#296 and #301), allow arbitrary dtype (#289). Fix building of sparse and matrix representations for non-translationally symmetric operators and operators with trivial (all identity) terms.
Bug fixes:
- fix
MatrixProductState.measureforcupybackend arrays (#276). - fix
linalg.expmdispatch (#275) - fix 'dm' 1d compress method for disconnected subgraphs
- fix docs source lookup in
quimb.tensormodule - fix raw gate copying in
Circuit(#285)
New Contributors
- @edenian made their first contribution in https://github.com/jcmgray/quimb/pull/288
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.10.0...v1.11.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 1 year ago
quimb - v1.10.0
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 dtype 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_distanceand fitting: support hyper indices explicitly viaoutput_indskwarg- add
tn.make_overlapandtn.overlapfor computing the overlap between two tensor networks, $\langle O |T \rangle$, with explicit handling of outer indices to address hyper networks. Addoutput_indstotn.normandtn.make_normalso, as well as thesquaredkwarg. - replace all
numbabased paralellism (prangeand parallel vectorize) with explicit thread pool based parallelism. Should be more reliable and no need to setNUMBA_NUM_THREADSanymore. Remove env varQUIMB_NUMBA_PAR. Circuit: adddtypeandconvert_eageroptions.dtypespecifies what the computation should be performed in.convert_eagerspecifies whether to apply this (and anyto_backendcalls) 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: addcheck_zero(by default set of"auto") option which explicitly checks for zero tensor norms when equalizing norms to avoidlog10(norm)resulting in -inf or nan. Since it creates a data dependency that breaks e.g.jaxtracing, it is optional.schematic.Drawing: addshortenkwarg to line drawing and curve drawing and examples to the docs.TensorNetwork: add.backendand.dtype_nameproperties.
PRs:
- Circuit: add default dtype and convert_eager options by @jcmgray in https://github.com/jcmgray/quimb/pull/273
- add fit(method="tree") and fix ALS for complex TNs by @jcmgray in https://github.com/jcmgray/quimb/pull/274
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.9.0...v1.10.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 1 year ago
quimb - v1.9.0
Breaking Changes
- renamed
MatrixProductState.partial_traceandMatrixProductState.ptrto MatrixProductState.partialtraceto_mpo to avoid confusion with otherpartial_tracemethods that usually produce a dense matrix.
Enhancements:
- add
Circuit.sample_gate_by_gateand related methodsCircuitMPS.reordered_gates_dfs_clusteredandCircuitMPS.get_qubit_distancesfor sampling a circuit using the 'gate by gate' method introduced in https://arxiv.org/abs/2112.08499. - add
Circuit.drawfor drawing a very simple circuit schematic. Circuit: by default turn onsimplify_equalize_normsand use agroup_size=10for sampling. This should result in faster and more stable sampling.Circuit: usenumpy.random.default_rngfor random number generation.- add
qtn.circ_a2a_randfor generating random all-to-all circuits. - expose
qtn.edge_coloringas top level function and allow layers to be returned grouped. - add docstring for
tn.contract_compressedand by default pick up important settings from the supplied contraction path optimizer (max_bondandcompress_late) - add
Tensor.rand_reducefor randomly removing a tensor index by contracting a random vector into it. One can also supply the value"r"toiselselectors to use this. - add
fit-zipupandfit-projectorshorthand methods to the general 1d tensor network compression function - add
MatrixProductState.compute_local_expectationfor 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_expectationto make use of the MPS form. - add
PEPS.product_statefor constructing a PEPS representing a product state. - add
PEPS.vacuumfor constructing a PEPS representing the vacuum state $|000\ldots0\rangle$. - add
PEPS.zerosfor constructing a PEPS whose entries are all zero. tn.gauge_all_simple: improve scheduling and adddampingandtouched_tidsoptions.qtn.SimpleUpdateGen: add gauge difference update checking andtolandequilibratesettings. Update.plot()method. Default to a smallcutoff.- add
psi.sample_configuration_clusterfor sampling a tensor network using the simple update or cluster style environment approximation. - add the new example doc Exploring circuit sampling with various methods
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 1 year ago
quimb - v1.8.4
What's Changed
- fix MPS sample handling of RNG seed by @kevinsung in https://github.com/jcmgray/quimb/pull/248
- fix bug in applying MPO lazily to MPS (#246)
New Contributors
- @kevinsung made their first contribution in https://github.com/jcmgray/quimb/pull/248
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.8.3...v1.8.4
Scientific Software - Peer-reviewed
- Python
Published by jcmgray almost 2 years ago
quimb - v1.8.3
Enhancements:
- support for numpy v2.0 and scipy v1.14
- add MPS sampling:
MatrixProductState.sample_configurationandMatrixProductState.sample(generating multiple samples) and use these forCircuitMPS.sampleandCircuitPermMPS.sample. - add basic plot method for [
SimpleUpdate] classes - add
edges_1d_chainfor generating 1D chain edges - operatorbuilder: better coefficient placement for long range / non-local MPO building
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.8.2...v1.8.3
Scientific Software - Peer-reviewed
- Python
Published by jcmgray almost 2 years ago
quimb - v1.8.2
Enhancements:
TNOptimizercan now accept an arbitrary pytree (nested combination of dicts, lists, tuples, etc. withTensorNetwork,Tensoror rawarray_likeobjects as the leaves) as the target object to optimize.TNOptimizercan now directly optimizeCircuitobjects, 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_inds_loopsfor generating all loops of indices in a TN. - add
tn.gen_inds_connectedfor generating all connected sets of indices in a TN. - make SVD fallback error catching more generic (by @mlxd in https://github.com/jcmgray/quimb/pull/238)
- fix some windows + numba CI issues.
approx_spectral_functionadd plotting and tracking- add dispatching to various tensor primitives to allow overriding
New Contributors
- @mlxd made their first contribution in https://github.com/jcmgray/quimb/pull/238
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.8.1...v1.8.2
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 2 years ago
quimb - v1.8.1
Enhancements:
CircuitMPSnow supports multi qubit gates, including arbitrary multi-controls (which are treated in a low-rank manner), and faster simulation via better orthogonality center tracking.- add
CircuitPermMPS, more docs here: https://quimb.readthedocs.io/en/latest/tensor-circuit-mps.html - add
MatrixProductState.gate_nonlocalfor applying a gate, supplied as a raw matrix, to a non-local and arbitrary number of sites. The kwargcontract="nonlocal"can be used to force this method, or the new option"auto-mps"will select this method if the gate is non-local (https://github.com/jcmgray/quimb/issues/230) - add
MatrixProductState.gate_with_mpofor applying an MPO to an MPS, and immediately compressing back to MPS form usingtensor_network_1d_compress - add
MatrixProductState.gate_with_submpofor applying an MPO acting only of a subset of sites to an MPS - add
MatrixProductOperator.from_densefor constructing MPOs from dense matrices, including an only subset of sites - add
MatrixProductOperator.fill_empty_sitesfor 'completing' an MPO which only has tensors on a subset of sites with (by default) identities -
MatrixProductStateandMatrixProductOperator, now support thesiteskwarg in common constructors, enabling the TN to act on a subset of the fullLsites. - add
TensorNetwork.drape_bond_betweenfor 'draping' an existing bond between two tensors through a third - add
Tensor.new_ind_pair_with_identity - TN2D, TN3D and arbitrary geom classical partition function builders (
TN_classical_partition_function_from_edges) now all supportoutputs=kwarg specifying non-marginalized variables - add simple dense 1-norm belief propagation algorithm
D1BP - add
qtn.enforce_1d_likefor checking whether a tensor network is 1D-like, including automatically adding strings of identities between non-local bonds, expanding applicability oftensor_network_1d_compress - add
MatrixProductState.canonicalizeas (by default non-inplace) version ofcanonize, to follow the pattern of other tensor network methods.canonizeis now an alias forcanonicalize_[note trailing underscore]. - add
MatrixProductState.left_canonicalizeas (by default non-inplace) version ofleft_canonize, to follow the pattern of other tensor network methods.left_canonizeis now an alias forleft_canonicalize_[note trailing underscore]. - add
MatrixProductState.right_canonicalizeas (by default non-inplace) version ofright_canonize, to follow the pattern of other tensor network methods.right_canonizeis now an alias forright_canonicalize_[note trailing underscore].
Bug fixes:
Circuit.apply_gate_raw: fix kwarg bug (https://github.com/jcmgray/quimb/pull/226) by @juliendrapeau- fix for retrieving
opt_einsum.PathInfofor single scalar contraction (https://github.com/jcmgray/quimb/issues/231).
New Contributors
- @juliendrapeau made their first contribution in https://github.com/jcmgray/quimb/pull/226
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.8.0...v1.8.1
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 2 years ago
quimb - v1.8.0
Breaking Changes
- all singular value renormalization is turned off by default
TensorNetwork.compress_allnow defaults to using some local gauging
Enhancements:
add
quimb.tensor.tensor_1d_compress.pywith functions for compressing generic 1D tensor networks (with arbitrary local structure) using various methods. The methods are:- The 'direct' method:
tensor_network_1d_compress_direct - The 'dm' (density matrix) method:
tensor_network_1d_compress_dm - The 'zipup' method:
tensor_network_1d_compress_zipup - The 'zipup-first' method:
tensor_network_1d_compress_zipup_first - The 1 and 2 site 'fit' or sweeping method:
tensor_network_1d_compress_fit - ... and some more niche methods for debugging and testing.
- The 'direct' method:
And can be accessed via the unified function tensor_network_1d_compress. Boundary contraction in 2D can now utilize any of these methods.
- add quimb.tensor.tensor_arbgeom_compress.py with functions for compressing arbitrary geometry tensor networks using various methods. The methods are:
- The 'local-early' method:
tensor_network_ag_compress_local_early - The 'local-late' method:
tensor_network_ag_compress_local_late - The 'projector' method:
tensor_network_ag_compress_projector - The 'superorthogonal' method:
tensor_network_ag_compress_superorthogonal - The 'l2bp' method:
tensor_network_ag_compress_l2bp
And can be accessed via the unified function tensor_network_ag_compress. 1D compression can also fall back to these methods.
- support PBC in tn2d.contract_hotrg, tn2d.contract_ctmrg, tn3d.contract_hotrg and the new function tn3d.contract_ctmrg.
- support PBC in gen_2d_bonds and gen_3d_bonds, with cyclic kwarg.
- support PBC in TN2D_rand_hidden_loop and TN3D_rand_hidden_loop, with cyclic kwarg.
- support PBC in the various base PEPS and PEPO construction methods.
- add tensor_network_apply_op_op for applying 'operator' TNs to 'operator' TNs.
- tweak tensor_network_apply_op_vec for applying 'operator' TNs to 'vector' or 'state' TNs.
- add tnvec.gate_with_op_lazy method for applying 'operator' TNs to 'vector' or 'state' TNs like $x \rightarrow A x$.
- add tnop.gate_upper_with_op_lazy method for applying 'operator' TNs to the upper indices of 'operator' TNs like $B \rightarrow A B$.
- add tnop.gate_lower_with_op_lazy method for applying 'operator' TNs to the lower indices of 'operator' TNs like $B \rightarrow B A$.
- add tnop.gate_sandwich_with_op_lazy method for applying 'operator' TNs to the upper and lower indices of 'operator' TNs like $B \rightarrow A B A^\dagger$.
- unify all TN summing routines into tensor_network_ag_sum, which allows summing any two tensor networks with matching site tags and outer indices, replacing specific MPS, MPO, PEPS, PEPO, etc. summing routines.
- add rand_symmetric_array, rand_tensor_symmetric TN2D_rand_symmetric for generating random symmetric arrays, tensors and 2D tensor networks.
Bug fixes:
- fix scipy sparse monkey patch for scipy>=1.13 (#222)
- fix autoblock bug where connected sectors were not being merged (#223)
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.7.3...v1.8.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 2 years ago
quimb - v1.7.3
Enhancements:
- qu.randn: support
dist="rademacher". - support
distand otherrandnoptions in various TN builders.
Bug fixes:
- restore fallback (to
scipy.linalg.svdwith driver='gesvd') behavior for truncated SVD with numpy backend.
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.7.2...v1.7.3
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 2 years ago
quimb - v1.7.2
Bug fixes:
- removed import of deprecated
numba.generated_jitdecorator.
Enhancements:
- add
normalized=Trueoption totensor_network_distancefor computing the normalized distance between tensor networks: $2 |A - B| / (|A| + |B|)$, which is useful for convergence checks.Tensor.distance_normalizedandTensorNetwork.distance_normalizedadded as aliases. - add
TensorNetwork.cut_bondfor cutting a bond index
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.7.1...v1.7.2
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 2 years ago
quimb - v1.7.1
What's Changed
Enhancements:
add
TensorNetwork.visualize_tensorsfor visualizing the actual data entries of an entire tensor network.add
ham.build_mpo_propagator_trotterizedfor building a trotterized propagator from a local 1D hamiltonian. This also includes updates for creating 'empty' tensor networks usingTensorNetwork.new, and building up gates from empty tensor networks usingTensorNetwork.gate_inds_with_tn.add more options to
Tensor.expand_indandTensor.new_ind: repeat tiling mode and random padding mode.tensor decomposition: make
eigh_truncatedbackend agnostic.tensor_compress_bond: addreduced="left"andreduced="right"modes for when the pair of tensors is already in a canonical form.add
qtn.TN2D_embedded_classical_ising_partition_functionfor constructing 2D (triangular) tensor networks representing all-to-all classical ising partition functions.
Bug fixes:
- fix bug in
kruas_opwhen operator spanned multiple subsystems (#214) - fix bug in
qr_stabilizedwhen the diagonal ofRhas significant imaginary parts. - fix bug in quantum discord computation when the state was diagonal (#217)
- Fix empty lines in dimacs by @jjcmoon in https://github.com/jcmgray/quimb/pull/215
New Contributors
- @jjcmoon made their first contribution in https://github.com/jcmgray/quimb/pull/215
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.7.0...v1.7.1
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 2 years ago
quimb - v1.7.0
Breaking Changes
Circuit: removetarget_sizein preparation for all contraction specifications to be encapsulated at the contract level (e.g. withcotengra)- some TN drawing options (mainly arrow options) have changed due to the backend change detailed below.
Enhancements:
Multi tag drawing support:
- TensorNetwork.draw: use
quimb.schematicfor mainbackend="matplotlib"drawing. Enabling:- multi tag coloring for single tensors
- arrows and labels on multi-edges
- better sizing of tensors using absolute units
- neater single tensor drawing, in 2D and 3D
- add quimb.schematic.Drawing from experimental submodule, add example docs at
schematic. Add methodstext_between,wedge,line_offsetand other tweaks for future use by main TN drawing. - upgrade all contraction to use
cotengraas the backend Circuit: allow any gate to be controlled by any number of qubits.Circuit: support for parsingopenqasm2specifications now with custom and nested gate definitions etc.- add
is_cyclic_x,is_cyclic_y) andis_cyclic_zto TensorNetwork2D and TensorNetwork3D. - add TensorNetwork.compressall1d for compressing generic tensor networks that you promise have a 1D topology, without casting as a TensorNetwork1D.
- add MatrixProductState.fromfillfn for constructing MPS from a function that fills the tensors.
- add Tensor.idxmin and Tensor.idxmax for finding the index of the minimum / maximum element.
- 2D and 3D classical partition function TN builders: allow output indices.
quimb.experimental.belief_propagation: add various 1-norm/2-norm dense/lazy BP algorithms.
Bug fixes:
- fixed bug where an output index could be removed by squeezing when performing tensor network simplifications.
- Fix deprecation warnings by @king-p3nguin in https://github.com/jcmgray/quimb/pull/209
New Contributors
- @king-p3nguin made their first contribution in https://github.com/jcmgray/quimb/pull/209
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.6.0...v1.7.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 2 years ago
quimb - v1.6.0
Breaking Changes
- Quantum circuit RZZ definition corrected (angle changed by -1/2 to match qiskit).
Enhancements:
- add OpenQASM 2.0 parsing support: :meth:
Circuit.from_openqasm2_file - :class:
Circuit: add RXX, RYY, CRX, CRY, CRZ, toffoli, fredkin, givens gates - truncate TN pretty html reprentation to 100 tensors for performance
- add :meth:
Tensor.sum_reduceand :meth:Tensor.vector_reduce - :meth:
contract_compressed, default to 'virtual-tree' gauge - add :func:
TN_rand_tree experimental.operatorbuilder: fix parallel and heisenberg builder- make parametrized gate generation even more robost (ensure matching types so e.g. tensorflow can be used)
Bug fixes:
- fix gauge size check for some backends
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.5.1...v1.6.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray almost 3 years ago
quimb - v1.5.1
- add various MPO-MPS gate methods, including zip-up and density matrix, in the experimental submodule
- some PTensor refactoring
- Circuit: more robust parametrized gate generation
- various new contraction convenience interfaces (incld. array_contract)
- add
Tensor.check()andTensorNetwork.check()for diagnostics - add
TensorNetwork.isconnected(),TensorNetwork.istree()
Full Changelog: https://github.com/jcmgray/quimb/compare/v1.5.0...v1.5.1
Scientific Software - Peer-reviewed
- Python
Published by jcmgray almost 3 years ago
quimb - v1.5.0
Enhancements
- refactor 'isometrize' methods including new "cayley", "householder" and
"torch_householder" methods. See :func:
quimb.tensor.decomp.isometrize. - add :meth:
~quimb.tensor.tensor_core.TensorNetwork.compute_reduced_factorand :meth:~quimb.tensor.tensor_core.TensorNetwork.insert_compressor_between_regionsmethos, for some RG style algorithms. - add the
mode="projector"option for 2D tensor network contractions - add HOTRG style coarse graining and contraction in 2D and 3D. See
:meth:
~quimb.tensor.tensor_2d.TensorNetwork2D.coarse_grain_hotrg, :meth:~quimb.tensor.tensor_2d.TensorNetwork2D.contract_hotrg, :meth:~quimb.tensor.tensor_3d.TensorNetwork3D.coarse_grain_hotrg, and :meth:~quimb.tensor.tensor_3d.TensorNetwork3D.contract_hotrg, - add CTMRG style contraction for 2D tensor networks:
:meth:
~quimb.tensor.tensor_2d.TensorNetwork2D.contract_ctmrg - add 2D tensor network 'corner double line' (CDL) builders:
:func:
~quimb.tensor.tensor_builder.TN2D_corner_double_line - update the docs to use the
furo <https://pradyunsg.me/furo/>_ theme,myst_nb <https://myst-nb.readthedocs.io/en/latest/>_ for notebooks, and several othersphinxextensions. - add the
'adabelief'optimizer to :class:~quimb.tensor.optimize.TNOptimizeras well as a quick plotter: :meth:~quimb.tensor.optimize.TNOptimizer.plot - add initial 3D plotting methods for tensors networks (
TensorNetwork.draw(dim=3, backend='matplotlib3d')orTensorNetwork.draw(dim=3, backend='plotly')). The newbackend='plotly'can also be used for 2D interactive plots. - Update :func:
~quimb.tensor.tensor_builder.HTN_from_cnfto handle more weighted model counting formats. - Add :func:
~quimb.tensor.tensor_builder.cnf_file_parse - Add :func:
~quimb.tensor.tensor_builder.random_ksat_instance - Add :func:
~quimb.tensor.tensor_builder.TN_from_strings - Add :func:
~quimb.tensor.tensor_builder.convert_to_2d - Add :func:
~quimb.tensor.tensor_builder.TN2D_rand_hidden_loop - Add :func:
~quimb.tensor.tensor_builder.convert_to_3d - Add :func:
~quimb.tensor.tensor_builder.TN3D_corner_double_line - Add :func:
~quimb.tensor.tensor_builder.TN3D_rand_hidden_loop - various optimizations for minimizing computational graph size and construction time.
- add
'lu','polar_left'and'polar_right'methods to :func:~quimb.tensor.tensor_core.tensor_split. - add experimental arbitrary hamilotonian MPO building
- :class:
~quimb.tensor.tensor_core.TensorNetwork: allow empty constructor (i.e. no tensors representing simply the scalar 1) - :meth:
~quimb.tensor.tensor_core.TensorNetwork.drop_tags: allow all tags to be dropped - tweaks to compressed contraction and gauging
- add jax, flax and optax example
- add 3D and interactive plotting of tensors networks with via plotly.
- add pygraphiviz layout options
- add :meth:
~quimb.tensor.tensor_core.TensorNetwork.combinefor unified handling of combining tensor networks potentially with structure - add HTML colored pretty printing of tensor networks for notebooks
- add
quimb.experimental.cluster_update.py
Bug fixes:
- fix :func:
~quimb.tensor.decomp.qr_stabilizedbug for strictly upper triangular R factors.
Full Changelog: https://github.com/jcmgray/quimb/compare/1.4.2...v1.5.0
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 3 years ago
quimb - 1.4.1
Enhancements
- unify much functionality from 1D, 2D and 3D into general arbitrary geometry
class :class:
quimb.tensor.tensor_arbgeom.TensorNetworkGen - refactor contraction, allowing using cotengra directly
- add :meth:
~quimb.tensor.tensor_core.Tensor.visualizefor visualizing the actual data entries of an arbitrarily high dimensional tensor - add :class:
~quimb.tensor.circuit.Gateclass for more robust tracking and manipulation of gates in quantum :class:~quimb.tensor.circuit.Circuitsimulation - tweak TN drawing style and layout
- tweak default gauging options of compressed contraction
- add :meth:
~quimb.tensor.tensor_core.TensorNetwork.compute_hierarchical_grouping - add :meth:
~quimb.tensor.tensor_core.Tensor.as_network - add :meth:
~quimb.tensor.tensor_core.TensorNetwork.inds_size - add :meth:
~quimb.tensor.tensor_core.TensorNetwork.get_hyperinds - add :meth:
~quimb.tensor.tensor_core.TensorNetwork.outer_size - improve :meth:
~quimb.tensor.tensor_core.TensorNetwork.group_inds - refactor tensor decompositiona and 'isometrization' methods
- begin supporting pytree specifications in
TNOptimizer, e.g. for constants - add
experimentalsubmodule for new sharing features - register tensor and tensor network objects with
jaxpytree interface (:pull:150) - update CI infrastructure
Bug fixes:
- fix force atlas 2 and
weight_attrbug (:issue:126) - allow unpickling of
PTensorobjects (:issue:128, :pull:131)
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 3 years ago
quimb - 1.4.0
Enhancements
- Add 2D tensor network support and algorithms
- Add 3D tensor network infrastructure
- Add arbitrary geometry quantum state infrastructure
- Many changes to :class:
TNOptimizer - Many changes to TN drawing
- Many changes to :class:
Circuitsimulation - Many improvements to TN simplification
- Make all tag and index operations deterministic
- Add :func:
~quimb.tensor.tensor_core.tensor_network_sum, :func:~quimb.tensor.tensor_core.tensor_network_distanceand :meth:~quimb.tensor.tensor_core.TensorNetwork.fit - Various memory and performance improvements
- Various graph generators and TN builders
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 4 years ago
quimb -
Enhancements
- Added time dependent evolutions to :class:
~quimb.evo.Evolutionwhen integrating a pure state - see :ref:time-dependent-evolution- as well as supportingLinearOperatordefined hamiltonians (:pull:40). - Allow the :class:
~quimb.evo.Evolutioncallbackcompute=to optionally access the Hamiltonian (:pull:49). - Added :meth:
quimb.tensor.tensor_core.Tensor.randomizeand :meth:quimb.tensor.tensor_core.TensorNetwork.randomizeto randomize tensor and tensor network entries. - Automatically squeeze tensor networks when rank-simplifying.
- Add :meth:
~quimb.tensor.tensor_1d.TensorNetwork1DFlat.compress_sitefor compressing around single sites of MPS etc. - Add :func:
~quimb.tensor.tensor_gen.MPS_ghz_stateand :func:~quimb.tensor.tensor_gen.MPS_w_statefor building bond dimension 2 open boundary MPS reprentations of those states. - Various changes in conjunction with
autoray <https://github.com/jcmgray/autoray>_ to improve the agnostic-ness of tensor network operations with respect to the backend array type. - Add :func:
~quimb.tensor.tensor_core.new_bondon top of :meth:quimb.tensor.tensor_core.Tensor.new_indand :meth:quimb.tensor.tensor_core.Tensor.expand_indfor more graph orientated construction of tensor networks, see :ref:tn-creation-graph-style. - Add the :func:
~quimb.gen.operators.fsimgate. - Make the parallel number generation functions use new
numpy 1.17+functionality rather thanrandomgen(which can still be used as the underlying bit generator) (:pull:50) - TN: rename
contraction_complexityto :meth:~quimb.tensor.tensor_core.TensorNetwork.contraction_width. - TN: update :meth:
quimb.tensor.tensor_core.TensorNetwork.rank_simplify, to handle hyper-edges. - TN: add :meth:
quimb.tensor.tensor_core.TensorNetwork.diagonal_reduce, to automatically collapse all diagonal tensor axes in a tensor network, introducing hyper edges. - TN: add :meth:
quimb.tensor.tensor_core.TensorNetwork.antidiag_gauge, to automatically flip all anti-diagonal tensor axes in a tensor network allowing subsequent diagonal reduction. - TN: add :meth:
quimb.tensor.tensor_core.TensorNetwork.column_reduce, to automatically identify tensor axes with a single non-zero column, allowing the corresponding index to be cut. - TN: add :meth:
quimb.tensor.tensor_core.TensorNetwork.full_simplify, to iteratively perform all the above simplifications in a specfied order until nothing is left to be done. - TN: add
num_tensorsandnum_indicesattributes, shownum_indicesin__repr__. - TN: various improvements to the pytorch optimizer (:pull:
34) - TN: add some built-in 1D quantum circuit ansatzes:
:func:
~quimb.tensor.circuit_gen.circ_ansatz_1D_zigzag, :func:~quimb.tensor.circuit_gen.circ_ansatz_1D_brickwork, and :func:~quimb.tensor.circuit_gen.circ_ansatz_1D_rand. - TN: add parametrized tensors :class:
~quimb.tensor.tensor_core.PTensorand so trainable, TN based quantum circuits -- see :ref:example-tn-training-circuits.
Bug fixes:
- Fix consistency of :func:
~quimb.calc.fidelityby 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_PARto set whether numba should use automatic parallelization - mainly to fix travis segfaults. - Make cache import and initilization of
petsc4pyandslepc4pymore robust.
Scientific Software - Peer-reviewed
- Python
Published by jcmgray over 5 years ago
quimb - quimb-1.2.0
Enhancements
- Added
kraus_opfor general, noisy quantum operations - Added
projectorfor constructing projectors from observables - Added
measurefor measuring and collapsing quantum states - Added
cprintpretty printing states in computational basis - Added
simulate_countsfor 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
optimize_tensorflow.TNOptimizerfor tensorflow based optimization of arbitrary, contstrained tensor networks. - TN: Add
Dense1D.rand - TN: Add
tensor_core.connectto 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
tensor_1d.align_TN_1Dto take an MPO as the first argument - TN: add
SpinHam.build_sparse - TN: add
Tensor.unitizeandTensorNetwork.unitizeto impose unitary/isometric constraints on tensors specified using theleft_indskwarg Many updates to tensor network quantum circuit simulation including:
CircuitMPSCircuitDense- 49-qubit depth 30 circuit simulation example https://quimb.readthedocs.io/en/latest/examples/exquantumcircuit.html
Add
from quimb.gates import *as shortcut to importX, Z, CNOT, ....Add
U_gatefor parametrized arbitrary single qubit unitary
Bug fixes:
- Fix
pkronfor caselen(dims) == len(inds)(#17, #18). - Fix
qarrayprinting for oldernumpyversions - Fix TN quantum circuit bug where Z and X rotations were swapped
- Fix variable bond MPO building (#22) and L=2 DMRG
- Fix
norm(X, 'trace')for non-hermitian matrices - Add
autorayas dependency (#21)
Scientific Software - Peer-reviewed
- Python
Published by jcmgray about 7 years ago