0% found this document useful (0 votes)
3 views20 pages

Quantum Computing Note

QC

Uploaded by

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

Quantum Computing Note

QC

Uploaded by

DN kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Quantum Computing

By Darimisetty Nithish Kumar


Motivation

There are intrinsically hard problems that today’s classical computers cannot handle
efficiently.
To solve such complex computational problems, Quantum Computing is introduced as
an alternative to Classical Computing.

Quantum Computing History

Quantum Computing is a modern field of technology that combines the concepts of Quantum
Mechanics and Computer Science. Unlike classical computers, which use bits represented as
0 or 1, quantum computers use Qubits that can exist in multiple states at the same time
because of a property called superposition. Quantum computing aims to solve certain
complex problems much faster than classical computers.

The history of quantum computing begins with the development of quantum theory in the
early 1900s. In 1900, Max Planck introduced the idea that energy is emitted in small packets
called quanta. This became the foundation of quantum mechanics. Later, in 1905, Albert
Einstein explained the photoelectric effect and proved that light behaves like particles called
photons. These discoveries changed the understanding of physics completely.

Further developments in quantum mechanics were made by scientists such as Niels Bohr,
who proposed the Bohr atomic model explaining electron energy levels, and Werner
Heisenberg, who introduced the Uncertainty Principle. Erwin Schrödinger developed the
Schrödinger Equation, which describes the behaviour of quantum particles mathematically.

iℏ(∂/∂t)Ψ = H’ Ψ

At the same time, the field of classical computing was also developing. Alan Turing
introduced the concept of the Turing Machine, which became the theoretical foundation of
computer science. John von Neumann later developed the architecture used in modern
computers. However, these computers were completely classical and used binary logic.

The idea of quantum computing started becoming serious during the 1970s and 1980s.
Stephen Wiesner proposed early concepts of quantum information, which later became
important in quantum cryptography. In 1980, Paul Benioff created the first theoretical model
of a quantum computer using quantum mechanical principles.

A major breakthrough came in 1981 when Richard Feynman explained that classical
computers cannot efficiently simulate quantum systems. He suggested building computers
based on quantum mechanics itself. This idea officially launched the field of quantum
computing. Feynman famously stated that nature is quantum mechanical, so simulations of
nature should also use quantum systems.

In 1985, David Deutsch proposed the idea of a Universal Quantum Computer. He also
developed the first quantum algorithm called the Deutsch Algorithm. This algorithm
demonstrated that quantum computers could solve certain problems differently and more
efficiently than classical computers.
The 1990s became a revolutionary period for quantum computing because of the discovery of
powerful quantum algorithms. In 1994, Peter Shor developed Shor's Algorithm, which can
factor large numbers exponentially faster than classical algorithms. This discovery was very
important because it showed that many modern encryption systems, such as RSA, could
theoretically be broken by quantum computers.

In 1996, Lov Grover developed Grover's Algorithm. This algorithm provides a faster method
for searching unsorted databases and gives quadratic speedup over classical searching
methods. Grover’s algorithm became one of the most important quantum search techniques.

During the 2000–2015 period, researchers started building real quantum hardware. Different
technologies were developed for creating qubits, including superconducting qubits, trapped
ion qubits, and photonic qubits. Companies such as IBM Quantum and Google Quantum AI
focused on superconducting quantum computers, while IonQ worked on trapped ion systems.

A major milestone was achieved in 2019 when Google announced that its quantum processor
called Sycamore had achieved Quantum Supremacy. The processor completed a specialized
computation faster than the world’s most powerful classical supercomputers. This event
showed that quantum computers could outperform classical computers in certain tasks.

Today, quantum computing is one of the fastest-growing research fields in the world. Major
companies including IBM Quantum, Microsoft Quantum, Amazon Braket, and Intel
Quantum are investing heavily in quantum technologies.

Quantum computing has many important applications in fields such as cryptography,


artificial intelligence, finance, optimization, weather forecasting, and drug discovery.
Quantum computers can solve highly complex calculations, simulate molecules accurately,
optimize traffic systems, and improve machine learning models.

One of the most important concepts in quantum computing is the representation of a qubit in
superposition.

∣ψ⟩ = α∣0⟩+β∣1⟩

