0% found this document useful (0 votes)
24 views12 pages

Equivalent Quantum Circuits

This document discusses equivalent quantum circuits and provides some rules for transforming quantum circuits. It begins with an overview of quantum computation and quantum information units called qubits. It then introduces the concept of representing quantum algorithms and protocols as quantum circuits. The rest of the document provides examples of applying equivalence rules to analyze basic quantum teleportation and dense coding protocols.

Uploaded by

Seong Gon Kim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views12 pages

Equivalent Quantum Circuits

This document discusses equivalent quantum circuits and provides some rules for transforming quantum circuits. It begins with an overview of quantum computation and quantum information units called qubits. It then introduces the concept of representing quantum algorithms and protocols as quantum circuits. The rest of the document provides examples of applying equivalence rules to analyze basic quantum teleportation and dense coding protocols.

Uploaded by

Seong Gon Kim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Equivalent Quantum Circuits

Juan Carlos Garcia-Escartin and Pedro Chamorro-Posada


Universidad de Valladolid, Dpto. Teorı́a de la Señal e Ing. Telemática, Paseo Belén no 15, 47011 Valladolid, Spain∗
(Dated: October 14, 2011)
Quantum algorithms and protocols are often presented as quantum circuits for a better under-
standing. We give a list of equivalence rules which can help in the analysis and design of quantum
circuits. As example applications we study quantum teleportation and dense coding protocols in
terms of a simple XOR swapping circuit and give an intuitive picture of a basic gate teleportation
circuit.

I. THE CIRCUIT POINT OF VIEW the basics can skip. In Section III we set down the no-
arXiv:1110.2998v1 [quant-ph] 13 Oct 2011

tation and define all the gates we will employ in the rest
Quantum communication and computation study in- of the paper. Section IV gives the list of transformation
formation transmission and processing as physical phe- rules. Sections V and VI present some simple quantum
nomena that follow the laws of quantum mechanics. Con- computation blocks which appear in many applications.
sidering quantum mechanics introduces new possibilities Finally, Section VII goes through some examples in which
like private communication with quantum cryptography the given rules can be used to understand basic quantum
or efficient factoring algorithms among others1,2 . protocols.
Most quantum information protocols and algorithms
can be explained as a sequence of transformations ap- II. FUNDAMENTALS OF QUANTUM
plied to a known initial state and a final measurement COMPUTATION
stage. The intermediate evolution is usually the key to
the procedure. This state evolution can be studied from
A. The quantum information unit: the qubit
different perspectives. In this paper we take the point of
view of quantum circuits.
In electronic and electrical engineering the circuit rep- Information can be represented in many possible for-
resentation is routinely used to study classical electronic mats. In this paper we consider discrete quantum infor-
circuits. Circuit equivalences help to analyse complex mation units, the qubits.
processing blocks or to explain different logical opera- In classical computers, information is stored in bits
tions. We present some quantum circuit equivalences that can be either 0 or 1. Their quantum counterpart,
which can play a similar role in quantum computation. the qubits, are binary quantum information units that
Many of these equivalence rules have been used before can exist in an arbitrary superposition of states of the
in quantum circuit analysis3–6 . We compile some of the form
most useful and provide new derivations. |ψi = α|0i + β|1i, (1)
Most of the conventions for quantum circuit represen- 2 2 2 2
where |α| and |β| , such that |α| + |β| = 1, are the
tation are taken from classical circuits. There are some
respective probabilities of finding |0i and |1i after a mea-
wires (usually represented as lines) which carry the sig-
surement in the {|0i, |1i} basis. Figure 2 shows the circuit
nals (states) to different points of the circuit. The basic
representation of a measurement. A measurement on a
operations are represented as gates. Figure 1 shows two
qubit has two possible outcomes which can be associated
example circuits, a classical circuit (a half adder), and a
to the binary value of a classical bit.
generic quantum circuit. We follow the usual convention
of a state going from left to right, like an electrical signal
traversing the electronic elements.

FIG. 2: Measurement in a quantum circuit. The binary out-


come of the measurement can be associated to a classical bit a,
which takes value 0 if the state |0i is found (with probability
|α|2 ) and takes value 1 when the state is |1i (with probability
|β|2 ).

FIG. 1: Classical logical circuit (left) and quantum logical B. Multiple qubits: tensor product and
circuit (right). entanglement

The paper starts with a brief review of quantum com- A system with n qubits can be expressed as a com-
putation (Section II) which readers already familiar with plex vector in a Hilbert space of dimension 2n . If the
2

qubits are not correlated, the composite system comes NOT, XOR. . . ). A combination of quantum gates forms
from taking the tensor product of the individual state of a quantum circuit. An n-qubit quantum gate can be
the n qubits (see2 for a good operational description). defined as a system that performs a determined operation
Tensor products are indicated by the symbol ⊗. Two on n input qubits so that for each input value there is
states |ψ1 i and |ψ2 i have a joint state |ψi = |ψ1 i ⊗ |ψ2 i. a defined associated output. Superpositions of different
Any complex unit vector in our Hilbert space repre- input states will produce the corresponding superposition
sents a valid quantum state. However, not all the valid of output states.
states can be expressed as a collection of independent We will treat the operations of quantum computing
qubits. When the state can only be described as a whole, from a circuital point of view. In the circuital model,
we say it is entangled. gates are presented following the classical circuit conven-
Entanglement is probably the most counterintuitive re- tion: the input is drawn at the left and the circuit gates
sult from quantum mechanics and is an essential resource are presented in order of application from left to right.
in quantum information. In Section VII we will see that The input qubits travel through all these gates and, at
the striking properties of the quantum dense coding and the output of the circuit, at the right, they emerge trans-
teleportation protocols boil down to the capacity of shar- formed.
ing long distance correlations. Quantum gates can be grouped into families. We will
be mostly concerned with three kinds of gates: single
qubit gates, controlled gates and classically controlled
C. Quantum gates gates.

