Quantum Gates
G.P. Biswas
Prof./CSE, IIT(ISM), Dhanbad
Example 2.3.3 The following one parameter set of rotation gates (represented by matrices)
is often used:
CNOT (Controlled-NOT Gate)
• Definition 2.3.6 A quantum (Boolean) circuit is a collection of
quantum gates acyclicly connected (by “quantum wires”).26 The size
and the depth of a circuit refer to the number of nodes and depth of
the underlying connection graph.
• A relation between a quantum circuit and the corresponding unitary
matrix is far from being very transparent even for simple circuits and
some experience is needed to get proper feelings in this respect. That
is why there are quite a few (very simple) examples and worth paying
detailed attention to.
• If gates G1 and G2 realizes the mappings described by unitary
matrices A1 and A2, then the network in Figure 2.11a realizes the
mapping described by the matrix A1 ⊗ A2.
• An implementation of the inverse of the XOR gate is given below (an
example of Equivalent circuit):
• An example of equivalent circuit is shown below:
Example 2.3.11 The XOR gate determined by the matrix XOR is an important example of a 2-qubit gate. If
depicted as in Figure Left, then a simple circuit of three such gates, shown in Right, flips the qubits.
Toffoli or CCNOT (Controlled-Controlled-NOT) Gate
Hadamard Gate
Contd.
• It can be shown that the following two circuits are equivalent.
• The following circuit generate Entangled qubits
• The following table lists many of the concepts involve in quantum
computing (& comparing with classical one)-
Reversible Gates
• A reversible gate, is a logic gate where, given the output(s) of the
gate, we can always determine what the input(s) was (were). An
example is the NOT gate:
Irreversible Gates
• For example, for the gates corresponding to the following truth
tables, the gate on the left is reversible, but the gate on the right is
irreversible:
Toffoli Gate: A Reversible AND Gate
• We have learned that the AND gate is irreversible, meaning we lose
information when we use an AND gate because we generally cannot
reconstruct the inputs from the outputs. It would be nice to have a
reversible version of the AND gate, and in this section we introduce
one called the Toffoli gate.
• The Toffoli gate has three inputs A, B, and C. To be reversible, it needs
to have three outputs, and they are A, B, and AB⊕C:
We see from the truth table that the outputs are unique, so the Toffoli gate is reversible. Notice when
C = 0, the third output is the AND of A and B. This can also be seen using boolean algebra, since
when C = 0, AB⊕C = AB⊕0 = AB, which is the AND of A and B. Thus, the Toffoli gate is a reversible
version of the AND gate.
From the above truth table, notice there are two rows where A = 0 and B = 0, and the third outputs of
these two rows are opposite each other. Similarly, there are two rows where A = 0 and B = 1, and the
third outputs are again opposite each other. This is true for every pair of rows with fixed A and B, and
it ensures each output of the truth table is unique, so the circuit is reversible. This observation that
each pair of rows has opposite third outputs can be proven using boolean algebra.
Making Irreversible Gates Reversible
Correspondence with Some Classical Logic Gates
• Before we proceed further, it is instructive to show that all the elementary logic gates, NOT, AND,
XOR, OR in classical logic circuits can be implemented with quantum gates. In this sense, quantum
information processing contains the classical one.
• NOT GATE
XOR Gate
AND GATE
OR GATE
Quantum Full Adder Circuit
•X
More than two Qubits Controlled Operations
Some Interesting Quantum gates
Contd.
Swap or Exchange Gate
Contd.
Quantum Computing Applications
• Now, some algorithms as quantum computing applications will be
discussed.
• Many quantum algorithms use quantum analogs of classical
computation as at least part of their computation. Quantum
algorithms often start by creating a quantum superposition and then
feeding it into a quantum version Uf of a classical circuit that
computes a function f. This setup, called quantum parallelism,
accomplishes nothing by itself—any algorithm that stopped at this
point would have no advantage over a classical algorithm—but this
construction leaves the system in a state that quantum algorithm
designers have found a useful starting point. Both Shor’s algorithm
and Grover’s algorithm begin with the quantum parallelism setup.
Walsh Hadamard Transformation
• Quantum parallelism, the first step of many quantum algorithms, starts by using the Walsh
Hadamard transformation, a generalization of the Hadamard transformation, to create a
superposition of all input values. It is known that the Hadamard transformation H applied
1
to |0> creates a superposition state (|0>+|1>). Applied to n qubits individually, all in
√2
state |0>,H generates a superposition of all 2^n standard basis vectors, which can be
viewed as the binary
Quantum Teleportation
• The purpose of quantum teleportation is to transmit an unknown
quantum state of a qubit using two classical bits such that the
recipient reproduces exactly the same state as the original qubit
state. Note that the qubit itself is not transported but the information
required to reproduce the quantum state is transmitted. The original
state is destroyed such that quantum teleportation should not be in
contradiction with the no-cloning theorem.
• Quantum teleportation has already been realized under laboratory
conditions using photons [6, 7, 8, 9], coherent light field [10], NMR
[11], and trapped ions [12, 13]. The teleportation scheme introduced
in this section is due to [11]. Figure below shows the schematic
diagram of quantum teleportation, which will be described in detail
below.
Contd.
• In quantum teleportation, Alice sends Bob two classical bits so that Bob reproduces a qubit state Alice used to have.
Contd.
• Notice that Alice has totally destroyed the initial qubit |φ> upon her
measurement. This makes quantum teleportation consistent with the
no-cloning theorem (Qubit cannot copied).
Bob: After receiving two classical bits, Bob knows the state of the qubit
in his hand.
Super-Dense Coding
• Super dense coding is the less popular sibling of teleportation. It can
actually be viewed as the process in reverse. The idea is to send two
classical bits of information by only sending one quantum bit. The
process starts out with an EPR (Einstein, Podolsky and Rosen) pair
that is shared between the receiver and sender (the sender has one
half and the receiver has the other).
•
No-Cloning Theorem
• Suppose that we have in our lab a qubit in an unknown quantum state |ψ> = α|0> + β|1>
(Actually it is perhaps better to say that some external referee knows a description of this quantum
state, but we in the lab don’t know this quantum state).
• Now we can construct all sort of machines (unitaries and measurements) which act on this qubit.
The question posed in the no-cloning theorem is whether it is possible to design a machine
which, for all possible actual states |ψ>, is able to take this state |ψ> and create two copies of
this state |ψ> ⊗ |ψ>, hence “cloning” the quantum state.
Quantum Gates
The XOR gate determined by the matrix XOR is an important example
Arithmetical circuits
Universality of quantum gates