In this equation, α and β are probability amplitudes representing the likelihood of measuring
the qubit in states |0⟩ and |1⟩. This property allows quantum computers to process massive
amounts of information simultaneously.

Although quantum computing has achieved major progress, several challenges still exist.
Researchers are working on reducing noise, improving error correction, increasing qubit
stability, and developing fault-tolerant quantum systems. These challenges must be solved
before large-scale practical quantum computers become common.

Overall, the history of quantum computing shows the journey from early quantum physics
discoveries to advanced quantum technologies capable of transforming the future of science
and computing. From the foundational work of Max Planck and Albert Einstein to modern
developments by companies like Google Quantum AI and IBM Quantum, quantum
computing has become one of the most important technological revolutions of the 21st
century.
Comparison Between Classical Computing and Quantum Computing
Classical Computing Quantum Computing
Uses Bits Uses Qubits
Bit states are: 0 or 1 Qubit states are: 0 or 1 or a
superposition of both states
simultaneously
State is deterministic (A deterministic state State is probabilistic (A probabilistic
means the output or state is fixed and certain. state means the qubit does not have a
In classical computing, a bit always has a fixed value before measurement, and the
definite value — either 0 or 1 — before outcome is determined based on
measurement.) probabilities.)
Can represent only one state at a time Can represent multiple states
simultaneously
Data storage capacity of n bits stores only n qubits can represent (2^n) states
one combination at a time simultaneously
Information is processed sequentially Information can be processed in
parallel using superposition
Based on classical physics Based on quantum mechanics
Uses classical logic gates such as AND, OR, Uses quantum gates such as
NOT Hadamard, Pauli-X, CNOT
Copying data is easy Exact copying of unknown quantum
states is impossible (No-Cloning
Theorem)
Errors are mainly caused by hardware Errors occur due to
faults decoherence(Decoherence is the process
by which a qubit loses its quantum
properties due to interaction with the
surrounding environment.) and quantum
noise
Computation is generally slower for certain Can solve some complex problems
complex problems exponentially faster
No concept of entanglement(Entanglement is Uses quantum entanglement for
a quantum phenomenon where two or more correlated operations
qubits become connected such that the state of
one qubit instantly affects the state of the
other, regardless of the distance between
them.)
Output is always definite Output is obtained after probabilistic
measurement
Easy to build and maintain Requires extremely controlled
environments
Works at normal room conditions Often requires ultra-low temperatures
Security mainly depends on mathematical Can provide highly secure
complexity communication using quantum
cryptography
Suitable for everyday applications Suitable for optimization,
Example: Classical computers, laptops, cryptography, simulation, and
smartphones advanced research
Example: IBM Quantum Computer,
Google Sycamore

into either ∣0⟩ or ∣1⟩.


Measurement does not change the bit value Measurement collapses the qubit state

Uses binary logic Uses probability amplitudes and


quantum mechanics
More bits increase storage linearly means More qubits increase computational
that adding each extra bit increases the space exponentially, meaning each
storage capacity by a fixed amount. additional qubit doubles the number of
possible quantum states that can be
represented simultaneously.
In classical computing, observing or In quantum computing, observing a qubit
measuring a system does not disturb its affects its state because measurement

into a definite state such as ∣0⟩|0\


state. collapses the qubit from superposition

rangle∣0⟩ or ∣1⟩|1\rangle∣1⟩.
For example, if a classical bit is 0 or 1,
reading it will still keep the bit unchanged
as 0 or 1.
Parallelism is achieved using multiple Quantum parallelism is achieved through
processors superposition, where a qubit can exist in
multiple states simultaneously and
perform computations on many
possibilities at the same time.
Bits are independent unless programmed Qubits can become entangled and
otherwise strongly correlated
Classical algorithms solve problems step- Quantum algorithms use interference to
by-step strengthen the probability of correct
answers while reducing the probability of
incorrect answers.
Performance improvement is usually Certain quantum algorithms provide
incremental exponential or quadratic speedup
Information is stored in transistor states Information is stored in quantum
states of particles like electrons or
photons
Classical computers are commercially Quantum computers are still in
mature and widely available experimental and early development
stages
Classical memory is stable for long Quantum states are fragile(means
durations easily disturbed, damaged, or affected
by external conditions.) and can lose
information quickly
Debugging and testing are comparatively Debugging quantum systems is highly
easier complex
Classical communication uses electrical Quantum communication may use
signals photons and quantum channels
Classical algorithms are easy to simulate on Quantum algorithms are difficult to
normal computers simulate efficiently on classical
systems
Classical computers cannot efficiently Quantum computers are naturally
simulate complex quantum systems suitable for quantum system
simulation
Power increase mainly depends on faster Power increase depends on increasing
hardware stable qubits and reducing noise
Classical encryption can theoretically be Quantum cryptography can detect
broken with enough computation time eavesdropping during communication
Transistors are the core hardware Qubits may be implemented using
components trapped ions, superconductors,
photons, etc.
Uses Boolean algebra Uses linear algebra and complex vector
spaces
Classical operations are mostly irreversible Quantum operations are reversible
in practice using unitary transformations
One wrong operation usually affects only Quantum decoherence can affect the
local computation entire quantum state

