Quantum Computing Handbook
Quantum Computing Handbook
Micah Kepe
Table of Contents
1
Chapter 1
a Superposition allows quantum bits (qubits) to exist in multiple states simultaneously, and entanglement enables correla-
1. Quantum Simulation: Applications in chemistry, physics, and materials science, such as simulating
molecular energy levels and drug discovery.
2. Security and Encryption: Developing quantum-safe cryptographic protocols and random number gen-
eration.
3. Search and Optimization: Enhancing solutions for weather forecasting, financial modeling, traffic plan-
ning, and resource allocation.
2
Classical vs. Quantum Computing Paradigms
• Classical Computing: Utilizes traditional processing units (CPU, GPU, FPGA) and executes determin-
istic computations.
• Quantum Computing: Employs quantum processing units (QPU) with probabilistic computation based
on quantum states.
Note:-
Note: Classical computing paradigms still dominate in tasks that require precision and deterministic results.
Quantum computing excels in probabilistic or exponentially large state-space problems.
A vector is an ordered list of numbers, which can be represented as either a row or column vector. The
components of vectors in quantum computing belong to the field of complex numbers (ℂ).
Column Vectors
A column vector is a vertical arrangement of numbers:
𝑣1
𝑣2
v = . , 𝑣 𝑖 ∈ ℂ.
..
𝑣
𝑛
Row Vectors
A row vector is the complex conjugate transpose vector of a column vector:
v† = 𝑣 1 𝑣2 ... 𝑣𝑛 .
The adjoint of a column vector is a row vector, and vice versa. We represent the adjoint of a vector using
the dagger symbol (†).
Dirac Notation
In quantum computing, vectors are represented using Dirac notation (bra-ket notation):
1+𝑖
• Example: |𝑣⟩ = , ⟨𝑣| = 1 − 𝑖
2 .
2
𝑒 𝑖𝜔 = cos(𝜔) + 𝑖 sin(𝜔)
This is fundamental in representing quantum states and transformations.
3
Definition 1.2.3: Inner Product
We also have the following property that the inner product is equivalent to the square of the Euclidean
norm of a vector:
⟨v, v⟩ = ∥v∥2
𝑣1
𝑣2
vw = . 𝑤 1
†
𝑤2 ... 𝑤𝑛
..
𝑣
𝑚
This operation is useful for constructing quantum operators.
The tensor product (or Kronecker product) allows us to describe multi-qubit systems. Given two vectors:
𝑣1 𝑤1
v= , w=
𝑣2 𝑤2
Their tensor product is:
𝑣 1 𝑤 1
𝑣 𝑤
v ⊗ w = 1 2
𝑣 2 𝑤 1
𝑣 𝑤
2 2
The tensor product expands the state space, allowing representation of entangled states.
Orthagonality
Two vectors 𝑣, 𝑤 ∈ ℂ𝑛 are orthogonal if their inner product is zero:
4
⟨v, w⟩ = 0
Orthogonal vectors are linearly independent and span a subspace of the vector space. As you might
remember from linear algebra, a set of orthogonal vectors can be used to construct an orthonormal basis, and
any vector can be expressed as a linear combination of the basis vectors.
This will be useful when we cover the quantum bases in section 1.3.
The adjoint (or Hermitian conjugate) of a matrix 𝐴 is obtained by taking the transpose and complex
conjugate of each entry:
𝐴† = 𝐴𝑇
If 𝐴 is:
𝑖
1
𝐴=
2 3
Then its adjoint is:
† 1 2
𝐴 =
−𝑖 3
𝑈 †𝑈 = 𝐼
where 𝐼 is the identity matrix. Unitary matrices preserve the norm of quantum states and represent
reversible quantum operations. Example:
1 1 1
𝑈=√ , 𝑈 †𝑈 = 𝐼
2 1 −1
5
Definition 1.2.8: Hermitian Matrix
𝐻 = 𝐻†
Hermitian matrices represent observable quantities in quantum mechanics and have real eigenvalues. Ex-
ample:
𝑖
2
𝐻=
−𝑖 2
Since 𝐻 † = 𝐻, it is Hermitian.
Note:-
Hermitian matrices can’t have complex numbers in their diagonal General case illustration:
𝑎 + 𝑖𝑏 𝑐 + 𝑖𝑑 𝑎 − 𝑖𝑏 𝑒 −𝑖𝑓
†
𝑀= ⇒ 𝑀 = ⇒ 𝑀 ≠ 𝑀†
𝑒 +𝑖𝑓 𝑔 + 𝑖ℎ 𝑐 − 𝑖𝑑 𝑔 − 𝑖ℎ
Hermitian matrices are unitary, but unitary matrices are not necessarily Hermitian:
𝐻 → 𝑈, 𝑈↛𝐻
𝐴v = 𝜆v
where 𝜆 ∈ ℂ is the eigenvalue. Eigenvalues provide insight into the structure of linear transformations.
In Braket notation, the eigenvalue equation is:
𝐴|v⟩ = 𝜆|v⟩
𝑖
1
𝐴=
−𝑖 1
The characteristic equation is:
6
Definition 1.2.10: Quantum Bits/ Qubits
𝛼
𝜓 = 1 ∈ ℂ2
𝛼2
where:
𝛼1 , 𝛼 2 ∈ ℂ and |𝛼 1 |2 + |𝛼 2 |2 = 1
The first property ensures that the qubit is normalized, while the second property ensures that the qubit
is in a superposition of the basis states.
The first universal basis that we will look at is the computational basis, which consists of the states |0⟩
and |1⟩:
1 0
Zero state = |0⟩ = One state = |1⟩ =
0 1
A quantum state vector 𝜓 can be expressed as a linear combination of the basis states:
𝜓 = 𝛼 1 |0⟩ + 𝛼 2 |1⟩
Note:-
Properties of the computational basis:
Question 1
Show that any unitary matrix preserves the inner product of two vectors.
A qubit is the fundamental unit of quantum information. Unlike a classical bit, which is either 0 or 1, a
qubit can exist in a superposition of states:
• Quantum Computing: Allows coherent superposition with complex amplitudes and quantum interfer-
ence.
1
|𝐿⟩ = |+𝑖⟩ = √ (|0⟩ + 𝑖|1⟩)
2
1
|𝑅⟩ = |−𝑖⟩ = √ (|0⟩ − 𝑖|1⟩)
2
8
Bloch Sphere Representation
Definition 1.3.4: Bloch Sphere
𝜃 𝜃
|𝜓⟩ = cos |0⟩ + 𝑒 𝑖𝜙 sin |1⟩ 𝑒 𝑖𝛾
2 2
Where:
• 𝜃 ∈ [0, 𝜋] is the polar angle
• 𝜙 ∈ [0, 2𝜋) is the azimuthal angle
• 𝛾 is a global phase, often omitted since it cannot be represented on the Bloch sphere directly
Aside
Bloch Sphere Conversion to Cartesian Coordinates:
Rearranging the Bloch sphere formula, we obtain that 𝜃 and 𝜙 can be expressed as:
!
𝛼2
𝜃 = 2 arccos(𝛼1 ), 𝜙 = −𝑖 ln 𝜃
sin 2
𝑧 |0⟩
𝑦
|𝜓⟩
𝑥
|1⟩
9
1
𝜓 = √ (𝑖 |0⟩ + |1⟩)
2
𝑖 1
= √ |0⟩ + √ |1⟩
2 2
1 1
= 𝑖 √ |0⟩ + √ |1⟩
|{z} 2 2
global phase
Quantum Measurement
When a qubit is measured:
• Post-measurement state:
|𝑏⟩⟨𝑏|𝜓⟩
|𝜓new ⟩ = p
𝑃(𝑏)
⟨0|1⟩ = 0
⟨0|0⟩ = 1
⟨+|+⟩ = 1
⟨+|−⟩ = 0
Solution: These relations hold due to the orthonormal nature of quantum basis states.
Note:-
Quantum Bases and Their 𝜃 and 𝜙 Values:
10
1.4 Lecture 4: Quantum Gates and Transformations
Quantum gates manipulate qubits through unitary transformations, preserving quantum information and enabling
quantum computation. This section explores key quantum operations, their mathematical properties, and circuit
representations.
Definition 1.4.1: Qubit Superposition and Hilbert Space
A qubit exists in a complex vector space called a Hilbert space. The state of a qubit is given by:
|𝑏⟩⟨𝑏|𝜓⟩
|𝜓measurement ⟩ = p
𝑃(𝑏)
where 𝑏 ∈ {0, 1}. This formula captures the quantum measurement postulate and ensures proper normalization
of the post-measurement state.
2
𝑃(𝑏) = ⟨𝑏|𝜓⟩
Note:-
Probability Properties of Measurement:
𝑃(0) = 1 − 𝑃(1)
𝑃(+) = 1 − 𝑃(−)
𝑃(+𝑖) = 1 − 𝑃(−𝑖)
|𝜓final ⟩ = 𝑈|𝜓initial ⟩
where 𝑈 is a unitary matrix satisfying 𝑈 †𝑈 = 𝐼. Key properties of quantum gates include:
11
Definition 1.4.2: Rotation Gates
12
Definition 1.4.3: Pauli Matrices and Gates
Aside
Important relationships:
• 𝑋 2 = 𝑌2 = 𝑍2 = 𝐼
• 𝑋𝑌 = 𝑖𝑍, 𝑌𝑍 = 𝑖𝑋, 𝑍𝑋 = 𝑖𝑌
• 𝑌𝑋 = −𝑖𝑍, 𝑍𝑌 = −𝑖𝑋, 𝑋𝑍 = −𝑖𝑌
Circuit Notation
Quantum circuits visually represent quantum operations. Each qubit is represented as a horizontal line, and gates
are applied sequentially from left to right. Important circuit elements include: 1
1 For rendering quantum circuits, consider using the quantikz package in LATEX.
2 Dor example, the circuit 𝑈1 𝑈2 corresponds to the matrix product 𝑈2 𝑈1 .
13
1
|𝜓1 ⟩ = 𝐻|0⟩ = √ (|0⟩ + |1⟩)
2
1
|𝜓2 ⟩ = 𝑍|𝜓1 ⟩ = √ (|0⟩ − |1⟩)
2
|𝜓3 ⟩ = 𝐻|𝜓2 ⟩ = |1⟩
This sequence performs a NOT operation on |0⟩ using only Hadamard and Phase-flip gates.
|0⟩ 𝐻 𝑍 𝐻 |1⟩
|0⟩ 𝑌 𝑋 𝑖 |0⟩
Question 3: Exercise 1
Solution:
1
𝐻|0⟩ = √ (|0⟩ + |1⟩)
2
1 1
𝑋𝐻|0⟩ = √ (|1⟩ + |0⟩) = √ (|0⟩ + |1⟩)
2 2
1
𝑆𝑋𝐻|0⟩ = √ (|0⟩ + 𝑖|1⟩)
2
Therefore:
14
Question 4: Exercise 2
Question 5: Exercise 3
Quantum gates manipulate individual qubits. Single-qubit gates are represented by unitary matrices that
operate on a single qubit.
Properties:
– Self-inverse: 𝐻 2 = 𝐼
– Maps computational basis to |±⟩ basis:
1
|+⟩ = √ (|0⟩ + |1⟩)
2
1
|−⟩ = √ (|0⟩ − |1⟩)
2
Note:-
𝐻 |0⟩ = |+⟩ , 𝐻 |1⟩ = |−⟩ , 𝐻 |+⟩ = |0⟩ , 𝐻 |−⟩ = |1⟩
1 0
𝑆=
0 𝑖
Adds a 𝜋/2 phase to |1⟩, so it is also referred to as the ”𝜋/4 gate” due to 𝜃/2 term in the Bloch sphere
equation.
Properties:
15
– Unitary but not Hermitian
– 𝑆2 = 𝑍
1
– Effect on |+⟩ : 𝑆 |+⟩ = √ (|0⟩ + 𝑖 |1⟩)
2
• T Gate:
1 0
𝑇=
0 𝑒 𝑖𝜋/4
Properties:
– 𝑇2 = 𝑆
– 𝑇4 = 𝑍
– Often used in quantum error correction
1 1 1 1
𝐻 |0⟩ = √
2 1 −1 0
1 1
√ = |+⟩
2 1
Note:-
The following properties arise from applying the Hadamard gate:
𝑍 = 𝐻𝑋𝐻
𝑋 = 𝐻𝑍𝐻
Proof.
1 1 1 0 1 1 1 1 1 0
𝐻𝑋𝐻 = √ √ = =𝑍
2 1 −1 1 0 2 1 −1 0 −1
■
Back to Measurement
Measurement collapses quantum states to basis states with probabilities determined by amplitudes.
16
* For state 𝜓 = 𝛼 |0⟩ + 𝛽 |1⟩:
𝑃(0) = ||𝛼||2
𝑃(1) = ||𝛽||2
• Y-basis: Eigenstates of Y
Multi-Qubit Systems
States for multiple qubits are represented as tensor products:
2 𝑛 −1
𝑘=Õ Õ
𝜓 = 𝛼 𝑘 |𝑘⟩ , ||𝛼 𝑘 ||2 = 1
𝑘=0
Question 6: Exercise 1
†1 1 1
𝐻 =√ =𝐻
2 1 −1
1 1 1 1 1 1 0
𝐻𝐻 = = =𝐼
2 1 −1 1 −1 0 1
Question 7: Exercise 2
For 𝜓 = √1 (|00⟩ + |11⟩), find measurement probabilities for |00⟩ and |11⟩.
2
17
2
1 1
𝑃(00) = | ⟨00| 𝜓⟩|2 = √ =
2 2
2
1 1
𝑃(11) = | ⟨11| 𝜓⟩|2 = √ =
2 2
Question 8: Exercise 3
𝑖
1
Determine if 𝑈 = √1 is unitary.
2 𝑖 1
1 1 −𝑖
𝑈† = √
2 −𝑖 1
1 1 𝑖
† 1 −𝑖 1 0
𝑈𝑈 = =
2 𝑖 1 −𝑖 1 0 1
∴ U is unitary.
Question 9: Exercise 4
Solution:
18
Controlled Gates
Definition 1.6.1: Controlled X Gate
(CNOT) is a two-qubit gate that flips the target qubit if the control qubit is in state |1⟩, and does nothing
if the control qubit is in state |0⟩. The matrix representation of CNOT is given by:
1 0 0 0
0 1 0 0®
© ª
𝐶𝑁 𝑂𝑇 = 𝐶𝑋 =
0 0 0 1®
®
« 0 0 1 0¬
Representing the gate in a circuit diagram:
|𝑐⟩
|𝑡⟩ 𝑋
The control qubit is denoted by |𝑐⟩ and the target qubit is denoted by |𝑡⟩.
Applying the CNOT gate to a two-qubit state 𝜓 = 𝛼 |00⟩ + 𝛽 |01⟩ + 𝛾 |10⟩ + 𝛿 |11⟩:
1 0 0 0 1 1
0 1 0 0 0 0
𝐶𝑋 |00⟩ = 0 = = |00⟩
0 0 1
0 0
0 0 1 0 0 0
1 0 0 0 0 0
0 1 0 0 1 1
𝐶𝑋 |01⟩ = 0 = = |01⟩
0 0 1
0 0
0 0 1 0 0 0
(1.1)
1 0 0 0 0 0
0 1 0 0 0 0
𝐶𝑋 |10⟩ = 0 = = |11⟩
0 0 1
1 0
0 0 1 0 0 1
1 0 0 0 0 0
0 1 0 0 0 0
𝐶𝑋 |11⟩ = 0 = = |10⟩
0 0 1
0 1
0 0 1 0 1 0
Controlled-Z Gate
Definition 1.6.2: Controlled-Z Gate
1 0 0 0
0 1 0 0 ®
© ª
𝐶𝑍 =
0 0 1 0 ®
®
«0 0 0 −1¬
Circuit Representations
The standard circuit representations for these multi-qubit gates are:
19
CNOT:
CZ:
Due to the non-commutativity of tensor products, we adopt the convention of representing qubits from
most significant to least significant in our mathematical expressions. For an 𝑛-qubit system:
For example, consider a circuit with two Hadamard gates applied to different qubits:
𝑞1 𝐻
𝑞0 𝐻
(𝐻 ⊗ 𝐻) 𝑞 1 𝑞0 = (𝐻 𝑞1 ) ⊗ (𝐻 𝑞0 ) = 𝐻 𝑞1 ⊗ 𝐻 𝑞0
When gates have dependencies (like controlled operations), the ordering must respect these dependencies. For
the CNOT gate:
𝑞1
𝑞0 𝑋
The mathematical representation must preserve the control-target relationship, though intermediate calculations
may use different but equivalent orderings:
𝐶𝑁 𝑂𝑇1,0 𝑞 1 𝑞0 = 𝐶𝑁 𝑂𝑇( 𝑞1 ⊗ 𝑞0 )
This flexibility in representation, while maintaining functional equivalence, is particularly useful when
analyzing complex quantum circuits or optimizing quantum computations.
20
1.7 Lecture 7: More Multi-Qubit Gates, Reversibility Property, No-
Cloning Theorem
Review Questions
Question 10: Number of Measurement Bases
Solution: Infinite
2
𝑃(𝑏) = ⟨𝑏|𝜓⟩
In quantum mechanics, a measurement basis for an 𝑛-qubit system is a set of orthonormal basis states in
a 2𝑛 -dimensional Hilbert space. The most common measurement basis is the computational basis, given by
{|0⟩, |1⟩}⊗𝑛 . However, we can measure in any orthonormal basis.
The space of all possible measurement bases corresponds to the space of all possible orthonormal bases,
which is parameterized by the unitary group 𝑈(2𝑛 ). The set of all 2𝑛 -dimensional orthonormal bases is described
by the unitary group 𝑈(2𝑛 ), modulo the global phase 𝑈(1). Since this space is continuous and has infinitely many
parameters, there exist an infinite number of measurement bases.
|0⟩ 𝑞 2 𝑋 𝑋
|0⟩ 𝑞 1 𝑆 𝑋
|0⟩ 𝑞 0 𝑋
Solution: 011
• For 𝑞 2 , the two 𝑋 gates essentially cancel each other out as the gate is Hermitian (𝑋𝑋 = 𝐼).
• For 𝑞 1 , the 𝑆 gate does not affect the starting state |0⟩, and then the 𝑋 gate flips the signal to |1⟩.
• For 𝑞 0 , the 𝑋 gate simply flips the signal from |0⟩ to |1⟩.
Remembering that we read the diagram top-down as the most significant bit to the least significant bit,
respectively, the output is 001.
21
More Multi-Qubit Gates
More 2-Qubit Gates
The control and target qubits of a CNOT gate can be swapped using Hadamard gates:
(𝐻 ⊗ 𝐻) · 𝐶𝑁 𝑂𝑇control,target · (𝐻 ⊗ 𝐻) = 𝐶𝑁 𝑂𝑇target,control
This transformation can be visualized in a circuit diagram:
|𝑐⟩ 𝐻 𝐻
|𝑡⟩ 𝐻 𝑋 𝐻
The 𝐶𝑋(𝑞 0 → 𝑞1 ) gate, also known as 𝐶𝑁 𝑂𝑇𝑡𝑎𝑟 𝑔𝑒𝑡,𝑐𝑜𝑛𝑡𝑟𝑜𝑙 , is a variant of the CNOT gate where the control
and target qubits are swapped. Its matrix representation is:
1 0 0 0
0 0 0 1®
© ª
𝐶𝑁 𝑂𝑇𝑡𝑎𝑟 𝑔𝑒𝑡,𝑐𝑜𝑛𝑡𝑟𝑜𝑙 =
0 0 1 0®
®
«0 1 0 0¬
This gate flips the target qubit (𝑞1 ) if the control qubit (𝑞0 ) is in state |1⟩.
(𝐻 ⊗ 𝐻) · CNOTcontrol,target · (𝐻 ⊗ 𝐻) = CNOTtarget,control
The transformed CNOT gate is:
(𝐻 ⊗ 𝐻) · CNOT · (𝐻 ⊗ 𝐻).
1 0 0 0 1 1 1 1
0 1 0 0® 1 1 −1 1 −1®
© ª © ª
CNOT · (𝐻 ⊗ 𝐻) = ·
0 0 0 1® 2 1 1 −1 −1®
® ®
« 0 0 1 0¬ «1 −1 −1 1 ¬
This results in:
1 1 1 1
1 1 −1 1 −1®
© ª
CNOT · (𝐻 ⊗ 𝐻) =
2 1 −1 −1 1®
®
«1 1 −1 −1¬
Notice that the third and fourth rows of the matrix switch places due to the CNOT gate’s effect.
22
1 1 1 1
1 1 −1 1 −1®
© ª
(𝐻 ⊗ 𝐻) ·
2 1 −1 −1 1®
®
«1 1 −1 −1¬
Expanding this:
1 1 1 1 1 1 1 1
1 1 −1 1 −1® 1 1 −1 1 −1®
© ª © ª
−1
®·
−1® 2 1 −1 −1
2 1 1 1®
®
«1 −1 −1 1¬ «1 1 −1 −1¬
After computation, the resulting matrix is:
1 0 0 0
0 0 0 1®
© ª
CNOTtarget,control =
0 0 1 0®
®
«0 1 0 0¬
This matrix corresponds to the CNOT gate with the control and target qubits swapped.
SWAP Gate
Definition 1.7.2: SWAP Gate
The SWAP gate exchanges the states of two qubits. Its matrix representation is:
1 0 0 0
0 0 1 0®
© ª
𝑆𝑊 𝐴𝑃 =
0 1 0 0®
®
«0 0 0 1¬
The action of SWAP on basis states is given by:
Effects of SWAP Gate The SWAP gate interchanges the states of two qubits. For any 2-qubit computational
basis state, its action is:
Note:-
𝑆𝑊 𝐴𝑃 |00⟩ = |00⟩ ,
𝑆𝑊 𝐴𝑃 |01⟩ = |10⟩ ,
𝑆𝑊 𝐴𝑃 |10⟩ = |01⟩ ,
𝑆𝑊 𝐴𝑃 |11⟩ = |11⟩ .
Thus, for any superposition of 2-qubit states, the SWAP gate exchanges the amplitudes corresponding to
each qubit’s position.
𝑛-Qubit Gates
Before we just looked at the 2-qubit version of the Controlled X gate, but it extends to 𝑛-qubits.
23
Toffoli Gate
Definition 1.7.3: Toffoli Gate
(CCX) is a three-qubit gate with two control qubits and one target qubit. Its matrix representation is:
1 0 0 0 0 0 0 0
©0 1 0 0 0 0 0 0ª®
0 0 1 0 0 0 0 0®®
0 0 0 1 0 0 0 0®®
Toffoli =
0 0 0 0 1 0 0 0®®
0 0 0 0 0 1 0 0®®
0 0 0 0 0 0 0 1®
«0 0 0 0 0 0 1 0¬
The Toffoli gate is Hermitian and only flips the target qubit if both control qubits are in state |1⟩.
Effects of Toffoli Gate The Toffoli (CCX) gate acts on a 3-qubit system, where the first two qubits serve as
control qubits and the third is the target. Its effect on the computational basis states is:
Note:-
Toffoli |000⟩ = |000⟩ ,
Toffoli |001⟩ = |001⟩ ,
Toffoli |010⟩ = |010⟩ ,
Toffoli |011⟩ = |011⟩ ,
Toffoli |100⟩ = |100⟩ ,
Toffoli |101⟩ = |101⟩ ,
Toffoli |110⟩ = |111⟩ ,
Toffoli |111⟩ = |110⟩ .
In essence, the target qubit is flipped only when both control qubits are in the |1⟩ state; otherwise, the
state remains unchanged.
As you would expect, multi-controlled 𝑋 gates are Hermitian.
𝜓 𝐻 𝑍 𝑋 𝑋 𝑍 𝐻 𝜓
In this example, the quantum circuit consists of a sequence of Hermitian gates: the Hadamard (𝐻), Pauli-Z
(𝑍), and Pauli-X (𝑋) gates. These gates satisfy the property:
𝐻 = 𝐻†, 𝑋 = 𝑋†, 𝑍 = 𝑍†
Since these gates are their own inverses (i.e., 𝐻𝐻 = 𝐼, 𝑋𝑋 = 𝐼, and 𝑍𝑍 = 𝐼), if we apply the same sequence
of gates in reverse order, they cancel out, leaving the identity operation.
The circuit above first applies 𝐻, then 𝑍, then 𝑋 twice (which cancels itself out), then 𝑍 again, and finally
𝐻 again. This results in:
𝐻𝑍𝑋𝑋𝑍𝐻 = 𝐼
Hence, the overall operation on the qubit is the identity transformation, meaning the final state remains
the same as the initial state 𝜓 .
24
Definition 1.7.4: Reversibility Property of Quantum Computing
Quantum operations are inherently reversible due to the unitary nature of quantum gates. This means
that any quantum circuit can be reversed by applying the inverse of each gate in the reverse order.
Mathematically, if a quantum circuit is represented by a unitary matrix 𝑈, its reverse is represented by
𝑈 † , and since quantum gates are unitary, they satisfy the property:
𝑈 †𝑈 = 𝑈𝑈 † = 𝐼
This reversibility is a fundamental difference between quantum and classical computing and is directly
tied to the no information loss principle in quantum mechanics.
Why Reversibility is Important: In classical computing, operations such as the AND gate lose information.
For example, given the output of an AND gate, we cannot uniquely determine the original input:
𝐴
𝐴 𝐵 𝐴∧𝐵
𝐴∧𝐵
0 0 0
𝐵 0 1 0
1 0 0
1 1 1
This classical AND gate demonstrates information loss (irreversibility) because multiple distinct input states map
to the same output state. As shown in the truth table, three different input combinations (0,0), (0,1), and (1,0)
all produce the same output 0. Given only the output 0, it is impossible to determine which of these three input
states generated it—this loss of information about the system’s initial state makes the operation irreversible.
Quantum Reversibility: In contrast, quantum gates are always unitary, meaning they preserve the total
amount of information. Given the final state of a quantum system, we can always determine its previous state by
applying the inverse transformation. This is why quantum circuits must be composed of reversible operations.
𝜓 𝐻 𝑋 𝑋 𝐻 𝜓
In this example, the quantum circuit consists of a sequence of unitary gates: the Hadamard (𝐻) and the
Pauli-X (𝑋) gates. These gates satisfy:
𝐻 = 𝐻†, 𝑋 = 𝑋†
Since these gates are their own inverses (i.e., 𝐻𝐻 = 𝐼 and 𝑋𝑋 = 𝐼), if we apply the same sequence of gates
in reverse order, they cancel out, leaving the identity operation:
𝐻𝑋𝑋𝐻 = 𝐼
25
2. The composition of unitary gates remains unitary, preserving reversibility.
3. Classical Toffoli and Fredkin gates are reversible and can be used to construct reversible classical circuits,
which is why they are also fundamental in quantum computing.
4. Measurement is not reversible, as it collapses the quantum state and introduces information loss.
The reversibility of quantum computing is crucial for error correction, fault-tolerant quantum computation,
and simulating physical systems where information is conserved.
|𝜓final ⟩ = 𝐶𝐵𝐴|𝜓initial ⟩.
The reverse circuit applies 𝐶†, 𝐵† , and 𝐴† in reverse order:
The no-cloning theorem states that it is impossible to create an identical copy of an arbitrary unknown
quantum state. This result follows directly from the linearity of quantum mechanics.
𝑈( 𝜓 ⊗ |0⟩) = 𝜓 ⊗ 𝜓 .
𝑈( 𝜓 ⊗ |0⟩) = 𝜓 ⊗ 𝜓 ,
𝑈( 𝜙 ⊗ |0⟩) = 𝜙 ⊗ 𝜙 .
Now, consider the superposition state |𝜉⟩ = 𝑎 𝜓 + 𝑏 𝜙 . Applying 𝑈 to |𝜉⟩ ⊗ |0⟩ should produce:
26
Appendix
27