Quantum evolution can be described with unitary op-


erators U acting on the quantum states. The physical A. Single qubit gates
system which provides such a unitary evolution is called
a quantum gate. Evolution through unitary operators Unlike classical logic, which only admits the NOT op-
is indicated by multiplication. If we start from a state eration for single bits, the complex nature of the probabil-
|ψ0 i and apply unitary operator U1 to obtain state |ψ1 i, ity amplitudes associated to each quantum logical value
this is written as |ψ1 i = U1 |ψ0 i. A sequence of oper- and the ability to form superpositions allow for a richer
ators U1 , U2 , U3 , . . . Un applied in order of increasing interplay in a single qubit.
index (first U1 , then U2 and so on) is written from left In many applications we will only need three different
to right |ψn i = Un Un−1 · · · U2 U1 |ψ0 i. The operator clos- single qubit gates: NOT, Hadamard and Z gates.
est to the initial state |ψ0 i is the one which is applied
first. This sequence is equivalent to a single operator
U = Un Un−1 · · · U2 U1 . 1. X gate
The order can be better understood from a simple rep-
resentation in terms of linear algebra operators. For most The NOT, or X, gate is the quantum generalization of
quantum information purposes, we can imagine states the classical NOT gate and flips the value of the qubit
from a space of dimension N are complex column vec- it is acting on. After an X gate, |0i becomes |1i and
tors with N rows and the operators Ui are N × N uni- |1i becomes |0i. Usually, this is written as X|xi = |x ⊕
tary matrices. Unitary operators (and matrices) do not 1i, where ⊕ is used to account for a XOR, or modulo 2
commute in general. This is why the right order must be addition, operation (see Table I).
preserved.
If we only act on some of the individual qubits, the XOR
effect on the joint system can be described using a tensor
a b a⊕b
product of operators. We place an identity operator I
for all the positions in which there is no change. For 0 0 0
instance, in the quantum circuit of Figure 1 the global 0 1 1
evolution is given by U = (U3 ⊗ I ⊗ U4 )U2 (U1 ⊗ I ⊗ I), 1 0 1
where I is the qubit identity. Notice the gate order. In 1 1 0
the circuit representation gates are written from left to
right. We imagine a quantum state travelling to the right TABLE I: Truth table for the XOR logical operation.
which sees a series of different gates on its way out of the
circuit.

III. BASIC QUANTUM GATES 2. H gate