Classical Logic Gates and Their Quantum Equivalent Gates


Classical Quantum Equivalent Gate Meaning / Operation
Gate
AND Toffoli Gate (CCNOT) Output is 1 only if both inputs
are 1
OR Built using Toffoli + NOT Gates Output is 1 if at least one input
is 1
NOT Pauli-X Gate Flips 0 ↔ 1
NAND Toffoli + X Gate Opposite of AND
NOR OR Construction + Extra Pauli-X Opposite of OR
Gate
XOR CNOT Gate Output is 1 if inputs are
different
XNOR CNOT + NOT Gate Output is 1 if inputs are same
Identity Identity Gate (I) Keeps the value unchanged

Comparing Gates and Computational Methods


Classical Gates / Classical Quantum Gates / Quantum Computing
Computing
Uses bits as the basic unit of Uses qubits as the basic unit of information.
information.
A bit has only one definite value: 0 A qubit can be in 0, 1, or a superposition of
or 1. both.
Based on Boolean algebra. Based on linear algebra and the laws of
quantum mechanics.
Works with ordinary digital logic. Works with quantum states and quantum
Example: NOT gate operations.
Example: Pauli-X gate.
NOT gate changes 0 → 1 and 1 → 0. Pauli-X gate changes |0⟩ → |1⟩ and |1⟩ → |0⟩.
Operations are performed on bits. Operations are performed on qubits.
Output is usually deterministic. Output is usually probabilistic when
measured.
Many classical gates are Quantum gates are reversible.
irreversible. Example: CNOT and Toffoli gates are
Example: AND gate is irreversible. reversible.
Information may be lost in some Quantum information is preserved during gate
operations. operations.
Irreversible computation may waste Reversible quantum operations are ideally
energy. more energy efficient.
No superposition. Uses superposition.
No entanglement. Uses entanglement.
No interference effect is used. Uses quantum interference to amplify
correct results.
Logic operations are simple binary Operations are unitary transformations.
transformations.
Gates can be represented using Gates are represented using unitary
truth tables. matrices.
Example of gate representation: Example of gate representation: 2×2 or 4×4
AND, OR, NOT truth tables. matrices for quantum gates.
Classical circuits are easier to design Quantum circuits are more complex to design
and understand. and analyze.
State space grows linearly with the State space grows exponentially with the
number of bits. number of qubits.
For N bits, the number of states is For N qubits, the state space size is 2^N.
limited to classical combinations.
Suitable for normal computing tasks Suitable for special problems like simulation,
like browsing, banking, and data optimization, cryptography, and factoring.
processing.
Computation follows classical Computation follows quantum mechanics.
physics.
Data is stored in binary form. Data is stored using probability amplitudes.
A state is always fully known before A qubit state is only known probabilistically
measurement. before measurement.
Copying data is easy. Quantum states cannot be copied exactly
because of the no-cloning principle.
Measurement simply reads the Measurement collapses the qubit state to a
stored bit. classical result.
Classical gates can often be chained Quantum gates must preserve reversibility
freely. and unitarity.
Errors are handled using classical Quantum systems need special error
error control. correction methods because of noise and
decoherence.
Used in all standard computers and Used in quantum processors and quantum
digital electronics. algorithms.

Gates in Quantum Computing


