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
  • Quantum Machine Learning in Phase Space
  • Quantum Object Composition
  • Time Evolution

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • Bell's Theorem: CHSH inequality
  • Circuit Diagram
  • Exploring Fundamentals of Quantum Theory
  • An IBM Quantum Error Map
  • QPU Service Connection
  • Quantum object abstraction
  • Quantum Optimization
  • Second Quantization Functions
  • Sending Queries to IBM QPUs
  • Tensor Network
  • Quantum Computation

Symbols

  • CliffordChannel
  • EinsteinSummation
  • GraphState
  • IBMJob
  • IBMJobSubmit
  • LocalComplement
  • PauliStabilizer
  • QiskitCircuit
  • QiskitTarget
  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph [EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumPhaseSpaceTransform
  • QuantumQASM
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumSimilarity
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform [EXPERIMENTAL]
  • QuditBasis
  • QuditName
  • StabilizerFrame
  • StabilizerStateQ
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
▪
A quantum basis may consist of distinct input and output qudits. For instance, a
QuantumOperator
operates with both input and output qudits, while a typical
QuantumState
only pertains to output. Therefore, it's important to recognize that the concept of a
QuantumBasis
differs fundamentally from that of a basis in a Hilbert space. While users typically won't need to interact with this distinction directly, it is automatically handled behind the scenes for most practical purposes.
▪
The keys names can be any expression.
▪
Built-in names in the Hilbert space include:
​
​
"Computational" or "I"
2-dimensional computational basis
"Computational"[d] or "I"[d]
d-dimensional computational basis
"Bell"
Bell basis of 4-dimensional qudit
"Pauli"
basis of the Pauli matrices
"PauliX" or "X"
Pauli-X (Hadamard) basis
"PauliY" or "Y"
Pauli-Y basis
"PauliZ" or "Z"
Pauli-Z (computational) basis
"X"[d] or "Y"[d] or "Z"[d]
Generalized Pauli basis in d dimension (for qudits)
"JX" or "JY" or "JZ"
Generalized Spin basis with spin
1
2
(or 2 dimension)
"JX"[j] or "JY"[j] or "JZ"[j]
Generalized Spin basis with spin j (or
2j+1
dimension)
"Fourier"
2-dimensional basis of the quantum Fourier transform
"Fourier"[d]
d-dimensional basis of the quantum Fourier transform
"Schwinger"
2-dimensional Schwinger basis
"Schwinger"[d]
d-dimensional Schwinger basis
"Dirac"
basis of the Dirac (gamma) matrices
▪
Built-in names in the phase space that are informationally complete, include:
​
​
"WignerMIC"
Phase space basis corresponding to the WignerMICPOVM measurement (Minimal Information-ally Complete)
"WignerMIC"[d]
WignerMIC basis in the d-dimension
"GellMannMIC"
Phase space basis corresponding to the GellMannMICPOVM (generalized Pauli) measurements
"GellMannMIC"[d]
GellMann basis in d-dimension
"Tetrahedron"
Phase space basis corresponding to the TetrahedronSICPOVM measurements (Symmetric Information-ally Complete), which eigenstates form vertices of a
Tetrahedron
"Tetrahedron"[a,b,c]
A tetrahedron rotated by
"U"[a,b,c]
gate
"HasseSIC"
3-dimensional
Hasse
basis corresponding to the HasseSICPOVM
"HoggarSIC"
8-dimensional
Hoggar
basis corresponding to the HoggarSICPOVM
"QBismSIC"[d]
numeric SIC from
QBism
research program up-to dimension
d=151
"RandomHaarMIC"
A random MIC basis based on Haar method
"RandomBlochMIC"
A MIC basis based on random Bloch sphere affine transformation
▪
Built-in names in the phase space that are not informationally complete, include:
​
​
"GellMann"
basis of the Gell-Mann matrices
"GellMann"[d]
basis of generalized Gell-Mann matrices for dimension d
"Wigner"
2-dimensional basis of the Wigner phase space operators with respect to the computational basis
"Wigner"[d]
d-dimensional basis of the Wigner phase space operators with respect to the computational basis
"Wootters"
2-dimensional phase space basis
"Wootters"[p]
p-dimensional phase space basis where p is a prime number
"Bloch"
Phase space basis of generalized Bloch coordinates
▪
A few properties of
QuantumBasis
are:
​
​
"Association"
An association with keys the formatted symbols of basis elements, and values the corresponding tensor
"Elements"
Corresponding elements of a basis
"OrthogonalElements"
Corresponding orthogonal elements of a basis
▪
Besides its input and output qudits, a
QuantumBasis
carries a picture, recovered with
qb["Picture"]
. The picture records where the time dependence of a system written in this basis is kept; it is part of the basis identity but says nothing about the basis elements themselves. Built-in pictures are:
​
​
"Schrodinger"
states carry the time dependence and operators are fixed; the default
"Heisenberg"
operators carry the time dependence and states are fixed
"Interaction"
the time dependence is divided between states and operators
"PhaseSpace"
the tag a phase-space basis carries; a basis whose elements form a phase-space frame sets it for itself, and a state expanded in such a basis is a quasi-probability distribution rather than an amplitude vector
▪
A picture may be named positionally, on either side of the basis specification, or given as the
"Picture"
option, and the three forms agree. So
QuantumBasis
["Heisenberg"]
is the default basis in the Heisenberg picture, and
QuantumBasis
["Schrodinger"]
is
QuantumBasis
[]
. A picture may also trail a two-sided specification, as in
QuantumBasis
["X","Y","Heisenberg"]
.
▪
When more than one picture is written, the one written first wins, positional and option alike: the arguments are folded in reverse, so the earliest is applied last.
QuantumBasis
["Heisenberg","Picture""Interaction"]
is in the Heisenberg picture.
▪
A trailing integer is read as a multiplicity rather than a dimension, so
QuantumBasis
["Heisenberg",3]
is three qubits in the Heisenberg picture.
▪
A phase-space basis name sets
"PhaseSpace"
on its own, so a picture normally only needs naming for
"Heisenberg"
and
"Interaction"
.
▪
Such a basis will not be renamed to another picture positionally: its elements, not a label, are what put it in phase space, so
QuantumBasis
["Wigner","Heisenberg"]
is rejected with
QuantumBasis::phaseSpacePicture
. The
"Picture"
option is deliberately left open for code that has actually undone the transform.
▪
The picture travels with the basis into whatever is built on it, so
QuantumState
[spec,"Heisenberg"]
and
QuantumOperator
[spec,"Heisenberg"]
both land in the Heisenberg picture.
▪
Any picture outside the four above is rejected with
QuantumBasis::picture
. A picture followed by a tail that is not a basis specification at all, such as a bare symbol or a non-integer number, is rejected with
QuantumBasis::invalidSpec
naming that tail; a tail that fails on its own terms reports its own reason instead, so an unrecognized basis name gives
QuditBasis::invalidName
and a negative integer gives
QuditBasis::invalidArgs
.
▪
Options for
QuantumBasis
are:
option
default
effect
"Picture"
"Schrodinger"
the picture the basis is written in, one of the four names above
"Label"
None
the label the basis displays under; a named basis, or one given a single dimension, fills this in for itself, so
QuantumBasis
["PauliX"]
is labelled
"PauliX"
and
QuantumBasis
[3]
is labelled
"I"[3]
, while a list of dimensions or an explicit
QuditBasis
leaves it
None
"ParameterSpec"
{}
symbolic parameters the basis depends on, given as
{p,min,max}
triples;
"Parameter"
and
"Parameters"
are accepted as spellings of the same option, and a bare symbol is completed to a unit range
​
Examples  
(37)
Basic Examples  
(11)
Create a 2-dimensional basis:
In[1]:=
QuantumBasis
[2]
Out[1]=
QuantumBasis
Picture: Schrodinger
Rank: 1
Dimension: 2
​

Note with no input, the basis is automatically set to 2D by default:
In[2]:=
QuantumBasis
[2]
QuantumBasis
[]
Out[2]=
True
_________________________________________________________________________________________________________________
Create a 3-dimensional basis:
In[1]:=
QuantumBasis
[3]
Out[1]=
QuantumBasis
Picture: Schrodinger
Rank: 1
Dimension: 3
​

_________________________________________________________________________________________________________________
Create a 2×2×2 dimensional basis (three qubits):
In[1]:=
QuantumBasis
[2,3]
Out[1]=
QuantumBasis
Picture: Schrodinger
Rank: 3
Dimension: 8
​

_________________________________________________________________________________________________________________
Create a composite basis of 2- and 3-dimensional qudits (a qubit with a qutrit):
In[1]:=
QuantumBasis
[{2,3}]
Create a 2-dimensional basis using an explicit element representation with arbitrary names:
Construct a Pauli-Y basis:
Construct a Bell basis for a single 4-dimensional qudit (quqrit):
Return its association (basis names with corresponding representations):
A quantum basis with Pauli-X as the output and computational 2-dimensional basis as the input:
Show its elements:
Return the list of its orthogonalized basis elements:
Represent the 2-dimensional Schwinger basis of rank-2 (matrix) elements:
Every basis is also written in a picture, which defaults to the Schrodinger one:
Name a picture to get the default basis written in it:
The picture may sit on either side of the basis specification, or be given as an option, and the three agree:

© 2026 Wolfram. All rights reserved.

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