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`
Phase
​
Phase
[ϕ,s[…,3]]
represents the relative phase shift by ϕ between the positive and negative eigenstates of the Pauli Z operator on qubit
s[…,
$
]
.
​
​
Phase
[ϕ,s[…,1]]
represents the relative phase shift by ϕ between the positive and negative eigenstates of the Pauli X operator on qubit
s[…,
$
]
.
​
​
Phase
[ϕ,s[…,2]]
represents the relative phase shift by ϕ between the positive and negative eigenstates of the Pauli Y operator on qubit
s[…,
$
]
.
​
Examples  
(4)
Basic Examples  
(4)
In[1]:=
Let[Qubit,S]
In[2]:=
op=Phase[ϕ,S[3]]
Out[2]=
z
S
(ϕ)
This is the matrix representation of the relative phase operator.
In[3]:=
Matrix[op]//MatrixForm
Out[3]//MatrixForm=
1
0
0
ϕ

This expresses the operator explicitly in terms of the Pauli operators.
In[4]:=
Elaborate[op]
Out[4]=
1
2
(1+
ϕ

)+
1
2
(1-
ϕ

)
z
S
When it is operated on a state vector or other operators, it is converted automatically to explicit expression.
In[5]:=
op**(Ket[]+Ket[S1])​​op**S[2]
Out[5]=
z
S
(ϕ)|␣〉+
z
S
(ϕ)|
1
S
〉
Out[5]=
z
S
(ϕ)
y
S
In[6]:=
Dagger[op]
Out[6]=
z
S
(-ϕ)
In[7]:=
Let[Real,ϕ]​​Dagger[op]
Out[7]=
z
S
(-ϕ)
​
In[1]:=
Phase[ϕ,S[1]]//Matrix//MatrixForm
Out[1]//MatrixForm=
1
2
+
ϕ

2
1
2
-
ϕ

2
1
2
-
ϕ

2
1
2
+
ϕ

2
In[2]:=
Phase[ϕ,S[2]]//Matrix//MatrixForm
Out[2]//MatrixForm=
1
2
+
ϕ

2
-

2
+
1
2

ϕ


2
-
1
2

ϕ

1
2
+
ϕ

2
In[3]:=
Phase[ϕ,S[3]]//Matrix//MatrixForm
Out[3]//MatrixForm=
1
0
0
ϕ

In[4]:=
Phase[ϕ,S[1,1]]-Exp[I*ϕ/2]*Rotation[ϕ,S[1,1]]//Elaborate​​Phase[ϕ,S[1,2]]-Exp[I*ϕ/2]*Rotation[ϕ,S[1,2]]//Elaborate​​Phase[ϕ,S[1,3]]-Exp[I*ϕ/2]*Rotation[ϕ,S[1,3]]//Elaborate
Out[4]=
0
Out[4]=
0
Out[4]=
0
​
In[1]:=
QuantumCircuit[​​Phase[Pi/4,S[1]],​​Phase[Pi/4,S[2]],​​Phase[Pi/4,S[3]]]
Out[1]=
In[2]:=
qc=QuantumCircuit[Phase[Pi/4,S[3]]]​​op=ExpressionFor[qc]
Out[2]=
Out[2]=
1
2
1+
1/4
(-1)
+
1
2
1-
1/4
(-1)

z
S
In[3]:=
qc**S[1]
Out[3]=
1
2
1+
1/4
(-1)

x
S
-
1
2
-1+
1/4
(-1)

y
S
​
In[1]:=
qc=QuantumCircuit[ControlledGate[S[1],Phase[Pi/4,S[2,3]]]]
Out[1]=
In[2]:=
op=ExpressionFor[qc]
Out[2]=
1
4
3+
1/4
(-1)
+
1
4
-1+
1/4
(-1)

z
S
1
z
S
2
+
1
4
1-
1/4
(-1)

z
S
1
+
1
4
1-
1/4
(-1)

z
S
2
In[3]:=
op**S[2,1]
Out[3]=
1
4
1-
1/4
(-1)

z
S
1
x
S
2
+
1
4
-1+
1/4
(-1)

z
S
1
y
S
2
+
1
4
3+
1/4
(-1)

x
S
2
-
1
4
-1+
1/4
(-1)

y
S
2
SeeAlso
Rotation
 
▪
QuantumCircuit
TechNotes
▪
Quantum Information Systems with Q3
▪
Q3: Quick Start
RelatedGuides
▪
Q3: Symbolic Quantum Simulation
▪
Quantum Information Systems
RelatedLinks
▪
Mahn-Soo Choi (2022)
, A Quantum Computation Workbook (Springer).
""

© 2025 Wolfram. All rights reserved.

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