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
Wolfram`TensorNetworks`
MPSOverlap
​
MPSOverlap
[
mps
1
,
mps
2
]
computes the inner product
〈
ψ
1
|
ψ
2
〉
between two matrix-product states. •
​
​
MPSOverlap
[mps,mps]
returns the squared norm
2
ψ
=〈ψ|ψ〉
.
​
Details and Options
Examples  
(6)
Scope  
(4)
Self-overlap and squared norm  
(1)
Self-overlap returns the squared 2-norm of the MPS:
In[1]:=
SeedRandom[42]
In[2]:=
mps=RandomTensorNetwork["MPS"[6,4,2]];
In[3]:=
{MPSOverlap[mps,mps],MPSNorm[mps]^2}
Out[4]=
{69.3437,69.3437}
The difference is zero to floating-point precision:
In[5]:=
Chop[MPSOverlap[mps,mps]-MPSNorm[mps]^2]
Out[6]=
0
Conjugate (Hermitian) symmetry  
(1)

Normalized MPSs  
(1)

Length mismatch  
(1)

Applications  
(1)

Properties & Relations  
(1)

SeeAlso
MPSNorm
 
▪
MPSNormalize
 
▪
MPSCanonicalForm
 
▪
MPSSchmidtValues
 
▪
MPSEntanglementEntropy
 
▪
RandomTensorNetwork
 
▪
Conjugate
 
▪
Dot
TechNotes
▪
MPS Algorithms
RelatedGuides
▪
TensorNetworks
Set a seed for reproducibility:
In[1]:=
SeedRandom[42]
Build a length-6, bond-4, physical-2 MPS:
In[2]:=
mps=RandomTensorNetwork["MPS"[6,4,2]];
Compute the squared norm of the state as the overlap with itself:
In[3]:=
MPSOverlap[mps,mps]
Out[3]=
69.3437
​
Build two independent MPSs and overlap them:
In[4]:=
mps1=RandomTensorNetwork["MPS"[6,4,2]];
In[5]:=
mps2=RandomTensorNetwork["MPS"[6,4,2]];
In[6]:=
MPSOverlap[mps1,mps2]
Out[6]=
5.42534
​
The overlap is Hermitian-symmetric in its two arguments:
In[7]:=
mps1=RandomTensorNetwork["MPS"[6,4,2]];​​mps2=RandomTensorNetwork["MPS"[6,4,2]];​​Conjugate[MPSOverlap[mps2,mps1]]
Out[7]=
5.42534
""

© 2026 Wolfram. All rights reserved.

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