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

QuantumFramework

Tutorials

  • Getting Started

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • Bell's theorem
  • Circuit Diagram
  • Exploring Fundamentals of Quantum Theory
  • Quantum object abstraction
  • Tensor Network

Symbols

  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph[EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerTransform
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumDistance
​
QuantumDistance
[
qs
1
,
qs
2
,t]
returns the distance between two quantum discrete states using measure
t
.
​
Details and Options

Examples  
(7)
Basic Examples  
(4)
Find the distance between two pure states in terms of fidelity:
In[1]:=
QuantumDistance

QuantumState
["0"],
QuantumState
["1"]
Out[1]=
0
​
Find the distance between two mixed states:
In[1]:=
QuantumDistance

QuantumState
[{{1/4,0},{0,3/4}}],
QuantumState
[{{1,0},{0,1}}]
Out[1]=
1
2
+
3
2
​
Find the distance between a pure state and a mixed state:
In[1]:=
QuantumDistance

QuantumState
[{{1/4,0},{0,3/4}}],
QuantumState
[{1,0}]
Out[1]=
1
2
​
Find the distance between two quantum states using the trace metric:
In[1]:=
QuantumDistance

QuantumState
[{{1/4,1},{1,3/4}}],
QuantumState
[{{1/2,2},{2,1/2}}],"Trace"
Out[1]=
17
4
Scope  
(2)

Applications  
(1)

SeeAlso
QuantumState
TechNotes
▪
The fidelity is calculated as
Tr[
1/2
ρ
1
.
ρ
2
.
1/2
ρ
1
]
with
ρ
1,2
the corresponding density matrices. The trace distance is
1
2
Tr[
2
(
ρ
1
-
ρ
2
)
]
. The Bures distance is
2(1-
fidelity
)
, and Bures angle is
ArcCos[fidelity]
. The Hilbert-Schmidt is the
Hilbert-Schmidt norm
of the difference between density matrices. The Bloch distance is the EuclideanDistance between two Bloch vectors. And the relative entropy is
Tr[
ρ
1
.Log[
ρ
1
]-
ρ
1
.Log[
ρ
2
]]
.
RelatedGuides
▪
Wolfram Quantum Computation Framework
""

© 2025 Wolfram. All rights reserved.

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