Quantum gates are the basic building blocks of quantum circuits. They act on qubits and
change their quantum states through bit flips, phase shifts, superposition,
entanglement, and rotations. Unlike classical logic gates, quantum gates are reversible,
preserve quantum information, and are represented by unitary matrices.

Properties of Quantum Gates


1. Reversible Operations
 Quantum gates are reversible, meaning that if the output is known, the input can be
recovered by applying the inverse gate.

2. Unitary Property
 Every quantum gate must satisfy U†U=I, where U† is the conjugate transpose of U
and I is the identity matrix.

3. Preservation of Probability
 Quantum gates do not destroy probability, so the total probability of all possible
outcomes remains equal to 1.

4. Linear Operation
• Quantum gates act linearly on qubit states, meaning if a qubit exists in superposition,
the gate operates on all components of the superposition simultaneously.

5. Deterministic State Evolution


 Before measurement, quantum gates evolve the quantum state in a predictable
and rule-based way according to quantum mechanics.
6. Invertibility
• Since quantum gates are unitary, every valid quantum gate has an inverse operation, and
applying a gate followed by its inverse returns the qubit to its original state.

7. Phase Sensitivity
• Quantum gates can modify the relative phase between basis states, and these phase
differences are essential for quantum interference and the functioning of many quantum
algorithms.

Important Additional Points About Quantum Gates

1. Superposition Generation
 Some gates, especially the Hadamard gate, create superposition from basis
states.
2. Entanglement Creation
 Certain multi-qubit gates, such as CNOT and CZ, can create entanglement
between qubits.
3. Control-based Operations
 Many gates work conditionally, meaning one qubit controls the operation on
another qubit.
4. Parameterized Behaviour
• Some quantum gates depend on parameters or rotation angles, such as Rx(θ), Ry(θ),
and Rz(θ), and are widely used in variational quantum algorithms and quantum
machine learning.

5. Measurement is different from Gates


• Quantum measurement is not a unitary operation, as it extracts classical information
from a qubit and collapses the quantum state into one of the basis states.

Classification of Quantum Gates

1. Single-qubit gates
• Single-qubit gates operate on one qubit and are represented by 2×2 unitary matrices;
examples include I, X, Y, Z, H, S, T, Rx(θ), Ry(θ), Rz(θ), and U/U3 gates.

2. Two-qubit gates
• Two-qubit gates operate on two qubits simultaneously; examples include CNOT, CZ,
CY, SWAP, iSWAP, and sqrt(SWAP) gates.

3. Three-qubit gates
 Operate on three qubits; examples include Toffoli (CCNOT), Fredkin (CSWAP).

4. Multi-control gates
• Multi-control gates use more than one control qubit to perform conditional operations;
examples include (C^n(X)), (C^n(Z)), and CCCNOT gates.

1. Single-Qubit Gates

In Quantum Computing, single-qubit gates are quantum gates that operate on only one qubit
at a time. These gates are mathematically represented using 2 × 2 unitary matrices. A
unitary matrix preserves the total probability of the quantum state, which is necessary in
quantum mechanics.

Single-qubit gates are used to:

 Change qubit states


 Create superposition
 Modify phase information
 Rotate qubits on the Bloch sphere
 Prepare states for quantum algorithms

A general qubit is represented as:

∣ψ⟩=α∣0⟩+β∣1⟩

where:

∣α∣^2 + ∣β∣^2 = 1
 α and β are complex probability amplitudes

A) Basic Gates

Basic gates are the most fundamental operations in quantum computing. These gates directly
manipulate the state of a qubit.

1. Identity Gate (I)


The Identity Gate (I) is the simplest and most fundamental single-qubit quantum gate. It
leaves a qubit's state completely unchanged after execution, acting as the quantum
mechanical equivalent of multiplying a number by 1 or applying a NOP (No Operation)
instruction in classical programming.

Matrix Representation

The Identity gate is represented by a 2x2 identity matrix.

Action on Basis States


When applied to the standard basis states, the states remain identical:

I∣0⟩ = ∣0⟩
I∣1⟩ = ∣1⟩

