Skip to main content

Crate tensor4all_treetn

Crate tensor4all_treetn 

Source
Expand description

Tree Tensor Network (TreeTN) library for tensor4all.

This crate provides data structures and algorithms for working with tree tensor networks, a generalization of matrix product states (MPS) to tree-shaped graphs. Tree tensor networks are useful for representing quantum states and operators on systems with tree-like connectivity.

§Key Types

  • TreeTN: The main tree tensor network type, parameterized by tensor and node name types.
  • DefaultTreeTN: A convenient alias for TreeTN<TensorDynLen, NodeIndex>.
  • NamedGraph: A graph wrapper that maps node names to internal graph indices.

§Features

  • Canonicalization: Transform networks into canonical forms (unitary, LU, CI).
  • Truncation: Compress networks using SVD-based truncation.
  • Contraction: Contract two networks using zip-up or fit algorithms.
  • Linear operators: Apply and compose linear operators on tree tensor networks.
  • Linear solvers: Solve linear systems involving tree tensor network operators.

Re-exports§

pub use algorithm::CanonicalForm;
pub use algorithm::CompressionAlgorithm;
pub use algorithm::ContractionAlgorithm;
pub use treetn::contraction;
pub use link_index_network::LinkIndexNetwork;
pub use named_graph::NamedGraph;
pub use node_name_network::CanonicalizeEdges;
pub use node_name_network::NodeNameNetwork;
pub use operator::apply_linear_operator;
pub use operator::are_exclusive_operators;
pub use operator::build_identity_operator_tensor;
pub use operator::compose_exclusive_linear_operators;
pub use operator::ApplyOptions;
pub use operator::ArcLinearOperator;
pub use operator::IndexMapping;
pub use operator::LinearOperator;
pub use operator::Operator;
pub use options::CanonicalizationOptions;
pub use options::RestructureOptions;
pub use options::SplitOptions;
pub use options::TruncationOptions;
pub use random::random_treetn;
pub use random::LinkSpace;
pub use site_index_network::SiteIndexNetwork;
pub use treetn::apply_local_update_sweep;
pub use treetn::factorize_tensor_to_treetn;
pub use treetn::factorize_tensor_to_treetn_with;
pub use treetn::get_boundary_edges;
pub use treetn::partial_contract;
pub use treetn::BoundaryEdge;
pub use treetn::LocalUpdateStep;
pub use treetn::LocalUpdateSweepPlan;
pub use treetn::LocalUpdater;
pub use treetn::PartialContractionSpec;
pub use treetn::ScheduledSwapStep;
pub use treetn::SwapOptions;
pub use treetn::SwapSchedule;
pub use treetn::TreeTN;
pub use treetn::TreeTopology;
pub use treetn::TruncateUpdater;
pub use linsolve::square_linsolve;
pub use linsolve::EnvironmentCache;
pub use linsolve::LinsolveOptions;
pub use linsolve::LinsolveVerifyReport;
pub use linsolve::NetworkTopology;
pub use linsolve::NodeVerifyDetail;
pub use linsolve::ProjectedOperator;
pub use linsolve::ProjectedState;
pub use linsolve::SquareLinsolveResult;
pub use linsolve::SquareLinsolveUpdater;

Modules§

algorithm
Algorithm selection types for tensor train operations.
link_index_network
Link Index Network for bond/link index management.
linsolve
Linear equation solvers for Tree Tensor Networks.
named_graph
Named graph wrapper inspired by NamedGraphs.jl (https://github.com/mtfishman/NamedGraphs.jl)
node_name_network
Node Name Network - Graph structure for node name connections.
operator
Operator composition for Tree Tensor Networks.
options
Options and traits for TreeTN operations.
random
Random tensor network generation.
site_index_network
Site Index Network (inspired by ITensorNetworks.jl’s IndsNetwork)
treetn
Tree Tensor Network implementation.

Functions§

tensor_train_to_treetn
Convert a linear-chain simple tensor train into a TreeTN with node names 0..n-1.
tensor_train_to_treetn_with_names
Convert a linear-chain simple tensor train into a TreeTN with explicit node names.
tensor_train_to_treetn_with_names_and_site_indices
Convert a linear-chain simple tensor train into a TreeTN with explicit node names and caller-provided site indices.

Type Aliases§

DefaultTreeTN
Default TreeTN type using TensorDynLen as the tensor type.