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`
TensorNetworkDelete
​
TensorNetworkDelete
[tn,k]
removes the
k
th tensor from the tensor network
tn
. •
​
​
TensorNetworkDelete
[tn]
removes the last tensor (default
k=-1
). •
​
​
TensorNetworkDelete
[graph,k]
operates on the annotated
graph
form, removing the
k
th vertex and its incident edges.
​
Details and Options
▪
k
can be negative;
k=-1
refers to the last tensor,
k=-2
the second-to-last, and so on. •
​The result has exactly one fewer tensor than the input network. •
​When the network was constructed with an explicit
Output
specification, the indices that appeared on the removed tensor are dropped from the
Output
spec. Surviving network indices that were previously contracted with the removed tensor become free in the resulting network. •
​When the
Output
is
Automatic
, the free-index set is recomputed from the remaining hyperedges. •
​In Graph form, the corresponding vertex is removed with
VertexDelete
; incident edges are removed automatically.
Examples  
(4)
Basic Examples  
(1)
Create a tensor network on three tensors arranged in a triangle:
In[1]:=
t1=RandomReal[1,{2,3}];​​t2=RandomReal[1,{3,4}];​​t3=RandomReal[1,{4,2}];​​t4=RandomReal[1,{2,2}];​​{i,j,k,l,m,n,p,q}=Table[Symbol["idx"<>ToString[x]],{x,8}];​​indices={{i,j},{j,k},{k,i}};​​tn=
TensorNetwork
[{t1,t2,t3},indices];
Remove the last tensor (default):
In[2]:=
TensorNetworkDelete
[tn]
Out[2]=
TensorNetwork
Tensors: 2
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 8
​

Negative indices are explicit:
In[3]:=
TensorNetworkDelete
[tn,-1]
Out[3]=
TensorNetwork
Tensors: 2
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 8
​

Remove the first tensor:
In[4]:=
TensorNetworkDelete
[tn,1]
Out[4]=
TensorNetwork
Tensors: 2
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 6
​

Remove the middle tensor; the dangling indices become free:
In[5]:=
TensorNetworkDelete
[tn,2]
Out[5]=
TensorNetwork
Tensors: 2
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 12
​

Round-trip with TensorNetworkAdd: add a fourth tensor, then delete it to recover the original:
In[6]:=
TensorNetworkDelete

TensorNetworkAdd
[tn,t4,{m,n}],4
Out[6]=
TensorNetwork
Tensors: 3
Binary: Yes
Free indices: 0
Sparse: No
Output dimension: 1
​

Integer indices work the same way:
In[7]:=
TensorNetworkDelete

TensorNetwork
[{t1,t2,t3},{{1,2},{2,3},{3,1}}],2
Out[7]=
TensorNetwork
Tensors: 2
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 12
​

Scope  
(1)

Applications  
(1)

Properties & Relations  
(1)

SeeAlso
TensorNetworkAdd
 
▪
TensorNetwork
 
▪
TensorNetworkReplaceIndices
 
▪
ToTensorNetworkGraph
 
▪
Delete
 
▪
VertexDelete
TechNotes
▪
Building Tensor Networks
RelatedGuides
▪
TensorNetworks
""

© 2026 Wolfram. All rights reserved.

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