Download 1 Simulating Classical Circuits

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Quantum decoherence wikipedia , lookup

Renormalization group wikipedia , lookup

Probability amplitude wikipedia , lookup

Boson sampling wikipedia , lookup

Many-worlds interpretation wikipedia , lookup

Quantum fiction wikipedia , lookup

Density matrix wikipedia , lookup

Copenhagen interpretation wikipedia , lookup

Path integral formulation wikipedia , lookup

History of quantum field theory wikipedia , lookup

Orchestrated objective reduction wikipedia , lookup

EPR paradox wikipedia , lookup

Interpretations of quantum mechanics wikipedia , lookup

Quantum group wikipedia , lookup

Quantum computing wikipedia , lookup

Symmetry in quantum mechanics wikipedia , lookup

Quantum machine learning wikipedia , lookup

Hidden variable theory wikipedia , lookup

Quantum state wikipedia , lookup

Quantum key distribution wikipedia , lookup

Quantum teleportation wikipedia , lookup

Canonical quantization wikipedia , lookup

T-symmetry wikipedia , lookup

Transcript
Reversible Computation
A quantum circuit acting on n qubits is described by an 2n × 2n unitary operator U . Since U is unitary,
UU † = U †U = I. This implies that each quantum circuit has an inverse circuit which is the mirror image of
the original circuit and which carries out the inverse operator U † .
g
g
φ
φ
U†
U
The circuits for U and U † are the same size and have mirror image gates. Examples:
H = H†
CNOT = CNOT†
Rθ
= R†−θ
1 Simulating Classical Circuits
Let us first consider whether given any classical circuit there is an equivalent quantum circuit. More concretely, suppose there is a classical circuit that computes a function f (x) ∈ {0, 1}m on input x ∈ {0, 1}n ,
is there a quantum circuit that does the same? Obviously such a quantum circuit must
map computational
f (x) ). A
basis states to computational basis states (i.e. it must map each state of the form x to the state
unitary
basis
states
to basis states must be a permutation. (Indeed, if U x = u and
transformation
taking
U y = u , then x = U −1 u = y .) Therefore m = n and the function f (x) must be a permutation on
the n-bit strings. Since this must hold after every application of a quantum gate, it follows that if a quantum
circuit computes a classical function, then it must necessarily be reversible.
How can a classical circuit C which takes an n bit input x and computes f (x) be made into a reversible
quantum circuit that computes the same function? The circuit must never lose any information, so how
could it compute a function mapping n bits to m < n bits (e.g. a boolean function, where m = 1)? The
way to achieve this is to require that the circuit output both the input x and the output f (x). In addition,
the quantum circuit may need some additional scratch qubits during the computation since individual gates
can’t lose any information either. The consequence of these constraints is illustrated below.
C191,
Fall
2010,
1
x
x
x
f (x)
C
U
=⇒
0
f (x)
0
0
How is this done?
Recall that any classical AND and OR gates can be simulated with a C-SWAP gate and
some scratch 0 qubits.
a
a
C-SWAP b
swap b and c iff a = 1
c
If we construct the corresponding reversible circuit RC, we have a small problem. The CSWAP gates end
up converting input scratch bits to garbage. How do we restore the scratch bits to 0 on output? We use the
fact that RC is a reversible circuit. The sequence of steps for the overall circuit is
C′
(C′ )−1
copy y
(x, 0k , 0m , 0k , 1) −→ (x, y, garbage x , 0k , 1) −→ (x, y, garbage x , y, 1) −→ (x, 0k , 0m , y, 1) .
Overall, this gives us a clean reversible circuit Ĉ corresponding to C.
x
x
RC
x
REV
f (x)
f (x)
RC
COPY
0
0
junk
f (x)
C191,
Fall
f (x)
2010,
2