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`
InitializeTensorNetwork
​
InitializeTensorNetwork
[graph,tensor]
rebinds the boundary of
graph
to a new vertex 0 annotated with
tensor
and default
Superscript
[0,k]
indices.
​
​
InitializeTensorNetwork
[graph,tensor,indices]
uses the explicit index list
indices
for the new vertex.
​
Details and Options
​
Examples  
(10)
Basic Examples  
(1)
Build a small open chain whose left boundary is a placeholder stub at vertex 0:
In[1]:=
chain=Graph[{0,1,2},{DirectedEdge[0,1,{Superscript[0,1],Subscript[1,1]}],DirectedEdge[1,2,{Superscript[1,2],Subscript[2,1]}]},AnnotationRules{0{"Tensor"{0.,0.},"Index"{Superscript[0,1]},VertexLabels"Stub"},1{"Tensor"RandomReal[1,{2,3}],"Index"{Subscript[1,1],Superscript[1,2]},VertexLabels1},2{"Tensor"RandomReal[1,{3,4}],"Index"{Subscript[2,1],Superscript[2,2]},VertexLabels2}}];
Close the boundary by binding a length-2 vector to the stub:
In[2]:=
init=InitializeTensorNetwork[chain,{0.5,-0.3}];
The new boundary vertex 0 carries the supplied tensor verbatim:
In[3]:=
AnnotationValue[{init,0},"Tensor"]
Out[4]=
{0.5,-0.3}
Its default index list is {Superscript[0, 1], …, Superscript[0, r]}, where r is the rank of the boundary tensor:
In[5]:=
AnnotationValue[{init,0},"Index"]
Out[6]=
{
1
0
}
The vertex carries the label "Initial", so it stands out in graph plots:
In[7]:=
AnnotationValue[{init,0},VertexLabels]
Out[8]=
Initial
The returned object is a valid tensor-network graph:
In[9]:=
TensorNetworkGraphQ[init]
Out[10]=
True
Scope  
(4)

Applications  
(2)

Properties & Relations  
(3)

SeeAlso
ToTensorNetworkGraph
 
▪
TensorNetworkGraphQ
 
▪
TensorNetworkAdd
 
▪
TensorNetworkGraphData
 
▪
TensorNetwork
 
▪
Graph
 
▪
Annotate
 
▪
VertexAdd
TechNotes
▪
Building Tensor Networks
RelatedGuides
▪
TensorNetworks
""

© 2026 Wolfram. All rights reserved.

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