Notes On Quantum Computing
Notes On Quantum Computing
t il
Pa
ay
Ud
Author:
Uday Patil
September 2025
Copyright © 2025 Uday Patil
il
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical,
t
photocopying, recording, or otherwise, without the prior written permission of the
Pa
author, except in the case of brief quotations embodied in critical articles or reviews.
The information contained herein is provided for educational and research purposes
only. While every effort has been made to ensure the accuracy and completeness of the
ay
content, the author assumes no responsibility for errors or omissions, or for damages
resulting from the use of the information contained in this work.
Ud
Contents
il
9.5 Hybrid and Heuristic Algorithms . . . . . . . . . . . . .
t .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
25
25
Pa
10 Outlook and Open Problems 26
10.1 Scalability and Hardware Challenges . . . . . . . . . . . . . . . . . . . . 27
10.2 Error Correction and Fault Tolerance . . . . . . . . . . . . . . . . . . . . 27
10.3 Algorithmic Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ay
⟨ψ|ψ⟩ = 1.
Remark 1.1.
ρ ≥ 0, Tr(ρ) = 1.
t il
• Pure states correspond to rank-one projectors: ρ = |ψ⟩ ⟨ψ|.
Pa
• Mixed states describe classical probability distributions over pure states:
ρ= pi ≥ 0, pi = 1.
X X
pi |ψi ⟩ ⟨ψi | ,
i i
ay
This representation allows for a geometric visualization of qubit states as points inside
the Bloch sphere.
Open Systems. Realistic quantum systems interact with their environment. Their
dynamics are governed by the Lindblad master equation:
i X
ρ̇(t) = − [H, ρ] + Lk ρL†k − 21 {L†k Lk , ρ} ,
ℏ k
where Lk are Lindblad operators (noise channels) and {A, B} = AB + BA is the anti-
commutator.
E : B(H) → B(H),
such that
il
2. (Trace preservation) Tr(E(ρ)) = Tr(ρ) for all ρ.
t
Kraus Representation. Every quantum channel admits a representation
Pa
E(ρ) = Ki ρKi† , Ki† Ki = I,
X X
i i
• Bit-flip channel:
E(ρ) = (1 − p)ρ + pXρX.
• Phase-flip channel:
E(ρ) = (1 − p)ρ + pZρZ.
• Depolarizing channel:
Remark 1.2. This framework of density operators, open-system dynamics, and CPTP
channels provides the rigorous foundation for research in quantum error correction, fault
tolerance, and quantum algorithms.
Quantum Computing Notes 6
Error Detection. If a bit-flip Xi occurs on the i-th qubit, measuring the stabilizers
produces a unique syndrome:
Error (g1 , g2 )
I (+1, +1)
X1 (−1, +1)
X2 (−1, −1)
X3 (+1, −1)
Thus, the error can be identified and corrected.
t il
Example: Steane Code. The 7-qubit Steane code is a CSS code constructed from
the classical [7, 4, 3] Hamming code. It encodes 1 logical qubit into 7 physical qubits and
Pa
corrects any single-qubit error.
Remark 2.2. The stabilizer formalism provides the algebraic foundation for quantum
error correction. It allows for efficient description of large codes and is used extensively
y
Quantum systems are inherently noisy and prone to decoherence. To perform reliable
quantum computation, we must encode logical qubits into many physical qubits, detect
errors, and correct them without disturbing the encoded information. This is achieved
using quantum error-correcting codes (QECCs) and fault-tolerant protocols.
il
• A recovery operator R is then applied such that RE |ψL ⟩ = |ψL ⟩, restoring the
logical state. t
Pa
3.4 Examples of Quantum Codes
Shor Code ([[9, 1, 3]]). Encodes 1 logical qubit into 9 physical qubits, protecting
against arbitrary single-qubit errors. It combines:
y
Steane Code ([[7, 1, 3]]). A CSS code built from the classical [7, 4, 3] Hamming code.
• Encodes 1 logical qubit.
• Corrects any single-qubit error.
• Logical Clifford gates implemented transversally.
5-Qubit Code ([[5, 1, 3]]). The smallest possible code that corrects arbitrary single-
qubit errors. Stabilizer generators are cyclic permutations of XZZXI.
• Transversal gates: Apply the same gate independently on each physical qubit of
a block. Prevents error propagation.
il
physical error rate per gate p < pth , arbitrarily long quantum computations can be per-
formed with only polylogarithmic overhead in resources.
t
Pa
Remark 3.3. For practical codes like the surface code, numerical estimates give pth ≈
1%. Thus, scalable quantum computation is possible in principle, provided noise rates are
below threshold.
Remark 3.4. The accuracy threshold theorem is the cornerstone of fault-tolerant quan-
y
tum computing, showing that quantum information can be protected against decoherence
a
Summary of Section
• Errors modeled as Pauli operators with weight.
Definition 4.2 (NP). The class NP contains decision problems for which a given “yes”
instance has a polynomial-size certificate that can be verified in polynomial time by a
deterministic Turing machine.
Remark 4.1. The P vs NP problem remains one of the central open questions in theo-
retical computer science.
Remark 4.2. The constants 2/3 and 1/3 can be amplified to 1 − ϵ and ϵ for any ϵ > 0
by repetition. t il
Pa
Examples.
1. For yes-instances, there exists a polynomial-size quantum proof state |ψ⟩ such that
a polynomial-time quantum verifier accepts with probability at least 2/3.
2. For no-instances, all proofs are rejected with probability at least 2/3.
Remark 4.3. QMA is the quantum analogue of NP. Instead of a classical proof string,
Merlin provides a quantum state as a witness, and Arthur verifies using a quantum circuit.
Complete Problems.
promised b − a ≥ 1/poly(n).
Remark 4.4. This would imply that even verifying approximate solutions to many-body
quantum problems is intractable, analogous to the classical PCP theorem for NP.
QMA(2).
ay
PostBQP.
Summary of Section
• BQP captures quantum polynomial-time computation.
• QMA is the quantum analogue of NP, with the Local Hamiltonian problem as a
complete problem.
QMA PSPACE
PP
BQP
BPP
NP (unknown relation)
Theorem √ 5.1 (Grover’s Lower Bound). Any quantum algorithm for unstructured search
requires Ω( N ) queries.
Remark 5.1. Grover’s algorithm is optimal for unstructured search and can be general-
ized to amplitude amplification.
Quantum Computing Notes 13
Algorithm.
1. Prepare |0⟩⊗m ⊗ |u⟩.
Applications.
• Order finding (basis of Shor’s algorithm).
• Hamiltonian simulation.
t il
Pa
5.3 Shor’s Algorithm for Factoring
Problem. Given integer N , find its prime factorization.
ay
Complexity. Runs in time poly(n), where n = log N , exponentially faster than the
best known classical algorithms.
Algorithm Outline.
1. Encode |b⟩ as a quantum state.
where B = Xi .
P
i
Remark 5.2. VQAs trade formal guarantees for practical implementability. Their per-
formance remains an active area of research.
Summary of Section
• Grover’s algorithm: quadratic speedup for unstructured search, provably optimal.
• QPE: key primitive for order finding, Hamiltonian simulation, eigenvalue problems.
|0⟩⊗n H ⊗n D ···
Of
|0⟩ ···
|0⟩ H •
|0⟩ H •
QF T †
.. .. .. .. ..
. . . . .
|0⟩ H •
|u⟩ U U2
m−1
Quantum Computing Notes 16
m
H=
X
∥Hj ∥ ≤ α,
a
Hj ,
j=1
Ud
Examples.
• Heisenberg model:
H= (Xi Xj + Yi Yj + Zi Zj ).
X
⟨i,j⟩
• Hubbard model:
Remark 6.1. Higher-order decompositions improve accuracy at the cost of more expo-
nentials. For local Hamiltonians, gate complexity scales as poly(n, t, 1/ϵ).
Algorithm Idea.
1. Prepare superposition
P q
j αj /Λ |j⟩.
t il
Pa
2. Perform controlled-Uj .
3. Use amplitude amplification to obtain evolution under H.
Remark 6.2. LCU leads to optimal Hamiltonian simulation algorithms with complexity
ay
Õ(t∥H∥1-sum ), where
Ud
X
∥H∥1-sum = min |αj | : H =
X
αj Uj .
j j
Applications.
Summary of Section
• Goal: approximate e−iHt for physically relevant H.
il
t
• Applications span physics, chemistry, and materials science.
Pa
Algorithm: Trotter–Suzuki Simulation
for j ← 1 to m do
Apply Uj = e−iHj t/r ;
Return product of unitaries as approximation U (t) ≈ e−iHj t/r ;
Qr Qm
k=1 j=1
for k ← 1 to N do
Sample index j with probability pj ;
−1
Apply unitary Uj = e−ihj (tpj /N )
;
Return product of N unitaries as approximation to e−iHt ;
Quantum Computing Notes 19
ing qubits, trapped ions, photons, or spins. Unlike the idealized mathematical model of
unitary evolution, real devices are subject to decoherence, control errors, and environ-
mental interactions. This section formalizes noise models and connects them to physical
Ud
realizability.
Relaxation (T1 decay). Spontaneous emission from excited to ground state, |1⟩ →
|0⟩, with characteristic time T1 .
Dephasing (T2 decay). Random phase kicks cause off-diagonal terms in ρ to decay
with time constant T2 .
Bit-flip channel.
E(ρ) = (1 − p)ρ + pXρX.
Phase-flip channel.
E(ρ) = (1 − p)ρ + pZρZ.
Depolarizing channel.
dρ X
= −i[H, ρ] + Lk ρL†k − 12 {L†k Lk , ρ} ,
dt
ay
• Dominant noise: relaxation (T1 ∼ 50–200 µs), dephasing (T2 ∼ 50–200 µs).
Trapped Ions.
Photonic Qubits.
Summary of Section
ay
• Noise channels modeled as CPTP maps; amplitude damping and depolarizing chan-
Ud
Overhead. To achieve target logical error rate pL , the required number of physical
qubits per logical qubit scales as
nphys = O d2 ,
pth ≈ 1%.
d:
t il
If physical error rate p < pth , logical errors are suppressed exponentially in code distance
Pa
! d+1
p 2
pL ≈ .
pth
Magic States. A noisy |T ⟩ state can be purified using distillation protocols to yield
high-fidelity |T ⟩.
• Requires ∼ 108 physical qubits using surface code with realistic error rates (10−3 ).
il
Example: Quantum Chemistry Simulation (FeMoco).
t
• Estimated ∼ 106 –107 physical qubits for chemically relevant precision.
Pa
Summary of Section
• Logical qubits are encoded in large blocks of physical qubits.
y
• Fault tolerance requires both transversal Clifford gates and magic-state distillation
for universality.
Ud
Legend:
Data qubit (edge)
X-star stabilizer (vertex)
Z-plaquette stabilizer (face)
Figure 2: Surface-code fragment (3×3 plaquettes). Qubits live on edges (small circles).
Blue face boxes denote Z-type plaquette stabilizers (product of Z on the four adjacent
edge qubits). Red star symbols denote X-type vertex (star) stabilizers (product of X on
adjacent edge qubits).
j=1
j=1
Theorem 9.1 (HHL Complexity). For A sparse and well-conditioned, HHL outputs |x⟩
such that A |x⟩ ≈ |b⟩ in time
O(κ2 polylog(N )/ϵ),
where κ is condition number.
t il
Kernel Methods. Quantum circuits define implicit feature maps
ϕ : x 7→ |ψ(x)⟩ ∈ H,
Pa
allowing quantum kernel estimation.
ogously to classical neural networks. Still exploratory due to barren plateau issues.
Ud
Quantum Heuristics. Many NISQ algorithms lack rigorous guarantees but show em-
pirical speedups in small experiments.
Summary of Section
• VQAs (VQE, QAOA) bridge near-term hardware with useful tasks.
• Current algorithms face challenges: barren plateaus, noise, and input/output bot-
tlenecks.
q
3. Perform controlled rotation on ancilla: |λj ⟩ 7→ 1 − (C/λj )2 |0⟩ + (C/λj ) |1⟩,
where C is a normalization constant.
Output state is
X βj
|x⟩ ∝ |uj ⟩ ,
j λj
where A |uj ⟩ = λj |uj ⟩ and |b⟩ = βj |uj ⟩.
P
j
• Decoding algorithms. Efficient, parallel decoders are essential for real-time fault-
tolerant operation.
Summary of Section
• Hardware: scaling to millions of qubits with robust connectivity is a fundamental
challenge.
• Fault tolerance: surface codes dominate, but new codes and decoding methods are
actively explored.
• Algorithms: hybrid, machine learning, and simulation methods need better theo-
retical guarantees and benchmarks.
Concluding Remarks
t il
Quantum computing stands today at a remarkable crossroads. On the one hand, the
Pa
mathematical foundations are rigorous, the power of quantum algorithms is established,
and experimental demonstrations are steadily advancing. On the other hand, immense
challenges remain in scaling devices, controlling noise, and proving practical quantum
advantage.
y
For students and researchers, this duality is both a challenge and an opportunity. The
a
challenge is to push beyond current limitations in hardware, error correction, and algo-
rithm design. The opportunity is to participate in a scientific and technological revolution
Ud
that not only promises new computational power but also reshapes our understanding of
quantum physics itself.
The path to fault-tolerant quantum computation is long, but the progress of the past
three decades suggests that it is achievable. As theory and experiment continue to inform
each other, quantum computing is poised to transform fields from chemistry and materials
science to optimization, cryptography, and fundamental physics. These notes have aimed
to provide a rigorous but accessible foundation for this journey, equipping the reader with
the tools and perspective to contribute to the unfolding future of quantum technologies.
Exercises
The following exercises are designed to reinforce key concepts and provide practice in
both theoretical and practical aspects of quantum computing.
Basic Exercises
Exercise 10.1. Show that the Hadamard gate H satisfies H 2 = I and determine its
eigenvalues and eigenvectors.
Quantum Computing Notes 29
Exercise 10.2. Prove that any single-qubit unitary can be expressed (up to global phase)
as
U (α, β, γ) = eiα Rz (β)Rx (γ)Rz (δ).
Exercise 10.3. Compute the matrix representation of the Pauli group on one qubit. Show
explicitly that {I, X, Y, Z} form a basis for 2 × 2 Hermitian matrices.
Exercise 10.4. Show that the Bell state |Φ+ ⟩ = √12 (|00⟩ + |11⟩) is maximally entangled
by computing the reduced density matrix of one qubit.
Exercise 10.5. Verify that the CNOT gate is both unitary and Hermitian. What is its
eigenvalue spectrum?
Exercise 10.6. Demonstrate that measurement in the computational basis destroys co-
herence by applying it to the state √12 (|0⟩ + |1⟩).
Exercise 10.7. Write the quantum circuit for the 2-qubit Deutsch algorithm and compute
the output states for constant and balanced oracles.
Intermediate Exercises
1
il
Exercise 10.8. Use the Baker–Campbell–Hausdorff formula to show that
t
e−iAt e−iBt = e−i(A+B)t− 2 [A,B]t
2 +O(t3 )
.
Pa
Exercise 10.9. Simulate Grover’s algorithm for√n = 4 qubits and a marked state |1011⟩.
Verify the number of iterations predicted by π/4 N .
Exercise 10.10. Show that the Kraus operators for amplitude damping satisfy the com-
y
pleteness relation
a
K0† K0 + K1† K1 = I.
Ud
Exercise 10.11. Derive the expression for the error probability of a distance-d repetition
code under independent bit-flip noise of probability p.
Exercise 10.12. Prove that the QFT (Quantum Fourier Transform) on n qubits can be
implemented using O(n2 ) gates.
Advanced Exercises
Exercise 10.13. Implement the Lindblad master equation numerically for a single qubit
√
with Hamiltonian H = ω2 Z and pure dephasing L = γZ. Plot the decay of off-diagonal
elements of ρ(t).
Exercise 10.14. Consider the surface code on a d = 3 lattice. Enumerate the stabilizer
generators and logical operators. Show explicitly that there are two logical operators X, Z.
Exercise 10.15. Analyze the complexity of the HHL algorithm when the condition number
κ scales polynomially vs. exponentially with system size N .
Exercise 10.16. Derive the gradient expression for a parametrized quantum circuit
(ansatz) using the parameter-shift rule:
∂ 1
⟨0|U † (θ)HU (θ)|0⟩ = f (θ + π2 ) − f (θ − π2 ) .
∂θ 2
Quantum Computing Notes 30
Exercise 10.17. Discuss why quantum machine learning models can suffer from barren
plateaus. Provide a proof sketch that the variance of gradients decays exponentially with
n for deep random circuits.
Exercise 10.18. Show that Shor’s factoring algorithm requires O((log N )3 ) elementary
gates for an N -bit integer (ignoring error correction). Discuss the practical bottlenecks
when implemented on near-term hardware.
References
References
[1] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information,
Cambridge University Press, 2010.
[2] J. Preskill, Lecture Notes for Physics 229: Quantum Information and Computation,
California Institute of Technology, 1998.
[3] D. Gottesman, Stabilizer Codes and Quantum Error Correction, Ph.D. Thesis, Cal-
tech, 1997.
t il
[4] P. W. Shor, “Scheme for reducing decoherence in quantum computer memory,” Phys.
Pa
Rev. A, vol. 52, no. 4, pp. R2493–R2496, 1995.
[5] A. M. Steane, “Error correcting codes in quantum theory,” Phys. Rev. Lett., vol. 77,
no. 5, pp. 793–797, 1996.
ay
[7] E. Knill and R. Laflamme, “Theory of quantum error-correcting codes,” Phys. Rev.
A, vol. 55, no. 2, pp. 900–911, 1997.
[13] S. Bravyi and A. Kitaev, “Quantum codes on a lattice with boundary,” arXiv:quant-
ph/9811052, 1998.
Quantum Computing Notes 31
[14] L. K. Grover, “A fast quantum mechanical algorithm for database search,” in Proc.
28th ACM Symposium on Theory of Computing, pp. 212–219, 1996.
[15] P. W. Shor, “Polynomial-time algorithms for prime factorization and discrete loga-
rithms on a quantum computer,” SIAM J. Comput., vol. 26, no. 5, pp. 1484–1509,
1997.
[16] A. W. Harrow, A. Hassidim, and S. Lloyd, “Quantum algorithm for linear systems
of equations,” Phys. Rev. Lett., vol. 103, p. 150502, 2009.
[19] R. P. Feynman, “Simulating physics with computers,” Int. J. Theor. Phys., vol. 21,
pp. 467–488, 1982.
[20] S. Lloyd, “Universal quantum simulators,” Science, vol. 273, no. 5278, pp. 1073–1078,
1996.
[23] B. Schumacher and M. A. Nielsen, “Quantum data processing and error correction,”
Phys. Rev. A, vol. 54, no. 4, pp. 2629–2635, 1996.
Ud
[24] S. J. Devitt, W. J. Munro, and K. Nemoto, “Quantum error correction for beginners,”
Rep. Prog. Phys., vol. 76, p. 076001, 2013.
[25] P. Aliferis, D. Gottesman, and J. Preskill, “Quantum accuracy threshold for con-
catenated distance-3 codes,” Quantum Inf. Comput., vol. 6, no. 2, pp. 97–165, 2006.
[27] R. Jain, Z. Ji, S. Upadhyay, and J. Watrous, “QIP = PSPACE,” J. ACM, vol. 58,
no. 6, p. 30, 2011.
[28] M. B. Hastings, J. Haah, et al., “Quantum LDPC codes with good soundness,”
Nature Phys., vol. 17, pp. 1166–1171, 2021.