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
  • A Working Tour of the Symmetry Functions
  • 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
  • SchurDimension
  • SparseTensorNetwork
  • TableauColumns
  • TableauDimension
  • TableauRows
  • TableauShape
  • TableauSize
  • TableauWeylDimension
  • 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
Wolfram`TensorNetworks`
MPSCanonicalForm
​
MPSCanonicalForm
[mps]
transforms
mps
into left-canonical form. •
​
​
MPSCanonicalForm
[mps,"Left"]
puts every tensor in left-isometric form where
†
A
.A=I
. •
​
​
MPSCanonicalForm
[mps,"Right"]
puts every tensor in right-isometric form where
A.
†
A
=I
. •
​
​
MPSCanonicalForm
[mps,{"Mixed",k}]
puts
mps
in mixed canonical form with the orthogonality center at site
k
.
​
Details and Options
▪
The MPS routines assume the open-boundary tensor layout used by
RandomTensorNetwork
["MPS"]: bulk tensors with shape {leftBond, rightBond, physical}, and boundary tensors at sites 1 and
n
with shape {bond, physical}.
▪
Left-canonical form makes every tensor
[i]
A
satisfy
†
A
.A=I
when the bulk tensor is reshaped as a (leftBond × physical) × rightBond matrix; right-canonical form gives
A.
†
A
=I
when reshaped as leftBond × (rightBond × physical).
▪
Mixed canonical form left-canonicalizes sites 1 through
k-1
and right-canonicalizes sites
k+1
through
n
, leaving site
k
as the orthogonality center carrying the full spectral weight. This is the standard form for measurement on site
k
and for DMRG-style local updates.
▪
Canonicalization proceeds by sweeping
SingularValueDecomposition
from one boundary to the other; with
"MaxBond"D
every bond is capped at dimension
D
, and with
"Tolerance"ϵ
singular values not exceeding
ϵ
are dropped.
▪
Without truncation options the result represents the same network as the input up to a gauge transformation;
MPSOverlap
between the input and its canonical form equals
MPSNorm
[mps]
·
MPSNorm
[canon].
▪
The following options can be given:
"MaxBond"
Infinity
maximum bond dimension retained after SVD truncation
"Tolerance"
0
singular-value cutoff; values not exceeding this are dropped
​
Examples  
(11)
Basic Examples  
(4)
Build a six-site MPS with bond dimension 4 and physical dimension 2, then transform it to canonical form. With no form argument MPSCanonicalForm defaults to left-canonical:
In[1]:=
mps=BlockRandomSeedRandom[42];
RandomTensorNetwork
["MPS"[6,4,2]]
Out[1]=
TensorNetwork
Tensors: 6
Binary: Yes
Free indices: 6
Sparse: No
Output dimension: 64
​

In[2]:=
MPSCanonicalForm
[mps]
Out[2]=
TensorNetwork
Tensors: 6
Binary: Yes
Free indices: 6
Sparse: No
Output dimension: 64
​

​
Transform to right-canonical form:
In[1]:=
mps=BlockRandomSeedRandom[42];
RandomTensorNetwork
["MPS"[6,4,2]];​​
MPSCanonicalForm
[mps,"Right"]
Out[1]=
TensorNetwork
Tensors: 6
Binary: Yes
Free indices: 6
Sparse: No
Output dimension: 64
​

​
Mixed canonical form centered at site 3 – sites 1 and 2 are left-isometric, sites 4 through 6 are right-isometric, and site 3 holds the wavefunction's spectral weight:
In[1]:=
mps=BlockRandomSeedRandom[42];
RandomTensorNetwork
["MPS"[6,4,2]];​​
MPSCanonicalForm
[mps,{"Mixed",3}]
Out[1]=
TensorNetwork
Tensors: 6
Binary: Yes
Free indices: 6
Sparse: No
Output dimension: 64
​

​
The form argument is explicit.
MPSCanonicalForm
[mps,"Left"]
and
MPSCanonicalForm
[mps]
return the same network:
In[1]:=
mps=BlockRandomSeedRandom[42];
RandomTensorNetwork
["MPS"[6,4,2]];​​
MPSCanonicalForm
[mps,"Left"]
Out[1]=
TensorNetwork
Tensors: 6
Binary: Yes
Free indices: 6
Sparse: No
Output dimension: 64
​

Scope  
(2)

Options  
(2)

Applications  
(2)

Properties & Relations  
(1)

SeeAlso
MPSCanonicalQ
 
▪
MPSOverlap
 
▪
MPSNorm
 
▪
MPSSchmidtValues
 
▪
MPSEntanglementEntropy
 
▪
MPSTruncate
 
▪
RandomTensorNetwork
 
▪
BinaryTensorNetwork
 
▪
SingularValueDecomposition
TechNotes
▪
MPS Algorithms
RelatedGuides
▪
TensorNetworks
""

© 2026 Wolfram. All rights reserved.

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