Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
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
Create a Paclet
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`
Q
u
a
n
t
u
m
C
i
r
c
u
i
t
Q
u
a
n
t
u
m
C
i
r
c
u
i
t
[
a
,
b
,
…
]
r
e
p
r
e
s
e
n
t
s
t
h
e
q
u
a
n
t
u
m
c
i
r
c
u
i
t
m
o
d
e
l
c
o
n
s
i
s
t
i
n
g
o
f
t
h
e
g
a
t
e
o
p
e
r
a
t
i
o
n
s
a
,
b
,
…
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
Examples
(
1
4
)
Basic Examples
(
3
)
Q
u
a
n
t
u
m
C
i
r
c
u
i
t
works for
labeled
qubits. Choose a symbol to refer to a collection of qubits.
I
n
[
1
]
:
=
L
e
t
[
Q
u
b
i
t
,
S
]
Here is a typical example.
I
n
[
2
]
:
=
q
c
=
Q
u
a
n
t
u
m
C
i
r
c
u
i
t
[
S
[
1
,
6
]
,
C
N
O
T
[
S
[
1
]
,
S
[
2
]
]
,
S
[
{
2
,
3
}
,
3
]
]
O
u
t
[
2
]
=
You can always convert the quantum circuit model into the corresponding operator expression in terms of the Pauli operators.
I
n
[
3
]
:
=
o
p
=
E
l
a
b
o
r
a
t
e
[
q
c
]
O
u
t
[
3
]
=
-
Y
S
2
Z
S
3
2
2
+
Z
S
2
Z
S
3
2
2
+
X
S
1
Y
S
2
Z
S
3
2
2
+
X
S
1
Z
S
2
Z
S
3
2
2
+
Y
S
1
Y
S
2
Z
S
3
2
2
+
Y
S
1
Z
S
2
Z
S
3
2
2
+
Z
S
1
Y
S
2
Z
S
3
2
2
+
Z
S
1
Z
S
2
Z
S
3
2
2
I
n
[
4
]
:
=
o
p
=
E
x
p
r
e
s
s
i
o
n
F
o
r
[
q
c
]
O
u
t
[
4
]
=
-
Y
S
2
Z
S
3
2
2
+
Z
S
2
Z
S
3
2
2
+
X
S
1
Y
S
2
Z
S
3
2
2
+
X
S
1
Z
S
2
Z
S
3
2
2
+
Y
S
1
Y
S
2
Z
S
3
2
2
+
Y
S
1
Z
S
2
Z
S
3
2
2
+
Z
S
1
Y
S
2
Z
S
3
2
2
+
Z
S
1
Z
S
2
Z
S
3
2
2
Then, you can operate the expression further on, say, a state vector.
I
n
[
5
]
:
=
o
u
t
=
o
p
*
*
K
e
t
[
]
O
u
t
[
5
]
=
0
S
1
0
S
2
2
-
1
S
1
1
S
2
2
You can directly apply the quantum circuit model on state vectors or other operators as well.
I
n
[
6
]
:
=
n
e
w
=
q
c
*
*
K
e
t
[
]
O
u
t
[
6
]
=
0
S
1
0
S
2
2
-
1
S
1
1
S
2
2
I
n
[
7
]
:
=
o
u
t
-
n
e
w
/
/
G
a
r
n
e
r
O
u
t
[
7
]
=
0
In many cases, the quantum circuit model is automatically converted to an operator expression.
I
n
[
1
]
:
=
(
2
q
c
-
1
)
*
*
K
e
t
[
]
O
u
t
[
1
]
=
(
-
1
+
2
)
0
S
1
0
S
2
-
2
1
S
1
1
S
2
I
n
[
2
]
:
=
(
2
o
p
-
1
)
*
*
K
e
t
[
]
O
u
t
[
2
]
=
(
-
1
+
2
)
0
S
1
0
S
2
-
2
1
S
1
1
S
2
You can also covert the quantum circuit model into a matrix representation in the standard basis.
I
n
[
3
]
:
=
m
a
t
=
M
a
t
r
i
x
@
q
c
;
m
a
t
/
/
M
a
t
r
i
x
F
o
r
m
O
u
t
[
3
]
/
/
M
a
t
r
i
x
F
o
r
m
=
1
2
0
0
0
1
2
0
0
0
0
-
1
2
0
0
0
-
1
2
0
0
0
0
-
1
2
0
0
0
-
1
2
0
0
0
0
1
2
0
0
0
1
2
0
0
1
2
0
0
0
-
1
2
0
0
0
0
-
1
2
0
0
0
1
2
-
1
2
0
0
0
1
2
0
0
0
0
1
2
0
0
0
-
1
2
0
0
Consider a slightly different quantum circuit. Now, it has input specified. In the following quantum circuit, recall that
K
e
t
[
S
@
{
1
,
2
,
3
}
]
is equivalent to
K
e
t
R
e
g
u
l
a
t
e
[
K
e
t
[
]
,
S
@
{
1
,
2
,
3
}
]
.
I
n
[
1
]
:
=
q
c
=
Q
u
a
n
t
u
m
C
i
r
c
u
i
t
[
K
e
t
[
S
@
{
1
,
2
,
3
}
]
,
S
[
1
,
6
]
,
C
N
O
T
[
S
[
1
]
,
S
[
2
]
]
,
S
[
{
2
,
3
}
,
3
]
]
O
u
t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