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`
W
i
c
k
M
e
a
s
u
r
e
m
e
n
t
W
i
c
k
M
e
a
s
u
r
e
m
e
n
t
[
k
]
r
e
p
r
e
s
e
n
t
s
a
m
e
a
s
u
r
e
m
e
n
t
o
f
t
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t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
Examples
(
1
3
)
Basic Examples
(
3
)
Consider a certain number of fermion modes.
I
n
[
1
]
:
=
$
n
=
4
;
Take an initial state.
I
n
[
2
]
:
=
S
e
e
d
R
a
n
d
o
m
[
3
7
0
]
;
I
n
[
3
]
:
=
i
n
=
R
a
n
d
o
m
W
i
c
k
S
t
a
t
e
[
$
n
]
O
u
t
[
3
]
=
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
Make sure it is normalized.
I
n
[
4
]
:
=
N
o
r
m
[
i
n
]
O
u
t
[
4
]
=
1
Pick a fermion mode to perform the measurement on.
I
n
[
5
]
:
=
m
s
r
=
W
i
c
k
M
e
a
s
u
r
e
m
e
n
t
[
1
]
O
u
t
[
5
]
=
W
i
c
k
M
e
a
s
u
r
e
m
e
n
t
[
1
]
Operate the measurement on the input state.
I
n
[
6
]
:
=
o
u
t
=
m
s
r
[
i
n
]
R
e
a
d
o
u
t
[
m
s
r
]
O
u
t
[
6
]
=
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
O
u
t
[
6
]
=
0
Repeatedly perform measurements.
I
n
[
7
]
:
=
{
s
t
a
t
e
s
,
d
a
t
a
}
=
T
r
a
n
s
p
o
s
e
@
T
a
b
l
e
[
{
o
u
t
=
m
s
r
@
i
n
,
R
e
a
d
o
u
t
[
m
s
r
]
}
,
1
0
]
;
I
n
[
8
]
:
=
s
t
a
t
e
s
/
/
A
r
r
a
y
S
h
o
r
t
O
u
t
[
8
]
=
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
,
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
,
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
,
W
i
c
k
S
t
a
t
e
M
o
d
e
s
:
4
P
r
e
f
a
c
t
o
r
:
1
,
…
I
n
[
9
]
:
=
d
a
t
a
O
u
t
[
9
]
=
{
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
0
,
1
}
Let us verify the above results by conventional methods. To analyse the results, consider a specific set of fermion modes.
I
n
[
1
]
:
=
L
e
t
[
F
e
r
m
i
o
n
,
c
]
c
c
=
c
[
R
a
n
g
e
@
$
n
]
c
d
=
J
o
i
n
[
c
c
,
D
a
g
g
e
r
@
c
c
]
O
u
t
[
1
]
=
{
c
1
,
c
2
,
c
3
,
c
4
}
O
u
t
[
1
]
=
c
1
,
c
2
,
c
3
,
c
4
,
†
c
1
,
†
c
2
,
†
c
3
,
†
c
4
I
n
[
2
]
:
=
E
c
h
o
T
i
m
i
n
g
[
a
l
t
=
E
x
p
r
e
s
s
i
o
n
F
o
r
[
M
a
t
r
i
x
[
i
n
]
,
c
c
]
/
/
C
h
o
p
]
⌚
0
.
0
0
8
7
2
3
O
u
t
[
2
]
=
0
.
4
3
7
1
0
5
0
c
1
0
c
2
0
c
3
0
c
4
-
(
0
.
3
9
1
0
1
9
+
0
.
3
0
7
6
8
2
)
0
c
1
0
c
2
1
c
3
1
c
4
+
(
0
.
0
8
3
6
8
3
6
+
0
.
2
2
0
5
5
4
)
0
c
1
1
c
2
0
c
3
1
c
4
+
(
0
.
1
1
6
2
1
8
+
0
.
1
0
0
8
4
9
)
0
c
1
1
c
2
1
c
3
0
c
4
+
(
0
.
1
9
4
9
8
8
+
0
.
1
0
5
6
8
4
)
1
c
1
0
c
2
0
c
3
1
c
4
-
(
0
.
3
8
2
5
9
8
-
0
.
2
7
9
7
8
3
)
1
c
1
0
c
2
1
c
3
0
c
4
+
(
0
.
0
7
7
4
6
0
7
+
0
.
2
6
2
2
3
5
)
1
c
1
1
c
2
0
c
3
0
c
4
+
(
0
.
3
5
7
1
7
8
-
0
.
0
7
6
5
3
8
2
)
1
c
1
1
c
2
1
c
3
1
c
4
Define the projection operator for each outcome.
I
n
[
3
]
:
=
C
l
e
a
r
[
p
r
j
]
p
r
j
[
0
]
:
=
A
b
s
S
q
u
a
r
e
L
e
f
t
[
c
@
F
i
r
s
t
@
m
s
r
]
p
r
j
[
1
]
:
=
A
b
s
S
q
u
a
r
e
R
i
g
h
t
[
c
@
F
i
r
s
t
@
m
s
r
]
Get the post-measurement states by applying the projection operators corresponding to the outcomes.
I
n
[
4
]
:
=
m
i
n
t
=
C
h
o
p
@
K
e
t
N
o
r
m
a
l
i
z
e
[
(
p
r
j
/
@
d
a
t
a
)
*
*
a
l
t
]
;
Compare the post-measurement states from the two methods.
I
n
[
5
]
:
=
v
v
=
M
a
t
r
i
x
[
s
t
a
t
e
s
,
c
c
]
;
w
w
=
C
a
n
o
n
i
c
a
l
i
z
e
V
e
c
t
o
r
/
@
M
a
t
r
i
x
[
m
i
n
t
,
c
c
]
;
v
v
-
w
w
/
/
A
r
r
a
y
Z
e
r
o
Q
O
u
t
[
5
]
=
T
r
u
e
Let us examine the distribution of measurement outcomes. To do that, first calculate the probability to get 0.
I
n
[
1
]
:
=
p
r
b
=
D
a
g
g
e
r
[
a
l
t
]
*
*
p
r
j
[
0
]
*
*
a
l
t
/
/
C
h
o
p
O
u
t
[
1
]
=
0
.
5
1
7
9
4
9
Perform the measurement repeatedly many times.
I
n
[
2
]
:
=
d
a
t
a
=
T
a
b
l
e
[
m
s
r
@
i
n
;
R
e
a
d
o
u
t
[
m
s
r
]
,
s
a
m
p
l
e
s
=
1
0
0
0
]
;
I
n
[
3
]
:
=
H
i
s
t
o
g
r
a
m
[
d
a
t
a
,
P
l
o
t
R
a
n
g
e
{
0
,
s
a
m
p
l
e
s
}
,
F
r
a
m
e
L
a
b
e
l
{
"
o
u
t
c
o
m
e
"
,
"
c
o
u
n
t
s
"
}
]
O
u
t
[
3
]
=
S
c
o
p
e
(
3
)
A
p
p
l
i
c
a
t
i
o
n
s
(
3
)
P
r
o
p
e
r
t
i
e
s
&
R
e
l
a
t
i
o
n
s
(
4
)
S
e
e
A
l
s
o
W
i
c
k
S
t
a
t
e
▪
W
i
c
k
U
n
i
t
a
r
y
▪
W
i
c
k
N
o
n
u
n
i
t
a
r
y
▪
W
i
c
k
C
i
r
c
u
i
t
▪
R
a
n
d
o
m
W
i
c
k
C
i
r
c
u
i
t
S
i
m
u
l
a
t
e
▪
N
a
m
b
u
U
n
i
t
a
r
y
▪
N
a
m
b
u
H
e
r
m
i
t
i
a
n
▪
N
a
m
b
u
G
r
e
e
n