I∣ψ⟩ = I(α∣0⟩ + β∣1⟩ = α∣0⟩+β∣1⟩ = ∣ψ⟩



Important Characteristics
 Does not alter amplitudes
 Does not change phase
 Does not rotate the qubit
 Maintains the same quantum state

Bloch Sphere Interpretation


 No rotation occurs
 State vector remains at the same position on the Bloch sphere

Uses of Identity Gate


 Circuit synchronization
 Delay balancing in quantum circuits
 Maintaining equal operation timing
 Useful in quantum error correction

Additional Notes
 Often used as a placeholder operation
 Helps maintain uniform circuit depth
 Important in hardware-level scheduling

2. Pauli-X Gate (X)


The Pauli-X Gate is also called:

 Quantum NOT Gate


 Bit-Flip Gate

This gate flips the computational basis states.

Matrix Representation
X=\begin{bmatrix}0&1\1&0\end{bmatrix}

Action on Basis States


X|0\rangle = |1\rangle

X|1\rangle = |0\rangle

Important Characteristics
 Performs quantum bit flip
 Equivalent to classical NOT operation
 Changes probability amplitudes
 Swaps north and south poles on Bloch sphere

Bloch Sphere Interpretation


The X gate performs:

180^{\circ}\text{ rotation about X-axis}


Geometric Meaning
 Rotates the state vector around the X-axis
 Converts:
o ( |0\rangle \leftrightarrow |1\rangle )

Uses of Pauli-X Gate


 Bit flipping
 State inversion
 Quantum arithmetic circuits
 Quantum teleportation
 Quantum error correction

Additional Notes
 One of the three Pauli matrices
 Hermitian and unitary
 Self-inverse:

X^2=I

Applying X twice returns the original state.

3. Pauli-Y Gate (Y)


The Pauli-Y Gate performs both:

 Bit flipping
 Phase shifting

It is more complex than the X gate because it introduces imaginary coefficients.

Matrix Representation
Y=\begin{bmatrix}0&-i\i&0\end{bmatrix}
Action on Basis States
Y|0\rangle = i|1\rangle

Y|1\rangle = -i|0\rangle

Important Characteristics
 Combines effects of X and Z gates
 Introduces imaginary phase factors
 Performs simultaneous rotation and phase transformation

Bloch Sphere Interpretation


The Y gate performs:

180^{\circ}\text{ rotation about Y-axis}

Geometric Meaning
 Rotates state around Y-axis
 Changes orientation of qubit state vector

Uses of Pauli-Y Gate


 Quantum simulations
 Spin system modeling
 Quantum rotations
 Quantum control systems

Additional Notes
 Also Hermitian and unitary
 Self-inverse:

Y^2=I
 Important in advanced quantum mechanics

4. Pauli-Z Gate (Z)


The Pauli-Z Gate is also known as:

 Phase-Flip Gate

Unlike the X gate, the Z gate does not change the basis state directly. Instead, it changes the
phase of the qubit.

Matrix Representation
Z=\begin{bmatrix}1&0\0&-1\end{bmatrix}

Action on Basis States


Z|0\rangle = |0\rangle

Z|1\rangle = -|1\rangle

Important Characteristics
 Does not flip the qubit value
 Introduces negative phase to ( |1\rangle )
 Important for quantum interference

Bloch Sphere Interpretation


The Z gate performs:

180^{\circ}\text{ rotation about Z-axis}

Geometric Meaning
 Rotates state around Z-axis
 Changes phase relationship between basis states

Uses of Pauli-Z Gate


 Phase manipulation
 Quantum interference
 Phase kickback
 Oracle construction
 Quantum search algorithms

Applications in Algorithms
Used heavily in:

 Grover's Algorithm
 Quantum Fourier Transform
 Phase estimation algorithms

Gate Main Operation Rotation Axis Major Use

Identity (I) No change None Synchronization

Pauli-X (X) Bit flip X-axis Quantum NOT

Pauli-Y (Y) Bit + phase flip Y-axis Quantum rotations

Pauli-Z (Z) Phase flip Z-axis Interference control

B) Superposition gate

Hadamard gate (H)

 Description: creates equal superposition of basis states; maps the Z basis to the X
basis and vice versa.
 Matrix:

H=12[111−1]H = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\[4pt] 1 & -1\


end{bmatrix}H=21[111−1]

 Actions:
