Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
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
Create a Paclet
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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)
S
e
e
A
l
s
o
T
e
n
s
o
r
N
e
t
w
o
r
k
▪
T
e
n
s
o
r
N
e
t
w
o
r
k
D
a
t
a
▪
T
e
n
s
o
r
N
e
t
w
o
r
k
F
r
e
e
I
n
d
i
c
e
s
▪
T
e
n
s
o
r
N
e
t
w
o
r
k
I
n
d
i
c
e
s
▪
B
i
n
a
r
y
T
e
n
s
o
r
N
e
t
w
o
r
k
▪
B
i
n
a
r
y
T
e
n
s
o
r
N
e
t
w
o
r
k
Q
T
e
c
h
N
o
t
e
s
▪
B
u
i
l
d
i
n
g
T
e
n
s
o
r
N
e
t
w
o
r
k
s
R
e
l
a
t
e
d
G
u
i
d
e
s
▪
T
e
n
s
o
r
N
e
t
w
o
r
k
s
Get the list of index contractions in a tensor network:
I
n
[
1
]
:
=
t
n
=
T
e
n
s
o
r
N
e
t
w
o
r
k
[
{
R
a
n
d
o
m
R
e
a
l
[
{
-
1
,
1
}
,
{
2
,
3
}
]
,
R
a
n
d
o
m
R
e
a
l
[
{
-
1
,
1
}
,
{
3
,
4
}
]
}
,
{
{
i
,
j
}
,
{
j
,
k
}
}
]
I
n
[
2
]
:
=
T
e
n
s
o
r
N
e
t
w
o
r
k
C
o
n
t
r
a
c
t
i
o
n
s
[
t
n
]
O
u
t
[
2
]
=
i
1
,
j
1
,
j
2
,
j
1
,
j
2
,
k
2
The shared index
j
has been replaced everywhere it appears by the list
{
j
1
,
j
2
}
of its two per-tensor labels, while the free indices
i
and
k
keep a single labeled occurrence
i
1
and
k
2
.
The same contraction structure is exposed under property syntax:
I
n
[
3
]
:
=
t
n
[
"
C
o
n
t
r
a
c
t
i
o
n
s
"
]
O
u
t
[
3
]
=
i
1
,
j
1
,
j
2
,
j
1
,
j
2
,
k
2
"
"