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`
TensorNetworkData
​
TensorNetworkData
[tn]
returns an
Association
containing the complete data of the tensor network
tn
: its tensors, dimensions, indices, vertices, bonds, contractions, and free indices.
​
Details and Options
Examples  
(17)
Basic Examples  
(1)
Get the complete data of a tensor network as an association:
In[1]:=
t1=RandomReal[1,{2,3}];​​t2=RandomReal[1,{3,4}];​​t3=RandomReal[1,{4,2}];​​t4=RandomReal[1,{2,2}];​​indices={{idx1,idx2},{idx2,idx3},{idx3,idx1}};​​tn=TensorNetwork[{t1,t2,t3},indices]
Out[1]=
TensorNetwork
Tensors: 3
Binary: Yes
Free indices: 0
Sparse: No
Output dimension: 1
​

In[2]:=
TensorNetworkData[tn]
Out[2]=
Tensors{{{0.612809,0.130458,0.260095},{0.657812,0.265318,0.462577}},{{0.253323,0.438937,0.839983,0.931607},{0.444777,0.100304,0.618537,0.835115},{0.748834,0.00609525,0.0887644,0.724669}},{{0.102168,0.77641},{0.570572,0.0947489},{0.957574,0.913492},{0.608683,0.925448}}},Dimensions{{2,3},{3,4},{4,2}},Hyperedges{{idx1,idx2},{idx2,idx3},{idx3,idx1}},Indices
idx1
1
,
idx2
1
,
idx2
2
,
idx3
2
,
idx3
3
,
idx1
3
,Vertices{1,2,3},Bonds
idx1
1
,
idx1
3
2,
idx2
1
,
idx2
2
3,
idx3
2
,
idx3
3
4,Contractions
idx1
1
,
idx1
3
,
idx2
1
,
idx2
2
,
idx2
1
,
idx2
2
,
idx3
2
,
idx3
3
,
idx3
2
,
idx3
3
,
idx1
1
,
idx1
3
,ContractionIndices{{idx1,idx2},{idx2,idx3},{idx3,idx1}},FreeIndices{}
Add a new tensor into the previous tensor network:
In[3]:=
TensorNetworkData[TensorNetworkAdd[tn,t4,{idx1,idx5}]]
Out[3]=
Tensors{{{0.612809,0.130458,0.260095},{0.657812,0.265318,0.462577}},{{0.253323,0.438937,0.839983,0.931607},{0.444777,0.100304,0.618537,0.835115},{0.748834,0.00609525,0.0887644,0.724669}},{{0.102168,0.77641},{0.570572,0.0947489},{0.957574,0.913492},{0.608683,0.925448}},{{0.249091,0.606372},{0.263592,0.657744}}},Dimensions{{2,3},{3,4},{4,2},{2,2}},Hyperedges{{idx1,idx2},{idx2,idx3},{idx3,idx1},{idx1,idx5}},Indices
idx1
1
,
idx2
1
,
idx2
2
,
idx3
2
,
idx3
3
,
idx1
3
,
idx1
4
,
idx5
4
,Vertices{1,2,3,4},Bonds
idx1
1
,
idx1
3
,
idx1
4
2,
idx2
1
,
idx2
2
3,
idx3
2
,
idx3
3
4,Contractions
idx1
1
,
idx1
3
,
idx1
4
,
idx2
1
,
idx2
2
,
idx2
1
,
idx2
2
,
idx3
2
,
idx3
3
,
idx3
2
,
idx3
3
,
idx1
1
,
idx1
3
,
idx1
4
,
idx1
1
,
idx1
3
,
idx1
4
,
idx5
4
,ContractionIndices{{idx1,idx2},{idx2,idx3},{idx3,idx1},{idx1,idx5}},FreeIndices{idx5}
Scope  
(11)

Applications  
(3)

Properties & Relations  
(2)

SeeAlso
TensorNetwork
 
▪
TensorNetworkContractions
 
▪
TensorNetworkFreeIndices
 
▪
TensorNetworkGraphData
 
▪
TensorNetworkTensors
 
▪
TensorNetworkSize
 
▪
Association
 
▪
Keys
TechNotes
▪
Building Tensor Networks
RelatedGuides
▪
TensorNetworks
RelatedLinks
▪
Tensor Network on Wikipedia
""

© 2026 Wolfram. All rights reserved.

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