Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

TensorNetworks

Guides

  • TensorNetworks

Tech Notes

  • Building Tensor Networks
  • Contraction Paths and Execution
  • Matrix Product States
  • Tensor Networks Overview
  • Young Tableaux and Tensor Symmetries

Symbols

  • ActivateTensors
  • BinaryTensorNetwork
  • BinaryTensorNetworkQ
  • CanonicalPath
  • CanonicalPathQ
  • ContractIndices
  • ContractionTree
  • EinsteinSummation
  • GreedyContractionPath
  • HookFactor
  • HookLength
  • HookLengths
  • IndexedMultiply
  • InitializeTensorNetwork
  • MetricTensor
  • MetricTensorQ
  • MPSCanonicalForm
  • MPSCanonicalQ
  • MPSEntanglementEntropy
  • MPSNormalize
  • MPSNorm
  • MPSOverlap
  • MPSSchmidtValues
  • MPSTruncate
  • OptimalContractionPath
  • PartitionQ
  • PathIndexContractions
  • PathQ
  • PathToTreePath
  • RandomTensorNetwork
  • SparseTensorNetwork
  • TableauColumns
  • TableauDimension
  • TableauRows
  • TableauShape
  • TableauSize
  • TensorNetworkAdd
  • TensorNetworkContraction
  • TensorNetworkContractions
  • TensorNetworkContract
  • TensorNetworkData
  • TensorNetworkDelete
  • TensorNetworkFreeIndices
  • TensorNetworkGraphData
  • TensorNetworkGraphQ
  • TensorNetworkIndexDimensions
  • TensorNetworkIndexGraph
  • TensorNetworkIndices
  • TensorNetwork
  • TensorNetworkQ
  • TensorNetworkRemoveCycles
  • TensorNetworkReplaceIndices
  • TensorNetworkSize
  • TensorNetworkTensors
  • TensorNetworkToNetGraph
  • ToTensorNetworkGraph
  • TransposePartition
  • TreePathQ
  • TreePathToPath
  • YoungProject
  • YoungSymmetrize
  • YoungTableau
  • YoungTableauQ
