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`
B
a
s
i
s
B
a
s
i
s
[
n
]
c
o
n
s
t
r
u
c
t
s
t
h
e
s
t
a
n
d
a
r
d
t
e
n
s
o
r
-
p
r
o
d
u
c
t
b
a
s
i
s
o
f
a
s
y
s
t
e
m
o
f
n
u
n
l
a
b
e
l
l
e
d
q
u
b
i
t
s
.
B
a
s
i
s
[
{
d
i
m
1
,
d
i
m
2
,
…
,
d
i
m
n
}
]
c
o
n
s
t
r
u
c
t
s
t
h
e
s
t
a
n
d
a
r
d
t
e
n
s
o
r
-
p
r
o
d
u
c
t
b
a
s
i
s
o
f
a
t
o
t
a
l
o
f
n
u
n
l
a
b
e
l
l
e
d
s
y
s
t
e
m
s
w
i
t
h
t
h
e
H
i
l
b
e
r
t
s
p
a
c
e
d
i
m
e
n
s
i
o
n
s
d
i
m
1
,
d
i
m
2
,
…
,
d
i
m
n
,
r
e
s
p
e
c
t
i
v
e
l
y
.
B
a
s
i
s
[
q
1
,
q
2
,
…
]
c
o
n
s
t
r
u
c
t
s
t
h
e
t
e
n
s
o
r
p
r
o
d
u
c
t
b
a
s
i
s
f
o
r
t
h
e
s
y
s
t
e
m
c
o
n
s
i
s
t
i
n
g
o
f
s
p
e
c
i
e
s
q
1
,
q
2
,
…
.
B
a
s
i
s
[
q
1
,
{
q
2
,
q
3
}
,
…
]
i
s
e
q
u
i
v
a
l
e
n
t
t
o
B
a
s
i
s
[
q
1
,
q
2
,
q
3
,
…
]
.
B
a
s
i
s
[
e
x
p
r
]
f
i
n
d
s
t
h
e
r
e
l
e
v
a
n
t
s
p
e
c
i
e
s
f
r
o
m
t
h
e
e
x
p
r
e
s
s
i
o
n
e
x
p
r
a
n
d
c
o
n
s
t
r
u
c
t
s
t
h
e
b
a
s
i
s
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
Examples
(
7
)
Basic Examples
(
5
)
This assumes a system of three
unlabelled
qubits. Different qubits are distinguished by their positions in the arguments in
K
e
t
.
I
n
[
1
]
:
=
B
a
s
i
s
[
3
]
O
u
t
[
1
]
=
{
|
0
,
0
,
0
〉
,
|
0
,
0
,
1
〉
,
|
0
,
1
,
0
〉
,
|
0
,
1
,
1
〉
,
|
1
,
0
,
0
〉
,
|
1
,
0
,
1
〉
,
|
1
,
1
,
0
〉
,
|
1
,
1
,
1
〉
}
This assumes a system of three
unlabelled
particles which have the Hilbert space dimensions 2, 2, and 3, respectively.
I
n
[
2
]
:
=
B
a
s
i
s
[
{
2
,
2
,
3
}
]
O
u
t
[
2
]
=
{
|
0
,
0
,
0
〉
,
|
0
,
0
,
1
〉
,
|
0
,
0
,
2
〉
,
|
0
,
1
,
0
〉
,
|
0
,
1
,
1
〉
,
|
0
,
1
,
2
〉
,
|
1
,
0
,
0
〉
,
|
1
,
0
,
1
〉
,
|
1
,
0
,
2
〉
,
|
1
,
1
,
0
〉
,
|
1
,
1
,
1
〉
,
|
1
,
1
,
2
〉
}
For labelled systems, the standard basis states are represented by
K
e
t
[
<
|
…
|
>
]
.
I
n
[
1
]
:
=
L
e
t
[
F
e
r
m
i
o
n
,
c
]
L
e
t
[
B
o
s
o
n
,
a
,
T
o
p
3
]
L
e
t
[
B
o
s
o
n
,
b
,
B
o
t
t
o
m
2
,
T
o
p
4
]
This gives the standard basis of one Fermion labelled by the symbol
c
.
I
n
[
2
]
:
=
b
s
=
B
a
s
i
s
[
c
]
O
u
t
[
2
]
=
{
|
0
c
〉
,
|
1
c
〉
}
This shows that each state in the basis has the form
K
e
t
[
<
|
…
|
>
]
.
I
n
[
3
]
:
=
b
s
/
/
I
n
p
u
t
F
o
r
m
O
u
t
[
3
]
/
/
I
n
p
u
t
F
o
r
m
=
{Ket[<|c -> 0|>], Ket[<|c -> 1|>]}
This gives the standard basis of a system of two-flavor Fermions.
I
n
[
4
]
:
=
B
a
s
i
s
[
c
@
{
1
,
2
}
]
O
u
t
[
4
]
=
0
c
1
0
c
2
,
0
c
1
1
c
2
,
1
c
1
0
c
2
,
1
c
1
1
c
2
More examples follow.
I
n
[
5
]
:
=
B
a
s
i
s
[
a
]
B
a
s
i
s
[
a
,
b
]
B
a
s
i
s
[
{
a
,
b
}
]
O
u
t
[
5
]
=
{
|
0
a
〉
,
|
1
a
〉
,
|
2
a
〉
,
|
3
a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