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

Q3mini

Guides

  • Fermionic Quantum Computation
  • Q3: Symbolic Quantum Simulation
  • Quantum Information Systems
  • Quantum Many-Body Systems
  • Quantum Spin Systems

Tech Notes

  • About Q3
  • Q3: Quick Start
  • Quantum Fourier Transform
  • Quantum Information Systems with Q3
  • Quantum Many-Body Systems with Q3
  • Quantum Operations
  • Quantum Spin Systems with Q3
  • Quantum States
  • Quantum Teleportation
  • Quick Quantum Computing with Q3

Symbols

  • Basis
  • Boson
  • Bra
  • CNOT
  • ControlledGate
  • ExpressionFor
  • Fermion
  • Heisenberg
  • Ket
  • Let
  • Majorana
  • Matrix
  • Multiply
  • NambuGreen
  • NambuHermitian
  • NambuMatrix
  • NambuUnitary
  • Pauli
  • Phase
  • QuantumCircuit
  • Qubit
  • Qudit
  • RandomWickCircuitSimulate
  • Rotation
  • Species
  • Spin
  • SWAP
  • WickCircuit
  • WickEntanglementEntropy
  • WickEntropy
  • WickGreenFunction
  • WickJump
  • WickLindbladSolve
  • WickLogarithmicNegativity
  • WickMeasurement
  • WickMonitor
  • WickMutualInformation
  • WickNonunitary
  • WickSimulate
  • WickState
  • WickUnitary

Overviews

  • The Postulates of Quantum Mechanics
  • Quantum Algorithms
  • Quantum Computation: Models
  • Quantum Computation: Overview
  • Quantum Error-Correction Codes
  • Quantum Information Theory
  • Quantum Noise and Decoherence
QuantumMob`Q3mini`
Qubit
​
Qubit
is a species representing a quantum two-level system or quantum bit.
​
Details and Options

Examples  
(10)
Basic Examples  
(7)
Declare S as the symbol to refer to a quantum register of qubits.
In[1]:=
Let[Qubit,S]
This is how you can manually specify the logical basis states.
In[2]:=
vec=Ket[S[1]1,S[2]1]
Out[2]=

1
S
1
1
S
2

In[3]:=
vec//InputForm
Out[3]//InputForm=
Ket[<|S[1, $] -> 1, S[2, $] -> 1|>]
Here are short lists of the Pauli operators acting on qubit S[1,$].
In[4]:=
S[1,All]
Out[4]=

X
S
1
,
Y
S
1
,
Z
S
1

In[5]:=
S[1,Full]
Out[5]=

0
S
1
,
X
S
1
,
Y
S
1
,
Z
S
1

Here is a more complete list of elementary quantum operators acting on qubit S[1,$].
In[6]:=
S[1,0](*Identityoperator*)​​S[1,1](*PauliXoperator*)​​S[1,2](*PauliYoperator*)​​S[1,3](*PauliZoperator*)​​S[1,4](*Pauliraisingoperator*)​​S[1,5](*Pauliloweringoperator*)​​S[1,6](*Hadamardgate*)​​S[1,7](*Quadrant(2π/4)phasegate*)​​S[1,8](*Octant(2π/8)phasegate*)​​S[1,9](*Hexadecant(2π/16)phasegate*)​​S[1,10](*ProjectionintoKet[0]*)​​S[1,11](*ProjectionintoKet[1]*)
Out[6]=
X
S
1
Out[6]=
Y
S
1
Out[6]=
Z
S
1
Out[6]=
+
S
1
Out[6]=
-
S
1
Out[6]=
H
S
1
Out[6]=
S
S
1
Out[6]=
T
S
1
Out[6]=
F
S
1
Out[6]=
(|0〉〈0|)
S
1
Out[6]=
(|1〉〈1|)
S
1
In[7]:=
QuantumCircuit[S[0],S[1],S[2],S[3]]
Out[7]=
In[8]:=
QuantumCircuit[S[6],S[7],S[8],S[9]]
Out[8]=
In[9]:=
QuantumCircuit[Dagger@S[7],Dagger@S[8],Dagger@S[9]]
Out[9]=
​
S[1,-n]
with (n>0) represents the Hermitian conjugate of
S[1,n]
.
In[1]:=
S[1,-1](*EquivalenttoS[1,1]*)​​S[1,-2](*EquivalenttoS[1,2]*)​​S[1,-3](*EquivalenttoS[1,3]*)​​S[1,-4](*EquivalenttoS[1,5]*)​​S[1,-5](*EquivalenttoS[1,4]*)​​S[1,-6]​​S[1,-7]​​S[1,-8]​​S[1,-9]
Out[1]=
X
S
1
Out[1]=
Y
S
1
Out[1]=
Z
S
1
Out[1]=
-
S
1
Out[1]=
+
S
1
Out[1]=
H
S
1
Out[1]=
†
S
S
1
Out[1]=
†
T
S
1
Out[1]=
†
F
S
1
S[…,
C
[n]]
denotes the phase gate,
Phase
[2π/
n
2
,S[…,
3
]]
.
In[2]:=
S[1,C[1]](*Z,thePauliZ*)​​S[1,C[2]](*
Z
,thequadrant*)​​S[1,C[3]](*
4
Z
,theoctant*)​​S[1,C[4]](*
5
Z
,thehexadecant*)​​S[1,C[5]]​​S[1,C[6]]
Out[2]=
Z
S
1
Out[2]=
S
S
1
Out[2]=
T
S
1
Out[2]=
F
S
1
Out[2]=
2π
5
2
S
1
Out[2]=
2π
6
2
S
1
In[3]:=
QuantumCircuit[S[1,C[5]],S[1,C[6]],S[1,C[7]]]
Out[3]=
In[4]:=
Dagger@S[1,C[1]](*Z,thePauliZ*)​​Dagger@S[1,C[2]](*
Z
,thequadrant*)​​Dagger@S[1,C[3]](*
4
Z
,theoctant*)​​Dagger@S[1,C[4]](*
5
Z
,thehexadecant*)​​Dagger@S[1,C[5]]​​Dagger@S[1,C[6]]
Out[4]=
Z
S
1
​
You can get a list of elementary operators on a particular qubit S[1,$] by putting a list in the final flavor index.
You can get a list of operators of same type acting on different qubits by putting a list in the first flavor index.
​
​
Out[1]//TeXForm=
S_1^{ ext{Z}}
Out[2]//TeXForm=
S_1^{
rac{2 \pi }{2^5}}
Out[3]//TeXForm=
S_1^{-
rac{2 \pi }{2^5}}
​
​
Out[5]//TeXForm=
S_4^+

© 2025 Wolfram. All rights reserved.

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