Quantum gates are quantum analogous to the digital The operation of the H gate can be seen from its ef-
gates of electronic digital computers (such as AND, OR, fect on the states of the computational basis, {|0i, |1i}.
3

These states are transformed into two orthogonal super- Unlike classical multiple bit gates, quantum gates are
positions always reversible and can create entanglement between
qubits. Entangling gates, i.e. gates that can entangle
|0i + |1i independent qubits, play a fundamental role in quantum
H|0i = |+i = √ (2)
2 information. In particular, controlled operations provide
an intuitive formulation of qubit interactions.
and A controlled operation, CU , applies the quantum gate
|0i − |1i U on a group of qubits, the target qubits, if another set of
H|1i = |−i = √ . (3) qubits, the control qubits, have a particular value. Con-
2 trol qubits do not change during the process. We follow
Superpositions of |0i and |1i result in the corresponding the usual notation that represents a control by a dot if
superpositions of |+i and |−i. A compact way to express the gate is activated by a |1i state or a blank circle if it
the operation is is the |0i state that activates U . A controlled gate can
have multiple controls acting on a general U operation
|0i + (−1)x |1i that can involve multiple qubits. A gate with more than
H|xi = √ (4) one control is only applied if all the conditions are si-
2
multaneously met and will act as the identity operator
where |xi is a state from the computational basis (x is otherwise.
either 0 or 1). From the whole range of controlled operations, we will
This gate is its own inverse, as H|+i = |0i and H|−i = deal primarily with two: the CZ and CNOT operations.
|1i.

1. CZ gate
3. Z gate
Controlled Z, CZ, is the controlled version of the Z
The Z gate performs a sign shift when the value of the gate. This gate applies a Z operation on the target qubit
qubit is |1i and does nothing otherwise. The operation when the control is |1i. It can also be described as a con-
can be written as Z|xi = (−1)x |xi. The Z gate belongs to ditional operation that performs a sign shift only when
a more general family of phase shift gates which introduce the two qubit state is |11i. From that point of view, it is
a Φ phase shift on the |1i state. The Z gate corresponds sometimes referred to as the controlled sign, CS, gate.
to a phase shift of Φ = π. The effect on a two qubit state |xi|yi from the compu-
tational basis can be summed up as
CZ
|xi|yi −→ (−1)x·y |xi|yi. (5)

FIG. 3: Operation of selected one-qubit gates and their circuit


representations.

Figure 3 sums up the operation of each of these gates


and provides the most usual circuit representation which
will be used in later circuits. It is worth noticing that the
three gates are their own inverses. A second application FIG. 4: Operation of selected controlled gates and their cir-
of any of them will undo the effect of the first one. cuit representations.

B. Multiple qubit gates and controlled operations


2. CNOT gate
Multiple qubit gates describe complex operations that
imply more than one qubit. Although arbitrarily com- The most widely used two qubit gate is the CNOT, or
plex gates can be defined, most quantum circuits are CX, gate. It is the controlled version of the X gate and
based on single and two qubit operations, or n qubit performs a selective negation of the target qubit. The
gates from families that allow a simple definition, like effect of a CNOT gate can be compared to the classical
Quantum Fourier Transform blocks. XOR operation. After a CNOT gate, the control qubit
4

is kept while the target now holds the logical XOR of b, a state |xi from the computational basis becomes |x⊕bi
control and target so that and
CN OT |xi|yi = |xi|x ⊕ yi. (6) cX(α|0i + β|1i) = α|0 ⊕ bi + β|1 ⊕ bi. (8)
From all the equivalent gates that are essential for Figure 5 portrays the most extended notation for clas-
quantum computation, the CNOT gate is probably the sical controlled gates. Classical information is transmit-
most well known and it is almost universally used as ted through classical wires, represented by double lines,
a fundamental building block of quantum applications. while the quantum part is represented as usual. Control
The CNOT gate, when combined with single qubit gates, is indicated, as in quantum controlled gates, by a dot on
can provide any desired quantum operation7 . the control bit. The dot is connected by double, classical,
Figure 4 shows the usual pictorial representation of the lines to the controlled gate.
CZ and CNOT gates, along with the description of their
effect on a generic pair of qubits that need not to be
separable.
It is sometimes useful to introduce an additional repre-
sentation of the controlled operations. Truth tables like
those employed to illustrate the concepts of classical logic
can also be given for quantum gates. Table II presents
the truth tables for the CZ and CNOT gates.

CZ gate CNOT gate

IN OUT IN OUT FIG. 5: Operation of selected classically controlled gates and


their circuit representations.
|00i → |00i |00i → |00i
|01i → |01i |01i → |01i
|10i → |10i |10i → |11i
|11i → −|11i |11i → |10i IV. TRANSFORMATION RULES

TABLE II: Truth tables for the CZ and CNOT gates.


Quantum algorithms and protocols are usually ex-
pressed in terms of the quantum circuits that implement
Superpositions of input states lead to a superposition them. Quantum circuits are formed by a series of ele-
of the corresponding output states conserving the asso- mentary gates that produce the final unitary operation.
ciated probability amplitudes. The sequence of elementary gates is not unique and can
be chosen from a number of equivalent circuits.
In this section, we give some basic equivalences that
C. Classically controlled gates can help us to find simpler physical implementations for a
particular application or to design operations when there
In some cases, classical and quantum information need are particular constraints, usually physically motivated.
to be combined. We can define controlled operations in Additionally, these gate equivalences permit to study the
which the control is a classical bit. We will denote a connections between a variety of applications that, on
classically controlled U gate as cU . The small c indicates first sight, seem different, but are intimately connected.
the control is classical instead of quantum. The equivalences will be presented as a series of gen-
eral rules, followed by the description of some useful
cases. The circuits will be mostly composed of H, CZ and
1. cZ gate CNOT gates and measurements. The point of view will
be clearly circuital, with a stress on the usual schematic
The cZ gate will produce a sign shift when the control representation of the gates and circuits.
bit is 1 and the state of the qubit is |1i. For a control
bit a, a state |xi from the computational basis becomes Rule I: Null gates.
(−1)a·x |xi and
cZ(α|0i + β|1i) = α|0i + (−1)a β|1i. (7) Some gates, under certain conditions, have no effect on
the qubits they are applied to. Gates that are grouped with
their inverses, have a null control or act on the opera-
2. cX gate tions’ eigenstates with eigenvalue 1, belong to this class.

The cX gate acts in a similar way, but producing a One group of equivalences is the set of the various ways
NOT operation instead of a sign shift. For a control bit of writing the identity operation. Some gate combina-
5

tions, or certain gates under particular conditions, are The CNOT, or CX, operation can be described in
equivalent to the no operation and can be removed from terms of a CZ gate. The X gate can be decomposed
the quantum circuit without a change of the global op- as a sequence of three single qubit gates, two Hadamard
eration, as long as the conditions are kept. gates and a Z gate, so that X = HZH and CN OT =
Every unitary operation has an inverse. Quantum (I ⊗ H)CZ(I ⊗ H) (Figure 8). When the control is |0i,
gates occasionally appear followed by their inverses. A the two Hadamard gates cancel each other and, when it
gate U immediately followed by its inverse U † = U −1 is |1i, the combination of gates acts as a NOT.
has no net effect on the input state. Usually, when dif-
ferent functional blocks are chained, these cancellations
arise. Separating the elementary operations is essential
in the analysis of equivalent circuits. We can add gates
that cancel each other to better identify the constitutive
blocks of the circuit or use the equivalences to simplify FIG. 8: CNOT with a CZ gate and two H gates.
circuits in order to save scarce resources in a physical
implementation of a particular operation. Figure 9 shows how this decomposition of the CNOT
gate, together with the control reversal property of the
Figure 6 shows three kinds of null operation that do
CZ gate, can be used to find equivalent circuits. The
not affect the state of the system. The first identity is
control of a CNOT gate can be transferred to the former
based on the fact that H, X and Z gates are their own
target when surrounded by the appropriate combination
inverses. If any of them is repeated two times in a row,
of H gates.
the first one is cancelled by the second. The same can be
The starting point is a CZ gate cornered by four
said of CNOT, CZ and CH gates.
Hadamard operations. Grouping the gates in the differ-
ent qubits, it is easy to see that, in a CNOT with a control
sandwiched between two H gates, control and target are
interchangeable terms. For the reversal, we consider the
gate (H ⊗ I)CN OT (H ⊗ I) = (H ⊗ I)(I ⊗ H)CZ(I ⊗
FIG. 6: Null operations.
H)(H ⊗ I). The CZ gate can be reversed and grouped
with the upper Hadamard gates to give the lower qubit
controlled CNOT.
There is also a CNOT null operation. The |+i and
|−i states are the eigenstates for the X operation, with
eigenvalues 1 and -1. As a consequence, the |+i state is
not affected by an X gate and, as control qubits do not
change, a CNOT with a target |+i state has no effect.
Finally, controlled gates with a control qubit |0i can
also be ignored. In that case, they are not active and are
equivalent to the identity operation.

Rule II: Control reversal.


FIG. 9: CNOT and H gates reversal.
In controlled gates, the roles of control and target qubits
can sometimes be exchanged. In particular, CNOT gates
can be reversed with the help of H gates.
Corollary II.A:

On some occasions, the control and target roles are not CNOT gate with four H gates, one before and one after
clear in a controlled gate. Controlled Z gates, CZ, are the control and one before and one after the target, is
symmetrical. They induce a sign shift for states where equivalent to a CNOT operation where control and target
both qubits are |1i and any qubit can be rightfully said to are exchanged.
be the control (Figure 7). In many cases, it can be more
illustrative to use an equivalent circuit where control and
target roles are exchanged.

FIG. 10: CNOT reversal.

For the proof we only need to add an H gate before and


FIG. 7: Control reversal operation for a CZ gate. after the target qubit line of the last CNOT circuits of
6

Figure 9. The left side circuit gives a CNOT surrounded classically controlled quantum gates, or classical opera-
by H gates. The right side circuit will present two H tions, helps to protect the most delicate and critical part
gates both before and after the new target. These gates of the system, the quantum states.
cancel (Rule I).
Rule IV: Quantum-classical substitution.
Corollary II.B:
CNOT gate preceded by an H gate in both the control Some quantum controlled operations on a pair of qubits
and the target qubits can be reversed moving the H gates which are later measured can be substituted for mea-
after the CNOT. surement followed by classical operations. Specifically, a
CNOT operation on a qubit which later controls a quan-
tum gate, U , can be replaced by the same operation con-
trolled by the classical XOR of the result of measuring the
CNOT operands.

Classical replacement of delicate operations, like in the


FIG. 11: H gates mirroring through CNOT inversion. application the previous rule, can simplify quantum cir-
cuit implementation. One further step can be taken if a
quantum-classical substitution of gates is applied before
The equivalence can be deduced from the CNOT cir-
a measurement. In our case we will be concerned with
cuits of Figure 10 adding an H gate after the circuits in
the substitution of a CNOT gate for a classical XOR.
both qubit lines. The sequence of two H gates will cancel
Imagine a situation like the one depicted in Figure 13,
giving the desired circuits.
where there is a controlled quantum gate preceded by
a CNOT on two qubits that are going to be measured.
Rule III: Principle of deferred measure- The classical XOR gate is represented by the accustomed
ment. symbol used in classical circuit schematics.

A measurement in a qubit line followed by classically


controlled operations on other qubits which are controlled
by the results of this measurement is equivalent to the cor-
responding quantum controlled gates with a measurement
at the end of the line1 .

Measurement can commute with controls for certain


operations. We will take advantage of this fact later in
order to reduce complex quantum gates to simple sin-
gle qubit operations completed with measurement and
classical processing. Figure 12 shows an example for the
circuit representation. Classical bits are represented with FIG. 13: Classical substitution of a CNOT gate before mea-
the customary double lines. surement.

The first two qubits will be dubbed as “control” and U


will taken to be the controlled operation. For input con-
trol states in the computational basis, before measuring
we have the state |ai|a ⊕ bi and the measurement results
will be a and a ⊕ b. The output state is |φi = U a⊕b |ψi.
FIG. 12: Measurement commutes with controlled gates. By the principle of deferred measurement, we can con-
vert the CU gate into a classically controlled gate. As
A reduction in the number of purely quantum gates can the measurement will always yield a ⊕ b, we can save the
alleviate the strong constraints that appear in the phys- CNOT gate and perform the operation classically with a
ical implementation of quantum computers. Quantum XOR.
states are extremely fragile and must be constantly pre- For general control superpositions,
P we will have gen-
served from decoherence. As long as the function of the eral input
P states of the form i αi |a i i|b i i|ψi i and output
whole system is equivalent, classical operations are pre- states αi |ai i|ai ⊕ bi iU ai ⊕bi |ψi i. Still, after measure-
ferred to classically controlled quantum gates which, in ment, we will have the same |αi |2 probabilities of reading
turn, are more desirable than controlled quantum gates. ai and ai ⊕bi in the circuit with the CNOT and of finding
Quantum gates are more prone to error than classical the corresponding ai and bi in the new circuit. In both
ones. The conversion of quantum domain operations into cases, after the controlled U , the state of the lower qubit
7

is U ai ⊕bi |ψi i. If we take the XOR of the measured values The new circuit can be useful to implement CNOT
as the control, the output will be indistinguishable from gates between distant qubits in cases where only nearest
the case with a CNOT gate (multiple measurements of neighbour interactions are possible. With this decom-
the same inputs will have the same statistics). position of the CNOT gate, we can prove the two next
Although this equivalence works particularly well for properties related to different ways of arranging CNOT
the CNOT/XOR conversion, the property cannot be ex- gates.
tended to all the quantum controlled gates. Such a sub-
stitution can only take place whenever there is a classi-
cal gate that reproduces the probabilities for the output
Rule VI: CNOT mirror.
state.
The principle of deferred measurement and this The order of two chained CNOT gates such that the
quantum-classical gate substitution can simplify many target qubit of the first is the control of the second can be
circuits, especially when there are ancillary qubits. With- commuted adding a new CNOT gate from the control of
out loss of generality, we can suppose that after the last the first CNOT to the target of the second.
operation in which a qubit is involved, it is measured.
This way, it is possible to convert some of the operations The CNOT mirror operation gives a way to commute
into simpler classical or classically controlled gates. CNOT gates acting on different qubits when the control
of one of the gates is immediately before or after the tar-
get of the other (Figure 15). The gates can be reflected
Rule V: Distributed CNOT. with respect to a new CNOT gate that has as its control
the first gate’s control and targets the target of the sec-
A CNOT operation between two qubits can be imple- ond. This new CNOT gate commutes with the other two
mented with four CNOT operations with an intermediate and the reflection can happen on both sides.
qubit so that there is no direct interaction between the
original qubits.

With this rule, we can redistribute the quantum gates


along the different parts of a circuit. The starting point
will be the distributed CNOT gate of Figure 14. FIG. 15: Mirror over a CNOT gate.

To prove mirroring over a CNOT gate, we will use


Rules I and V. We can add two CNOT gates before the
original gates and then simplify the circuit that arises
from the equivalent distributed CNOT of one of the new
FIG. 14: Distributed CNOT operation with the intervention gates (Figure 16).
of an ancillary qubit.

The equivalence can be proved from the properties of


the XOR function for a particular input and then be gen-
eralized to superpositions4 . For three states |Ci|Ai|T i of
the control, ancillary and target qubit, respectively, the
CNOT operation can be expressed as
|Ci|Ai|T i −→ |Ci|Ai|C ⊕ T i. (9)
For any logical value, B, B ⊕ B = 0. We can readily FIG. 16: Proof of the CNOT mirror.
check that the circuits of Figure 14 recover the final state
of Equation (9). For the middle circuit, Controls commute and so do X gates, so there are many
different ways to write the equivalence (see Figure 17).
|Ci|Ai|T i −→ |Ci|A ⊕ Ci|T i −→ |Ci|A ⊕ Ci|A ⊕ C ⊕ T i
In all of them, we can see how the original CNOT gates
are “reflected” from the longer CNOT and change their
−→ |Ci|Ai|A ⊕ C ⊕ T i −→ |Ci|Ai|C ⊕ T i. (10) order.
These equivalences can be proved with constructions
The second CNOT gate between each pair of lines is there
similar to the ones from Figure 16, applying the dis-
to erase residual correlations. Similarly, for the circuit of
tributed CNOT decomposition.
the right,
|Ci|Ai|T i −→ |Ci|Ai|A ⊕ T i −→ |Ci|A ⊕ Ci|A ⊕ T i Rule VII: Parallel to Λ CNOT.

−→ |Ci|A ⊕ Ci|C ⊕ T i −→ |Ci|Ai|C ⊕ T i. (11) Two CNOT gates with a common control qubit and two
8

There are several different ways to perform this task.


One well-known classical swap algorithm is the classical
XOR swap algorithm. The algorithm is composed by a
sequence of three bitwise XOR operations:
1. (A, A ⊕ B),
2. (A ⊕ B ′ , B ′ ),
3. (A′ , A′ ⊕ B ′ ).
FIG. 17: Alternative configurations for the mirror CNOT For a single bit, it can be summed up as:
commutation.
(a, b) −→ (a, a ⊕ b),
(a, a ⊕ b) −→ (a ⊕ a ⊕ b, a ⊕ b) = (b, a ⊕ b),
different targets can be written as three CNOT gates. (b, a ⊕ b) −→ (b, a ⊕ b ⊕ b) = (b, a).
Two of them are controlled by one of the former tar-
gets and act on the other target. The third CNOT gate After the three steps the data has been swapped. In
is placed between them. It conserves the original control all the operations, we can imagine a reversible XOR op-
and has as the target the control of the new gates. eration with inputs (X, Y ) and outputs (X, X ⊕ Y ). The
algorithm uses reversible logic and, as such, is fit to be
When there are parallel CNOT gates with the same extended to quantum information.
control but different targets, they can be rewritten in a Substituting the reversible XOR gates by their quan-
Λ configuration. Figure 18 shows the resulting circuits tum counterparts, the CNOT gates, we arrive at the
from a distributed CNOT equivalence. quantum circuit of Figure 19.

FIG. 19: Quantum swap circuit.

The swap still takes place for classical data encoded in


qubit states from the computational basis in a situation
identical to the classical scenario:
FIG. 18: Parallel to Λ configuration for CNOT gates. |xi|yi → |xi|x ⊕ yi → |x ⊕ x ⊕ yi|x ⊕ yi = |yi|x ⊕ yi

→ |yi|x ⊕ y ⊕ yi = |yi|xi. (12)


Although the gates commuted when they were in par-
allel, the Λ configuration imposes a fixed order. Controls When the input is a superposition of different compu-
and X gates only commute under the conditions of the tational basis states, the CNOT gate converts each part
previous rules. to its new qubit value with the corresponding probabil-
ity amplitude. At the output, the input states have been
swapped.
The swap operation is highly symmetric. It is com-
V. QUANTUM STATE TRANSFER
pletely equivalent to say that A is swapped for B or that
B is swapped for A. Both in the classical and the quantum
This section presents a seemingly trivial quantum cir- cases, the XOR or CNOT operations can be systemati-
cuit for quantum state transfer. Following two illuminat- cally taken on the opposite register and have the same
ing papers by David Mermin4,5 , we will show in Section final result. Figure 20 shows an alternative configuration
VII that this state transfer is indeed the base for both for the quantum swap circuit.
the teleportation and superdense coding protocols.

A. Classical XOR swapping and quantum swap


circuits FIG. 20: Alternative quantum swap circuit.

For two data registers A and B, with content data a The easiest, and trivial, way to see the circuit performs
and b, the problem of state swapping consists in finding a swap is noticing that this circuit is exactly the same of
a suitable procedure to move the contents of A to B and Figure 19. The lower qubit has been moved to the top
the contents of B to A. After the transfer, A contains b and the upper qubit is now down. For the symmetric
and B contains a. swap this does not affect the result.
9

VI. BELL STATES

Many quantum circuits use entangled states as a re-


source. The most widely used entangled state is the Bell
state, or Bell pair
|00i + |11i
√ , (13) FIG. 22: Quantum teleportation circuit.
2
a superposition of terms in which both qubits have the
same logical value. If we measure each qubit, both out- The circuit works on two stages. First, a Bell pair is
comes will be the same, even though the particular out- separated into distant locations. Then, a CNOT gate
come (0 or 1) is random. This is also true for different correlates the unknown qubit with the first half of the
measurement bases and for qubits that are taken away a pair. Entanglement between the Bell qubits ensures that
long distance. This kind of correlation cannot be repro- there is also a correlation with the remote qubit. The
duced with classical states8 . original data needs to be destroyed before teleportation.
We can define a family of two qubit Bell states In order to do that, the first half of the EPR pair and
the qubit are measured. Before measurement, the qubit
|0bi + (−1)a |1b̄i is applied an H gate step that destroys distinguishabil-
|βab i = √ , (14)
2 ity between different input qubits. After the H gate, no
information on the original qubit state can be deduced
where b̄ is b negated, or equivalently, b ⊕ 1. from the result of the measurement. At the same time,
The four Bell states are a possible basis of the two qubit measurement will project the remote qubit into a state
Hilbert space. Any two qubit state can be written down that is related to the original qubit.
as a superposition of |βab i Bell states. Quantum infor- The procedure is not complete until the measurement
mation can be translated from the computational basis results are sent through a classical channel and are used
into the Bell basis. The Bell state generator from the left to correct the state of the remote qubit. The need for
of Figure 21 can take any |ai|bi state from the computa- this correction guarantees that causality is not violated
tional basis into the corresponding Bell pair. This circuit in spite of the apparent faster than light non-local inter-
will be an important block when generating Bell states action. No information is sent in the state reduction.
and so will be the matching decoder that results from
inverting the gate order to create the inverse operation.
B. Quantum teleportation as a state transfer

The quantum teleportation circuit can be derived from


the state transfer circuit of Figure 20. We are only inter-
ested in taking the input qubit |ψi to another location.
FIG. 21: Bell state generator (left) and circuit representation We do not care what state we get in place of the original
of an input Bell pair (right). qubit at the sender. We can imagine we have in the lower
input a state |φi = |0i. This way, we can save the first
The term Bell pair, or EPR pair, is usually employed CNOT gate, which has a |0i control qubit (Rule I).
to denote the |β00 i state, which is represented in quan- Figure 23 shows the beginning of the evolution from
tum circuits with two qubit lines emerging from the same the simplified state transfer circuit to the most usual tele-
point (see Figure 21, right). portation circuit.

VII. EXAMPLES

A. Quantum teleportation

One dramatic example of the counterintuitive pos- FIG. 23: Teleportation derived from state transfer.
sibilities of entanglement is the quantum teleportation
protocol9 . In quantum teleportation, the state of an ar- The first CNOT can be distributed into four CNOT
bitrary quantum system, a single qubit in the basic case, gates with an ancillary qubit (Rule V). The new qubit
is transferred to another far location with the help of a has been artificially introduced and its concrete state is
classical channel and a previously shared Bell pair. not important. We can make it to start in |+i, which
The quantum circuit of Figure 22 implements the tele- allows to omit the first from the new CNOT gates.
portation protocol for a single qubit. In Figure 24 (up), we substitute the two ancillary
10

qubits in |+i|0i and the CNOT between them for a Bell


pair. The CNOT acting on |+i|0i is equivalent to a |0i|0i
input for the H and CNOT gates of the Bell state gen-
erator of Figure 21, which produces |β00 i. The ability
to perform this interaction beforehand and then use this
Bell pair as a resource gives the teleportation circuit its
nonlocal character.
The lower part of Figure 24 depicts more equivalent
circuits where these gates have already been replaced by FIG. 25: Encoding of classical information in a Bell pair using
a Bell pair. the dense coding protocol.

original information as long as its entangled companion


has.
At the receiver, the inverse of the encoding circuit of
Figure 21, with a CNOT gate and an H gate, can be used
to recover the information in the computational basis. No
information can be extracted until both members of the
EPR pair are together. As we have seen, entangled states
can only be understood as a whole.

FIG. 24: Equivalent teleportation circuits. D. Superdense coding as a state transfer

Without loss of generality, we can measure the ancil- As it was proved by Mermin5 , dense coding can be de-
lary qubits at the end of the operation. This does not af- rived from an unremarkable copy circuit that transforms
fect the |ψi state of interest. By replacing the last CNOT the input state |xi|yi|0i|0i into |xi|yi|xi|yi. The copy
gate by two H gates and a CZ gate and reversing this CZ can be done with two CNOT gates.
(Rule II), we arrive at the second to last circuit. The last The copy circuit is similar to the starting point of the
H gate is not important for us and can be omitted, as it teleportation procedure (Figure 23, left), repeated for
only affects the ancillary qubit. Finally, by Rule III, we each of the qubits. There is a further simplification. As
can replace the last two quantum controlled operations the original states encode classical data, they are only in
by a cX and a cZ gate and recover the familiar circuit for one state from the computational basis. The last CNOT
teleportation. gate in the state transfer circuit erases residual corre-
lations between the original qubit and the destination
qubit. If they were entangled, a measurement on the
C. Dense coding sender could alter the received state. If the set of possi-
ble states is reduced to two orthogonal states, as it hap-
Bell pairs can also be employed to send two bits worth pens in dense coding, this last erasure CNOT is no longer
of classical information with a single qubit10 . Imagine necessary.
we have a |β00 i entangled pair. We can transform this
EPR pair into states in the Bell basis with classically
controlled gates.
Figure 25 presents a version of this circuit in which
the original information is related to the measurement
of two qubits in the computational basis that carry the
classical information. In this form, its connections to
teleportation are clearer.
The circuit applies a cX and a cZ gate on the first qubit
of the Bell pair |β00 i to take two states |ai|bi from the
computational basis into the corresponding state from
the Bell basis (the states from Equation 14 up to a global FIG. 26: Derivation of the superdense coding circuit from a
phase). The resulting states can carry the information of CNOT partial copy of two qubits encoding classical informa-
two classical bits, but we only needed to act on one of the tion.
qubits to encode all the data. This means we can send
the second qubit in advance and convey the whole infor- Figure 26 shows the evolution from the CNOT copy-
mation by just one quantum transmission. The second ing circuit to a superdense encoder. The end circuit has
qubit is not required to have been in the same place as the two gates that, when applied to input |0i|0i, produce the
11

|β00 i Bell state (see Figure 21). It also has the corre-
sponding decoder (a CNOT followed by an H gate) at
the receiver’s side.
We can use the rules of Section IV to show this equiva-
lence. The second CNOT gate of the copying circuit can
be written as a sequence of H, CZ and H gates. We can
now insert an additional CNOT after the first H gate.
The input |0i is taken to |+i, for which, by Rule I, the
CNOT gate acts as the identity. Then, by the parallel
to Λ rule (Rule VII), we can produce two CNOTs be-
tween the last qubits and a third one between the second FIG. 27: Gottesman-Chuang gate teleportation circuit.
data qubit and the qubit that is going to be transmitted.
The further commutation with the CZ gate introduces no
changes. The Z operation only introduces a phase shift,
and target. We can replace the standard teleportation
but it does not change whether the control is |0i or |1i
circuit with an equivalent circuit with CNOT gates from
and, consequently, whether the NOT is activated or not.
Figure 24. The measured bits can change, but they are
In the presented circuits, the third qubit is the one
irrelevant for the global operation.
that is sent. The fourth qubit can be though to be part
of a preshared Bell pair. The data of both bits x and y
can be transferred just by acting on the third qubit. The
sender only has to apply the CNOT and CZ gates that are
controlled by the data to be sent. The counterintuitive
data compaction from two bits into one qubit is due to the
previously shared entanglement. The strong correlation
of the members of a Bell pair allows to treat them as one
entity and perform part of the encoding procedure before
having the data.
In this case, we don’t even need a complete state trans-
fer circuit. The CNOT copy circuit, applied on two
qubits, is enough. Notably, the dense coding protocol
cannot be used to send two qubits of information with a
single qubit transmission. As we have seen, a complete
state transfer circuit for quantum data would require ad-
ditional entanglement erasure gates (a CNOT for each
qubit). Those gates would imply some interaction with
the second qubit of the Bell pair (similar to the cZ oper-
ation which appeared in teleportation).
FIG. 28: CNOT gate teleportation as a teleportation stage
followed by a CNOT.

E. Gate teleportation
The last CNOT gate of this circuit can be mirrored
Gate teleportation offers an alternative way to perform in the intermediate CNOTs (rule VI) until it reaches the
certain operations when there are restrictions that forbid point of the original Bell pairs (Figure 28, down). On its
to apply a gate directly11 . Our reference point will be way to the beginning of the circuit, the CNOT gate will
the Gottesman-Chuang gate teleportation circuit of Fig- leave two residual CNOTs which give rise to the crossed
ure 27. Here, the input can be put in terms of a new cZ and cX gates of the gate teleportation circuit (con-
entangled state, |χi = |0000i+|0011i+|1110i+|1101i
2 , which trolled by bits b and c). The final circuit can be readily
results from the first CNOT operation between the Bell transformed into the original circuit of Figure 27. The
states. With this resource state, we can perform a CNOT measurements can be advanced by the principle of de-
operation between remote qubits with classical commu- ferred measurement. The cZ gates come from the substi-
nication and local classically controlled gates alone. The tution of the CNOT gates by their H and CZ equivalents,
usual approach to prove this operation is equivalent to as in the usual teleportation circuit (rule II). We ignore
a CNOT is based on the commutation rules of the Pauli two H gates which affect the value of the bits a and c,
group operators. We can use a circuital point of view to but do not alter the qubits of interest. Finally, due to the
clarify why this is the case. symmetry of the Bell pairs, we can see that the CNOT
We start from two teleportation circuits followed by between them has the same effect when it is applied on
a CNOT between their outputs (Figure 28, up). The either qubit of the second pair. The resulting entangled
output is clearly the CNOT operation between control state will be |χi in both cases.
12

VIII. DISCUSSION rules can be particularly useful is the optical implemen-


tation of quantum computing. One qubit optical gates
We have presented a series of basic quantum circuit are easily realizable and there are various options to add
equivalences which can be used to analyse quantum pro- a classical control13 . By contrast, the construction of
tocols and algorithms. The techniques have been applied CNOT gates has demonstrated to be exceedingly elusive,
to break down the teleportation and superdense coding as photons do not naturally interact by themselves. Us-
protocols and to clarify gate teleportation. ing circuit equivalences, the CNOT gates can sometimes
The given equivalences can be a useful analysis tool be replaced by measurement followed by classically con-
when dealing with quantum circuits. Transforming the trolled gates14,15 .
circuits to a different configuration helps to understand Be it for analysis or design, the equivalences give a
the function of each of the elements and the interactions quick way to find alternative quantum circuits and gain
between the different constituting blocks. a fresh point of view. We hope the given compendium
Casting a circuit into a new equivalent form can also will be a valuable addition to the basic toolbox of any
be useful in the design of experimental quantum circuits. quantum computer scientist.
Each experimental realization of quantum computing has
its own strong and weak points. Some gates are easier
to implement than others. Searching for an equivalent
circuit which reduces the number of problematic gates Acknowledgements
can improve the final system.
One example are quantum computers implemented This work has been funded by projects VA342B11-2
with spin chains, where nearest neighbour interactions (Junta de Castilla y León) and TEC2010-21303-C04-04
are well studied and easier to control than long distance (MICINN). The figures in this paper have been created
interactions12 . Another area in which the transformation using the Q-circuit LATEXpackage16 .

9

Electronic address: [email protected] C. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres
1
M. A. Nielsen and I. L. Chuang (2000) Quantum Computa- and W. Wootters (1993) Teleporting an unknown quantum
tion and Quantum Information. First Edition. Cambridge state via dual classical and Einstein-Podolsky-Rosen chan-
University Press, Cambridge, UK. nels. Physical Review Letters, 70(13), 1895–1899.
2 10
N. D. Mermin (2007) Quantum Computer Science. First C. H. Bennett and S. J. Wiesner (1992) Communication
Edition. Cambridge University Press, Cambridge, UK. via one- and two-particle operators on Einstein-Podolsky-
3
X. Zhou, D. W. Leung and I. L. Chuang (2000) Methodol- Rosen states. Physical Review Letters, 69(20), 2881.
11
ogy for quantum logic gate construction. Physical Review D. Gottesman and I. L. Chuang (1999) Demonstrating the
A, 62(5), 052316. viability of universal quantum computation using teleporta-
4
N. D. Mermin (2001) From classical state swapping to tion and single-qubit operations. Nature, 402(6760), 390.
12
quantum teleportation. Physical Review A, 65(1), 012320. S. Bose (2003) Quantum Communication through an Un-
5
N. D. Mermin (2002) Deconstructing dense coding. Physi- modulated Spin Chain. Physical Review Letters, 91(20),
cal Review A, 66(3), 032308. 207901.
6 13
D. Maslov, G. Dueck, D. Miller and C. Negrevergne (2008) T. B. Pittman, B. C. Jacobs and J. D. Franson (2002)
Quantum Circuit Simplification and Level Compaction. Demonstration of feed-forward control for linear optics
Computer-Aided Design of Integrated Circuits and Sys- quantum computation. Physical Review A, 66(5), 052305.
14
tems, IEEE Transactions on, 27(3), 436 –444. J. C. Garcı́a-Escartı́n and P. Chamorro-Posada (2009) Op-
7
A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, tical CNOT gates with Quantum Interrogation. AIP Con-
N. Margolus, P. Shor, T. Sleator, J. A. Smolin and H. We- ference Proceedings, 1110(1), 399–402.
15
infurter (1995) Elementary gates for quantum computa- J. C. Garcı́a-Escartı́n and P. Chamorro-Posada (2009)
tion. Physical Review A, 52, 3457. Quantum interrogation logic gates. arXiv:0901.4731v1.
8 16
J. F. Clauser, M. A. Horne, A. Shimony and R. A. Holt B. Eastin and S. Flammia (2004) Q-circuit Tutorial .
(1969) Proposed Experiment to Test Local Hidden-Variable arXiv:quant-ph/0406003v2.
Theories. Physical Review Letters, 23(15), 880–884.

You might also like