H∣0⟩=∣0⟩+∣1⟩2,H∣1⟩=∣0⟩−∣1⟩2H\lvert 0\rangle = \frac{\lvert 0\rangle + \lvert 1\rangle}
{\sqrt{2}},\quad H\lvert 1\rangle = \frac{\lvert 0\rangle - \lvert 1\rangle}{\
sqrt{2}}H∣0⟩=2∣0⟩+∣1⟩,H∣1⟩=2∣0⟩−∣1⟩

Meaning: creates equal-probability superposition (50% ∣0⟩\lvert 0\rangle∣0⟩,


50% ∣1⟩\lvert 1\rangle∣1⟩).

 Bloch-sphere interpretation: rotates state between Z-axis and X-axis bases.


 Use: enables quantum parallelism; used in many quantum algorithms (Deutsch,
Grover, Shor, Bernstein–Vazirani).

C) Phase gates

Phase gates change only the relative phase of ∣1⟩\lvert 1\rangle∣1⟩ relative to ∣0⟩\lvert
0\rangle∣0⟩.

1. S gate (square-root of Z)

 Matrix:

S=[100i]S = \begin{bmatrix}1 & 0 \\[4pt] 0 & i\end{bmatrix}S=[100i]

 Action: S∣0⟩=∣0⟩,S∣1⟩=i∣1⟩S\lvert 0\rangle = \lvert 0\rangle,\quad S\lvert 1\


rangle = i\lvert 1\rangleS∣0⟩=∣0⟩,S∣1⟩=i∣1⟩.
 Rotation: 90∘90^\circ90∘ about Z-axis.
 Use: phase rotation, controlled phase operations.

2. T gate (π/4\pi/4π/4 phase gate)

 Matrix:

T=[100eiπ/4]T = \begin{bmatrix}1 & 0 \\[4pt] 0 & e^{i\pi/4}\end{bmatrix}T=[10


0eiπ/4]

 Rotation: 45∘45^\circ45∘ about Z-axis.


 Use: enables universal quantum computation and fault-tolerant circuits.

3. General phase gate

 Matrix:

P(θ)=[100eiθ]P(\theta) = \begin{bmatrix}1 & 0 \\[4pt] 0 & e^{i\theta}\


end{bmatrix}P(θ)=[100eiθ]

 Use: arbitrary phase rotations.

D) Rotation gates

Rotation gates perform rotations on the Bloch sphere by an angle θ\thetaθ.


 Rotation-X:

Rx(θ)=e−iθX/2R_x(\theta) = e^{-i\theta X / 2}Rx(θ)=e−iθX/2

 Rotation-Y:

Ry(θ)=e−iθY/2R_y(\theta) = e^{-i\theta Y / 2}Ry(θ)=e−iθY/2

 Rotation-Z:

Rz(θ)=e−iθZ/2R_z(\theta) = e^{-i\theta Z / 2}Rz(θ)=e−iθZ/2

 Use: state preparation and variational algorithms.

E) Universal single-qubit gate

U / U3 gate

 A general single-qubit unitary that can implement any single-qubit


transformation.
 Use: universal quantum computation (commonly used in IBM Qiskit).

Bloch Sphere

 The Bloch sphere is the geometric representation of a single qubit.

Important points: north pole = ∣0⟩\lvert 0\rangle∣0⟩, south pole = ∣1⟩\lvert 1\


 Axes: X, Y, Z.

rangle∣1⟩.
 Quantum gates correspond to rotations of the state vector on the Bloch sphere.

Multiple Qubits and Tensor Product

 Multi-qubit states are formed using the tensor product. Example:

∣0⟩⊗∣1⟩=∣01⟩\lvert 0\rangle \otimes \lvert 1\rangle = \lvert 01\rangle∣0⟩⊗∣1⟩=∣01⟩

 Matrix example:

[10]⊗[01]=[0100]\begin{bmatrix}1 \\[2pt] 0\end{bmatrix} \otimes \


begin{bmatrix}0 \\[2pt] 1\end{bmatrix} = \begin{bmatrix}0 \\[2pt] 1 \\[2pt] 0 \\[2pt]
0\end{bmatrix}[10]⊗[01]=0100

 For two qubits, the computational basis states are ∣00⟩, ∣01⟩, ∣10⟩, ∣11⟩\lvert 00\

