Examples of Quantum Circuit Diagrams Michal Charemza April 2006

advertisement
Examples of Quantum Circuit Diagrams
Michal Charemza
April 2006
Below some examples of quantum circuit diagrams are given. They are
typset using a modified version of the LATEX package QCircuit. The source
for the present document, the modified QCircuit package, and the project An
Introduction to Quantum Computing from which the diagrams are taken are
available online at http://go.warwick.ac.uk/mtcharemza/pastprojects .
|0i
H
√1 (|0i
2
+ |1i)
Figure 1: Example of Hadamard gate acting on one qubit.
|0i
|1i
Figure 2: Example of a not gate acting on one qubit.
|1i
•
|1i
|0i
|1i
Figure 3: Example of a controlled-not gate.
1
√1
2
(|0i + |1i)
M "%$#
?
Figure 4: Example of a measurement. Note that for the input mixed state
√1 (|0i + |1i), it is unknown what the result of the measurement will be. All
2
that is known is that the result has equal probability of being |0i or |1i.
|1i
•
|1i
|0i
|1i
Figure 5: Example of a controlled-not gate.
√1
2
(|0i + |1i)
M "%$#
?
Figure 6: Example of a measurement. Note that for the input mixed state
√1 (|0i + |1i), it is unknown what the result of the measurement will be. All
2
that is known is that the result has equal probability of being |0i or |1i.
2





















x ∈ F2n














C




















f (x) ∈ F2m













Figure 7: Boolean circuit performing function f : F2n → F2m .
|xi
•
|xi
|yi
•
|yi
|zi
|x ⊕ (y ∧ zi)
Figure 8: Toffoli gate.
•
|xi
•
|yi
|zi
H
Fπ/2
•
•
F3π/2
•
|xi
|yi
Fπ/2
H
Figure 9: Decomposition of a Toffoli gate.
3
|x ⊕ (y ∧ zi)
•
•
|xi
|yi
|0i
|xi
|yi
|x ∧ yi
Figure 10: Toffoli gate as an and gate.
|xi
•
|¬xi
|yi
•
|¬yi
|0i
|x ∨ yi
Figure 11: A Toffoli gate as an or gate.
•
|xi
|0i
•
|0i
|xi
|1i
Figure 12: Toffoli gate as fanout.
4
|xi
|xi




















































|0i (ancilla qubits)
|f (x)i










R


























garbage bits
























Figure 13: Quantum circuit emulating boolean circuit that performs function
f : F2n → F2m .
5
|xi





















•
•
•
•
•
•




















|0i
•
•
R
|xi








|0i




















R−1






















|0i


















































|f (x)i









Figure 14: Quantum circuit emulating boolean circuit that performs function
f : F2n → F2m . Note that this circuit preserves input and ancilla qubits.
a
•
•
b
A
Alice
a
F
b
Bob
•
B
H
M "%$#
a
M "%$#
b
Figure 15: Superdense coding.
6
Alice
|ψi
•
A
M "%$#
H
M "%$#
Bob
•
•
B
|ψi
F
Figure 16: Quantum teleportation.
|xi
























QF TFm
2











..
.
√1
2m











..
.
X
(−1)x.y |yi
y∈Fm
2
Figure 17: Quantum Fourier transform in Fm
2 .
H














|xi 


























H
H
..
.
..
.
H













√1
2m
Figure 18: Decomposition of QFT in Fm
2 .
|ψi
•
•
|φi
|φi
•
|ψi
Figure 19: Swap of two qubits.
7
X
y∈Fm
2
(−1)x.y |yi
|xm−1 i
|xm−2 i
H
φ
φ
|y0 i
φ
•
φ
H
•
|xm−3 i
..
.
|x0 i
|y1 i
φ
•
..
.
..
•
φ
H
.
..
•
.
•
Figure 20: Decomposition of QFT in Z2m .
|0i















=<
Hm
M
..
.
:;
..
.









|yi








Figure 21: Circuit that generates random numbers.
8
H
|y2 i
..
.
|ym−1 i
Download