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`
PathQ
​
PathQ
[path]
yields
True
if
path
is a list whose elements are either
{i}
(singleton) or
{i,j}
(pair) integer lists, and
False
otherwise.
​
Details and Options
Examples  
(5)
Scope  
(3)
Mixed singletons and pairs  
(1)
Any combination of singleton and pair entries is accepted:
In[1]:=
PathQ
[{{1},{2,3}}]
Out[1]=
True
​
A pair followed by a singleton marker:
In[1]:=
PathQ
[{{1},{2},{1,2}}]
Out[1]=
True
​
An all-singleton list is still a valid tree-fragment path:
In[1]:=
PathQ
[{{1},{2},{3}}]
Out[1]=
True
Output of path-finders  
(1)

Rejection cases  
(1)

Applications  
(1)

Properties & Relations  
(1)

SeeAlso
CanonicalPathQ
 
▪
TreePathQ
 
▪
CanonicalPath
 
▪
TreePathToPath
 
▪
PathToTreePath
 
▪
PathIndexContractions
 
▪
OptimalContractionPath
 
▪
GreedyContractionPath
TechNotes
▪
Contraction Paths and Execution
RelatedGuides
▪
TensorNetworks
A canonical-form contraction path satisfies PathQ:
In[1]:=
PathQ
[{{1,2},{1,2}}]
Out[1]=
True
​
A path with singleton markers is also accepted:
In[2]:=
PathQ
[{{1},{2,3},{1,2}}]
Out[2]=
True
​
A single contraction step is the smallest accepted path:
In[3]:=
PathQ
[{{1,2}}]
Out[3]=
True
​
A non-integer entry breaks the match:
In[4]:=
PathQ
[{{1.5,2}}]
Out[4]=
False
""

© 2026 Wolfram. All rights reserved.

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