TensorNetworks
A TensorNetwork bundles a list of tensors with their hyperedge index lists and defers execution to a contraction path (usually optimized in some ways). The paclet covers explicit and randomized construction of common topologies (MPS, MPO, PEPS, TTN, MERA), Rust-backed greedy and dynamic-programming path optimizers, five interchangeable binary-contraction engines, and chain-specific algorithms for Matrix Product State canonical forms, Schmidt values, entanglement entropy and bond truncation. Two subpackages extend the core: an IndexArray layer adding named indices with explicit covariant and contravariant variance (plus a curated catalog of relativity metrics), and a Symmetry layer providing Young tableaux and the hook-length formula for projecting tensors onto symmetric-group irreducible representations.
TensorNetwork
— atomic object bundling tensors with hyperedge index lists.
RandomTensorNetwork
— random network on a given graph or a named topology (MPS, TT, MPO, PEPS, TTN, MERA).
EinsteinSummation
— contracts tensors by Einstein summation, given index lists or an einsum string.
IndexedMultiply
— joins tensors over shared indices, broadcasting along non-shared dimensions.
TensorNetworkQ
— yields True for a valid TensorNetwork object.
TensorNetworkData
— returns an Association of vertices, tensors, indices, dimensions, contractions and free indices.
TensorNetworkContractions
— returns the hyperedges with internal indices replaced by canonical contracted-index labels.
BinaryTensorNetworkQ
— yields True if every index of the network appears in at most two tensors.
TensorNetworkSize
— returns the number of tensors in the network.
TensorNetworkFreeIndices
— returns the uncontracted (open) indices of the network.
TensorNetworkIndexDimensions
— returns an Association mapping each index to its dimension.
TensorNetworkIndices
— returns the index specifications for each tensor vertex.
TensorNetworkTensors
— returns the list of tensors stored in the network.
BinaryTensorNetwork
— converts a hyper-edge network to a pairwise binary one by inserting spider tensors.
SparseTensorNetwork
— converts the tensors of a network to SparseArray.
ToTensorNetworkGraph
— converts a network into an annotated directed graph representation.
TensorNetworkAdd
— appends a new tensor to the network with specified indices.
TensorNetworkDelete
— removes the k-th tensor from the network.
TensorNetworkReplaceIndices
— renames indices in the network according to rules.
TensorNetworkRemoveCycles
— inserts cup/cap pairs to make a cyclic graph TN acyclic.
TensorNetworkIndexGraph
— returns a graph showing the index connectivity of the network.
OptimalContractionPath
— dynamic-programming optimum (Method  "size", "flops", "max", "write", "combo", "limit").
GreedyContractionPath
— fast greedy heuristic with optional temperature, neighbor budget, and seed.
TensorNetworkContract
— contracts the network to a single tensor along a given or computed path.
TensorNetworkContraction
— returns a symbolic Inactive contraction expression for the network and path.
ActivateTensors
— activates Inactive[TensorProduct], Inactive[TensorContract], Inactive[Transpose] in an expression.
$TensorNetworkContractionMethods
— list of binary-contraction engines: ArrayDotTranspose, ArrayDot, Dot, TensorContract, TableSum.
CanonicalPath
— returns a canonical (normalized) form of a contraction path.
ContractionTree
— returns a Tree representing the contraction hierarchy of a network.
PathIndexContractions
— returns the indices contracted at each step of a path.
PathQ
— yields True for a list of integer pairs encoding a contraction path.
CanonicalPathQ
— yields True for a path already in canonical form.
TreePathQ
— yields True for a tree-structured contraction path.
TreePathToPath
— converts a tree-structured contraction path to a linear pairwise path.
PathToTreePath
— converts a linear pairwise contraction path to a tree-structured path.
MPSCanonicalForm
— transforms an MPS into left, right, or mixed-canonical form, with optional bond truncation.
MPSOverlap
— computes the inner product
〈
ψ
1
|
ψ
2
〉
between two MPSs.
MPSEntanglementEntropy
— computes the von Neumann entanglement entropy across a bond.
MPSCanonicalQ
— yields True if an MPS is in the specified canonical form.
MPSNorm
— computes the norm ψ of an MPS.
MPSNormalize
— returns an MPS rescaled to unit norm.
MPSSchmidtValues
— returns the normalized Schmidt coefficients at a specified bond.
MPSTruncate
— compresses an MPS by truncating bond dimensions to a maximum.
TensorNetworkGraphQ
— yields True for a valid tensor-network graph (annotated directed graph).
TensorNetworkGraphData
— returns vertices, tensors, indices, dimensions, contractions of a graph TN.
TensorNetworkToNetGraph
— converts a tensor network into a Wolfram Neural NetGraph for ML pipelines.
InitializeTensorNetwork
— binds concrete tensors into the boundary vertices of a tensor-network graph.
Named Indices and Metrics
MetricTensor
— catalog of metrics (Minkowski, Schwarzschild, Kerr, KerrNewman, FLRW, …) and constructor from a matrix.
MetricTensorQ
— yields True for a valid MetricTensor.
Tensor Symmetries
YoungTableau
— Young tableau as a list of rows specifying a tensor-index symmetry class.
YoungProject
— normalized projection of a tensor onto a Young-tableau irrep (idempotent:
2
P
=P
).
TableauDimension
— dimension of the
S
n
irrep for a Young tableau, via the hook-length formula.
YoungTableauQ
— yields True for a valid Young tableau.
YoungSymmetrize
— symmetrizes over rows then antisymmetrizes over columns of a tableau.
PartitionQ
— yields True for a valid integer partition (non-increasing positive integers).
TransposePartition
— returns the conjugate (transpose) of an integer partition.
TableauShape
— returns the shape (row lengths) of a Young tableau.
TableauSize
— returns the total number of boxes in a Young tableau.
HookLength
— hook length at a single cell of a Young tableau.
HookLengths
— all hook lengths for cells of a Young diagram, matching the tableau shape.
HookFactor
— 1/(product of hook lengths) for a partition, via the Frobenius determinant formula.
TechNotes
▪
Tensor Networks Overview
▪
Building Tensor Networks
▪
Contraction Paths and Execution
▪
Matrix Product States
▪
Named Indices and Metrics
▪
Young Tableaux and Tensor Symmetries
RelatedGuides
▪
Tensor Operations
▪
Structured Arrays
▪
Graphs and Networks
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com