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 Object Composition

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • Bell's Theorem: CHSH inequality
  • Circuit Diagram
  • Exploring Fundamentals of Quantum Theory
  • QPU Service Connection
  • Quantum object abstraction
  • Quantum Optimization
  • Second Quantization Functions
  • Tensor Network
  • Quantum Computation

Symbols

  • CliffordChannel
  • EinsteinSummation
  • GraphState
  • LocalComplement
  • PauliStabilizer
  • 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`
PauliStabilizer
​
PauliStabilizer
[]
represents an empty stabilizer state, equivalent to the single-qubit register
|0〉
.
​
​
PauliStabilizer
[n]
represents the
n
-qubit
|0⋯0〉
register state, with stabilizers
Z
i
.
​
​
PauliStabilizer
[{
stab
1
,
stab
2
,…}]
constructs a stabilizer state from a list of Pauli strings.
​
​
PauliStabilizer
[{stabs},{destabs}]
constructs a stabilizer state with explicit stabilizers and destabilizers.
​
​
PauliStabilizer
[name]
returns a named stabilizer state. Names:
"5QubitCode"
,
"SteaneCode"
,
"9QubitCode"
, their
"·1"
siblings, and
"Random"
.
​
​
PauliStabilizer
["Random",n]
returns a uniformly random
n
-qubit Clifford state via the Mallows sampler.
​
​
PauliStabilizer
[qs]
converts a
QuantumState
,
QuantumOperator
, or
QuantumCircuitOperator
to a stabilizer state (Clifford only).
​
​
ps[method,…]
applies a dispatched gate, measurement, or property accessor.
​
​
ps[
ps
2
]
composes two stabilizer states (apply
ps
2
first, then
ps
).
​
Details and Options
▪
A
PauliStabilizer
encodes an n-qubit pure stabilizer state by a tableau of Pauli generators plus signs, requiring
O(
2
n
)
memory.
▪
The internal representation is an Association
"Tableau"t,"Signs"s
where
t
is a rank-3 binary array of shape
{2,n,2n}
(X-block, Z-block; n qubits;
2n
rows: destabilizers then stabilizers) and
s
is a length-
2n
list of
±1
signs.
▪
Equivalent serialization keys are also accepted:
"Phase"
(=
1-Signs
2
) and
"Matrix"
(the flat
2n×2n
binary tableau).
▪
Stabilizer rows are the n parity-check generators of the codespace. Destabilizer rows complete the symplectic basis and are required for measurement and
"Dagger"
. String-list constructors auto-generate destabilizers via
Reverse
; supply them explicitly with the two-list form to avoid singular fixtures.
▪
Named codes follow the convention that
"5QubitCode"
encodes
|
0
L
〉
(the +1 eigenstate of logical
Z
), and the
"·1"
sibling encodes
|
1
L
〉
.
▪
PauliStabilizer
["Random",n]
uses the Bravyi-Maslov / Koenig-Smolin (arXiv:1406.2170) Mallows sampler for uniform sampling over the
n
-qubit Clifford group modulo Paulis.
▪
A stabilizer state
ps
supports two access patterns: properties via
ps["Property"]
(e.g.
"Stabilizers"
,
"Tableau"
,
"State"
) and methods via
ps["Method",…]
(e.g. Clifford gates, measurement,
"InnerProduct"
). The full list of accepted strings is available via
ps["Properties"]
.
▪
Clifford gate updates run in
O(
2
n
)
time using the Aaronson-Gottesman tableau (arXiv:quant-ph/0406196). Single-qubit gates:
"H"
,
"S"
,
†
"S"
,
"X"
,
"Y"
,
"Z"
,
"V"
. Two-qubit gates:
"CNOT"
(or
"CX"
),
"CZ"
,
"SWAP"
.
▪
Non-Clifford gates
"P"[θ]
,
"T"
, and
†
"T"
return a
StabilizerFrame
(a coherent superposition of stabilizer states) rather than a
PauliStabilizer
. The frame closes under further Clifford gates.
▪
Symbolic measurement (Fang-Ying 2023, arXiv:2311.03906) via
"SymbolicMeasure"
allocates a fresh
s.[k]
outcome symbol per non-deterministic measurement, yielding a single PauliStabilizer with symbolic phase. Resolve via
"SubstituteOutcomes"
or
"SampleOutcomes"
.
▪
The option
Method
on
ps["InnerProduct",other]
selects between exact state-vector materialization (
"Direct"
, default) and the closed-form Garcia-Markov-Cross algorithm (
"ClosedForm"
, arXiv:1210.6646).
"Method"
"Direct"
the algorithm to use when computing the inner product
▪
Possible
"Method"
values:
"Direct"
default
materialize state vectors and compute exactly (O(2^n), recovers complex phase)
"ClosedForm"
​
closed-form O(n^3) magnitude only, no complex phase (concrete signs only)
​
Examples  
(98)
Basic Examples  
(6)
The empty form constructs the single-qubit "|0〉" register:
In[1]:=
PauliStabilizer
[]
Out[1]=
PauliStabilizer

{Z}
(
0
1
)

​
For a multi-qubit register, pass the qubit count:
In[1]:=
PauliStabilizer
[3]
Out[1]=
PauliStabilizer

{ZII,IZI,IIZ}
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1

​
Construct a Bell state from two Pauli-string stabilizers:
In[1]:=
PauliStabilizer
[{"XX","ZZ"}]
Out[1]=
PauliStabilizer

{XX,ZZ}
1
1
0
0
0
0
1
1

​
Construct a named stabilizer code:
In[1]:=
PauliStabilizer
["5QubitCode"]
Out[1]=
PauliStabilizer

{XZZXI,IXZZX,XIXZZ,ZXIXZ,ZZZZZ}
1
0
0
1
0
0
1
1
0
0
0
1
0
0
1
0
0
1
1
0
1
0
1
0
0
0
0
0
1
1
0
1
0
1
0
1
0
0
0
1
0
0
0
0
0
1
1
1
1
1

​
Sample a random Clifford state via the Mallows sampler:
In[1]:=
Module{},SeedRandom[42];
PauliStabilizer
["Random",3]
Out[1]=
PauliStabilizer

{-XIY,XYY,-XII}
-
-
1
0
1
0
0
1
1
1
1
0
1
1
1
0
0
0
0
0

​
Build a 3-qubit GHZ state by applying Clifford gates:
In[1]:=
PauliStabilizer
[3]["H",1]["CNOT",1,2]["CNOT",2,3]
Out[1]=
PauliStabilizer

{XXX,ZZI,IZZ}
1
1
1
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1

Scope  
(42)

Generalizations & Extensions  
(2)

Options  
(34)

Applications  
(3)

Properties & Relations  
(5)

Possible Issues  
(5)

Neat Examples  
(1)

SeeAlso
StabilizerFrame
 
▪
StabilizerStateQ
 
▪
GraphState
 
▪
LocalComplement
 
▪
CliffordChannel
 
▪
QuantumState
 
▪
QuantumOperator
 
▪
QuantumCircuitOperator
 
▪
QuantumMeasurementOperator
 
▪
QuantumChannel
 
▪
PauliMatrix
 
▪
KroneckerProduct
RelatedGuides
▪
Wolfram Quantum Computation Framework
""

© 2026 Wolfram. All rights reserved.

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