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
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumBasis
​
QuantumBasis
["name"]
represents a named quantum basis
"name"
.
​
​
QuantumBasis
[
name
1

b
1
,
name
2

b
2
,…]
represents a quantum basis with basis elements
b
i
, having names
name
i
.
​
​
QuantumBasis
[{
n
1
,
n
2
,…}]
represents a
n
1
×
n
2
×…
dimensional computational basis of a composite system (many qudits).
​
​
QuantumBasis
[n,m]
represents a
m
n
dimensional computational basis of a composite system (
m
qudits, each one,
n
-dimensional).
​
​
QuantumBasis
[{{
n
1
,
n
2
,…},{
m
1
,
m
2
,…}}]
represents a
n
1
×
n
2
×…
dimensional computational basis output qudits, and
m
1
×
m
2
×…
dimensional of the input qudits. Instead of dimension, one can add named basis, too.
​
Details and Options

Examples  
(21)
Basic Examples  
(14)
Create 2-dimensional basis:
In[1]:=
QuantumBasis
[2]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 2
​

Note with no input, the basis is automatically set as 2D, bu default
In[2]:=
QuantumBasis
[2]
QuantumBasis
[]
Out[2]=
True
​
Create 3-dimensional basis:
In[1]:=
QuantumBasis
[3]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 3
​

​
Create a 2×2×2 dimensional basis (three qubits):
In[1]:=
QuantumBasis
[2,3]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 3
Dimension: 8
​

​
Create composite basis of two 2 and 3-dimensional qudits:
In[1]:=
QuantumBasis
[{2,3}]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 2
Dimension: 6
​

​
Create a 2-dimensional basis using explicit element representations:
In[1]:=
QuantumBasis
[0{1,2},1{0,1}]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 2
​

​
Construct a Pauli-Y basis for 2 qubits:
In[1]:=
basis=
QuantumBasis
["Y"]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 2
​

​
Represent the Bell basis for a single qubit (default):
In[1]:=
basis=
QuantumBasis
["Bell"]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 4
​

Return its element names:
In[2]:=
basis["Names"]
Out[2]=
{|
+
Φ
〉,|
-
Φ
〉,|
+
Ψ
〉,|
-
Ψ
〉}
​
A quantum basis with Pauli-X as the input and computational basis as the output
In[1]:=
QuantumBasis
[{"X"},{2}]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 2
Dimension: 4
​

Show elements:
In[2]:=
Normal/@
QuantumBasis
[{"X"},{2}]["ElementAssociation"]
Out[2]=


+
0
1
2
,0,
1
2
,0,

+
10,
1
2
,0,
1
2
,

−
0
1
2
,0,-
1
2
,0,

−
10,
1
2
,0,-
1
2

​
Construct 5-dimensional computational basis,
In[1]:=
basis=
QuantumBasis
[5];​​Normal/@basis["Association"]
Out[1]=
|0〉{1,0,0,0,0},|1〉{0,1,0,0,0},|2〉{0,0,1,0,0},|3〉{0,0,0,1,0},|4〉{0,0,0,0,1}
​
Construct a Bell (entangled) basis,
In[1]:=
bell=
QuantumBasis
["Bell"]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 4
​

In[2]:=
Normal/@bell["Association"]
Out[2]=

+
Φ

1
2
,0,0,
1
2
,
-
Φ

1
2
,0,0,-
1
2
,
+
Ψ
0,
1
2
,
1
2
,0,
-
Ψ
0,
1
2
,-
1
2
,0
​
The elements of a 3-dimensional
QuantumBasis
can be arbitrary (potentially non-orthonormal) vectors:
In[1]:=
QuantumBasis
["a"{1,-3,0},"b"{3,1,2},"c"{2,-1,4}]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 1
Dimension: 3
​

Return the list of orthogonalized basis elements:
In[2]:=
%["OrthogonalElements"]
Out[2]=

1
10
,-
3
10
,0,
3
14
,
1
14
,
2
7
,-
3
35
,-
1
35
,
5
7

​
Create a 3-qubit version of the same basis by taking a tensor product of the basis with itself 3 times:
In[1]:=
QuantumBasis
["X",3]
Out[1]=
QuantumBasis
Picture: Schrödinger
Rank: 3
Dimension: 8
​

View the element names of the 3-qubit system:
In[2]:=
%["Names"]
Out[2]=
{|

+

+

+
〉,|

+

+

−
〉,|

+

−

+
〉,|

+

−

−
〉,|

−

+

+
〉,|

−

+

−
〉,|

−

−

+
〉,|

−

−

−
〉}
View the dual element names:
​
Represent the 2-dimensional Schwinger basis of rank-2 (matrix) elements:
Represent the 3-dimensional Schwinger basis:
​
Represent a collection of 2 qudits:

© 2025 Wolfram. All rights reserved.

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