Knowledge / Computer Science and Engineering / Quantum computing basics

Quantum computing basics

Computer Science and Engineering (B.E./B.Tech) · Emerging areas · free study notes for exams, placements and interviews

In short

Quantum computing processes information in qubits, two-level quantum systems that can hold a superposition of 0 and 1 and can be entangled with one another, so an n-qubit register is described by 2ⁿ complex amplitudes that evolve together under unitary gates. This matters because a few problems — integer factoring, discrete logarithms, unstructured search, simulation of molecules and materials — have quantum algorithms that are provably faster than the best known classical ones, which is why RSA/ECC are being replaced by post-quantum cryptography. In Indian universities it appears in AICTE/CBCS electives on quantum computing, quantum information and emerging technologies, and in GATE CS/PH-style questions on state vectors, gate matrices, measurement probabilities and algorithm complexity. Industrially it is a research-and-skills area: the National Quantum Mission (Union Cabinet approval, April 2023; outlay ₹6,003.65 crore for 2023-24 to 2030-31), four thematic hubs (quantum computing at IISc Bengaluru, communication at IIT Madras, sensing and metrology at IIT Bombay, materials and devices at IIT Delhi), plus quantum teams at TCS, Infosys, Wipro, HCLTech, QNu Labs, QpiAI, DRDO, ISRO and C-DAC. Hardware numbers in this field change every few months, so treat specific qubit counts as snapshots, not fixed facts.

Explained

Qubit, superposition and the Bloch sphere

Many qubits, entanglement and measurement

Quantum gates and circuits

Algorithms: where the speed-up is, and where it is not

Noise, decoherence and quantum error correction

Hardware platforms and the DiVincenzo criteria

Quantum communication, cryptography and the Indian ecosystem

Key points

Formulas and examples

Qubit state: |ψ⟩ = α|0⟩ + β|1⟩, normalisation |α|² + |β|² = 1 (α, β dimensionless complex amplitudes)
Bloch form: |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ} sin(θ/2)|1⟩, θ ∈ [0, π] polar, φ ∈ [0, 2π) azimuthal (radians or degrees)
Measurement: P(x) = |⟨x|ψ⟩|²; expectation ⟨A⟩ = ⟨ψ|A|ψ⟩
Register size: n qubits → 2ⁿ basis states; classical state-vector memory ≈ 2ⁿ × 16 bytes (two doubles per amplitude)
Unitarity: U†U = UU† = I; evolution |ψ'⟩ = U|ψ⟩; Schrödinger: iħ d|ψ⟩/dt = H|ψ⟩ (ħ = 1.0546×10⁻³⁴ J·s)
Grover iterations: k ≈ (π/4)√(N/M) for M marked items out of N; classical average ≈ (N+1)/(M+1) queries
Shor: period r of f(x) = aˣ mod N, then factors = gcd(a^{r/2} ± 1, N); runtime ≈ O((log N)³)
Circuit success (independent errors): F ≈ (1 − ε)g, ε = error per gate, g = gate count
Qubit frequency vs temperature: E = hf, T_eq = hf/k (h = 6.626×10⁻³⁴ J·s, k = 1.381×10⁻²³ J/K)
Fidelity of pure states: F = |⟨φ|ψ⟩|²; CHSH bound: |S| ≤ 2 classical, |S| ≤ 2√2 quantum
X = [0 1; 1 0]      Y = [0 -i; i 0]     Z = [1 0; 0 -1]
H = (1/√2)[1 1; 1 -1]   S = [1 0; 0 i]   T = [1 0; 0 e^{iπ/4}]
CNOT (control q0, target q1) = [1 0 0 0; 0 1 0 0; 0 0 0 1; 0 0 1 0]

Example 1 - Normalise and find probabilities. |ψ⟩ = 2|0⟩ + 3i|1⟩ (unnormalised).

Example 2 - Hadamard and interference. |ψ⟩ = 0.6|0⟩ + 0.8|1⟩, apply H.

Example 3 - Bell state and correlation. Start |00⟩, apply H to qubit 0, then CNOT(0→1).

Example 4 - Grover versus brute force. Search one marked entry in a database of N = 2²⁰ = 1,048,576 records.

Example 5 - Why the fridge runs at millikelvin. Transmon transition frequency f = 5 GHz.

Example 6 - Noise budget and classical simulation limit.

Example 7 - Shor on N = 15, a = 7. 7¹ = 7, 7² = 49 mod 15 = 4, 7³ = 28 mod 15 = 13, 7⁴ = 91 mod 15 = 1 → period r = 4.

AspectClassical bit / CPUQubit / QPU
State0 or 1α0⟩+β1⟩, continuum of states
n units describeone n-bit value2ⁿ amplitudes simultaneously
OperationsAND, OR, NOT (mostly irreversible)Unitary, always reversible
CopyingFreeImpossible for unknown states
ReadoutDeterministicProbabilistic, collapses the state
ErrorsBit flip; cheap ECCBit + phase flip; QEC needs 10³-10⁴:1 overhead
Best atEverything in daily computingFactoring, search, quantum simulation
PlatformQubitTemperatureStrengthWeakness
SuperconductingTransmon~10-20 mKFast gates, chip fabricationShort coherence, cryogenics
Trapped ionIon hyperfine levelsRoom temp, UHVHigh fidelity, all-to-allSlow gates, scaling
PhotonicSingle photonRoom tempNatural for networksProbabilistic 2-qubit gates
Silicon spinElectron spin<1 KCMOS-compatibleEarly maturity, crosstalk
Neutral atomRydberg atomµK (tweezers)Large arrays, reconfigurableAtom loss, gate fidelity

Where it is used

Interview questions

Common mistakes

Related topics

Information security fundamentals · Linear algebra: vectors, matrices and eigenvalues · Design and analysis of algorithms (complexity classes) · Digital logic and reversible computing · Probability and statistics · High-performance and parallel computing

Open in the Knowledge reader →Find jobs →