rangle∣00⟩, ∣01⟩, ∣10⟩, ∣11⟩. There are 22=42^2 = 422=4 basis states.
rangle,\ \lvert 01\rangle,\ \lvert 10\rangle,\ \lvert 11\

 For an n-qubit system, there are 2n2^n2n basis states that can exist in
superposition simultaneously.

2. Two-Qubit Gates
A) Controlled gates

1. CNOT (CX) — controlled-X / controlled-NOT

 Behavior: if control = 0, target unchanged; if control = 1, flip the target.


 Truth table:
o Control 0, Target 0 → Output 00
o Control 0, Target 1 → Output 01
o Control 1, Target 0 → Output 11
o Control 1, Target 1 → Output 10
 Matrix:

CNOT=[1000010000010010]\text{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\[4pt] 0 &


1 & 0 & 0 \\[4pt] 0 & 0 & 0 & 1 \\[4pt] 0 & 0 & 1 & 0 \end{bmatrix}CNOT=10000100
00010010

 Use: creates entanglement (e.g., Bell states).

2. Controlled-Z (CZ)

 Action: applies a phase flip conditionally, ∣11⟩→−∣11⟩\lvert 11\rangle \


rightarrow -\lvert 11\rangle∣11⟩→−∣11⟩.
 Matrix:

CZ=[100001000010000−1]\text{CZ} = \begin{bmatrix} 1 & 0 & 0 & 0 \\[4pt] 0 & 1 & 0


& 0 \\[4pt] 0 & 0 & 1 & 0 \\[4pt] 0 & 0 & 0 & -1 \end{bmatrix}CZ=100001000010
000−1

 Use: phase correction, entanglement circuits.

3. Controlled-Y (CY)

 Applies Y to the target conditionally.


 Use: controlled phase and bit transformation.

4. Controlled-U (CU)

 Conditionally applies an arbitrary single-qubit unitary UUU.


 Use: programmable quantum circuits.

5. Controlled phase gate

 Applies a phase rotation conditional on control qubit(s).


 Use: quantum Fourier transform and phase-based algorithms.

B) SWAP-type gates

1. SWAP gate
o ∣01⟩→∣10⟩\lvert 01\rangle \rightarrow \lvert 10\rangle∣01⟩→∣10⟩
 Swaps the states of two qubits:

o ∣10⟩→∣01⟩\lvert 10\rangle \rightarrow \lvert 01\rangle∣10⟩→∣01⟩


 Matrix:

SWAP=[1000001001000001]\text{SWAP} = \begin{bmatrix} 1 & 0 & 0 & 0 \\[4pt] 0 &


0 & 1 & 0 \\[4pt] 0 & 1 & 0 & 0 \\[4pt] 0 & 0 & 0 & 1 \end{bmatrix}SWAP=10000010
01000001

 Use: qubit routing in hardware.

2. SWAP\sqrt{\text{SWAP}}SWAP gate

 Partial swap useful for creating entanglement.

3. iSWAP gate

 Swaps with an additional phase factor; used in some superconducting-qubit


architectures.

3. Three-Qubit Gates
4. Toffoli (CCNOT) — controlled-controlled-NOT

 Action: target flips only when both control qubits are 1.


 Use: reversible AND operation, quantum arithmetic.

2. Fredkin (CSWAP) — controlled-SWAP

 Action: swaps two target qubits only if control = 1.


 Use: reversible computation and quantum communication.

4. Multi-Control Gates

 Examples: CnXC^{n}XCnX (multi-controlled X), CnZC^{n}ZCnZ (multi-controlled


Z), CCCNOT, etc.
 Use: large quantum circuits and quantum error correction.

5. Parameterized Gates

 Parameterized gates depend on an angle θ\thetaθ, for example


Rx(θ),Ry(θ),Rz(θ)R_x(\theta), R_y(\theta), R_z(\theta)Rx(θ),Ry(θ),Rz(θ).
 Use: variational quantum algorithms and quantum machine learning.

6. Measurement and Non-Unitary Operations

 Measurement extracts classical information from qubits and is non-unitary.


 Common measurement bases: Z-basis, X-basis, Y-basis.
 Use: reading final quantum outputs and extracting classical results from
quantum computations.

You might also like