Quantum Advanced Topics
Overview
This chapter covers near-term quantum computing (NISQ era applications), quantum error correction for fault-tolerant computation, quantum networking, and the emerging field of quantum machine learning. The focus is on understanding trade-offs, current capabilities, and architectural patterns for quantum-classical hybrid systems.
Variational Quantum Algorithms
Variational algorithms are designed for NISQ (Noisy Intermediate-Scale Quantum) devices—quantum computers with 50–1000 noisy qubits and limited circuit depth. They use a hybrid quantum-classical loop where a classical optimizer tunes quantum circuit parameters.
VQE (Variational Quantum Eigensolver)
VQE finds the ground state energy of a quantum system (molecular Hamiltonian, material properties):
┌────────────┐ ┌────────────┐ ┌──────────────┐
│ Classical │ │ Quantum │ │ Classical │
│ Optimizer │────▶│ Computer │────▶│ Post-process│
│ (COBYLA, │θ │ Prepare │⟨H⟩ │ Compute │
│ SPSA) │◀────│ ansatz |ψ(θ)⟩│ │ expectation │
└────────────┘θ' └────────────┘ └──────────────┘
▲ │
└────────────────────────────────┘
Minimize ⟨H⟩
- Ansatz: parameterized quantum circuit that prepares a trial state |ψ(θ)⟩
- Hamiltonian decomposition: express the target Hamiltonian as a sum of Pauli strings; measure each term separately
- Classical optimizer: update θ to minimize the energy expectation value ⟨ψ(θ)|H|ψ(θ)⟩
Ansatz choices: UCCSD (Unitary Coupled Cluster Singles Doubles) for chemistry, hardware-efficient ansatz for empirical optimization, problem-inspired ansatz (ADAPT-VQE) that grows the circuit iteratively.
QAOA (Quantum Approximate Optimization Algorithm)
QAOA addresses combinatorial optimization problems (MaxCut, vertex cover, vehicle routing):
- Encode the problem as a cost Hamiltonian H_C whose ground state encodes the optimal solution
- Alternate between applying the cost Hamiltonian and a mixer Hamiltonian: |β, γ⟩ = e^(-iβH_M) e^(-iγH_C)|+⟩^(⊗n)
- Classical optimizer tunes parameters β, γ to maximize ⟨β, γ|H_C|β, γ⟩
- Depth p: more layers → better approximation but deeper circuits
For MaxCut on a graph G(V, E), the cost Hamiltonian is H_C = Σ_(i,j)∈E (1-Z_i Z_j)/2. At p=1, QAOA matches the Goemans-Williamson classical approximation ratio for some graph families. Higher p improves the ratio but demands more coherent qubits.
Quantum Error Correction (QEC)
Physical qubits are noisy—gate errors (~0.1–1%), decoherence (T1 relaxation, T2 dephasing) limits circuit depth to ~100–1000 gates. Quantum error correction encodes logical qubits in entangled physical qubits to detect and correct errors without collapsing the quantum state.
The QEC Challenge
Unlike classical error correction, you cannot copy quantum states (no-cloning theorem), and you cannot directly measure qubits without collapsing them. QEC must detect errors indirectly through syndrome measurements—measurements that reveal error information without revealing the encoded data.
Stabilizer Codes
Stabilizer codes encode k logical qubits in n physical qubits using the stabilizer formalism:
- Code space: the subspace stabilized by a set of commuting Pauli operators (stabilizers) S₁, S₂, …, S_{n-k}
- Syndrome: measure all stabilizers; the pattern of -1 eigenvalues identifies the error
- Correction: apply a recovery operation based on the syndrome
Surface Code
The surface code is the leading QEC code for near-term quantum computing:
Physical qubits on a 2D lattice:
- Data qubits on vertices
- Measure qubits on faces (Z-stabilizers) and edges (X-stabilizers)
○───□───○───□───○
│ │ │
□ ○───□───○ □
│ │ │ │
○───□───○───□───○
○ = data qubit
□ = measure (syndrome) qubit
Z-stabilizers (□) detect bit-flip errors
X-stabilizers (□) detect phase-flip errors
Key properties of the surface code:
| Property | Surface Code |
|---|---|
| Threshold error rate | ~1% (highest of any known code) |
| Physical qubits per logical qubit | d² (where d is the code distance) |
| Code distance d=7 | 49 physical qubits per logical qubit |
| d=21 | 441 physical qubits per logical qubit |
| Threshold: ~1% | Below this, adding more qubits improves logical error rate |
For d=21 with 0.1% physical error rate, logical error rate ~10⁻¹⁵ per gate—enough for Shor’s algorithm on a 2048-bit RSA key (which needs ~10¹² logical gates).
Fault-Tolerant Quantum Computing
Beyond error correction, fault tolerance ensures that errors during the correction process itself do not propagate catastrophically:
- Transversal gates: apply logical gates by operating on physical qubits independently—errors cannot spread between qubits within a code block
- Magic state distillation: non-Clifford gates (T gate) cannot be applied transversally in the surface code; instead, prepare noisy magic states and distill them using multiple noisy copies to produce a smaller number of high-fidelity magic states
- Logical qubits: once error rates are below threshold, concatenating codes produces arbitrarily reliable logical qubits at the cost of exponential overhead
Quantum Networking
Quantum Repeaters
Quantum communication over long distances is limited by photon loss in optical fibers (~0.2 dB/km). After ~100 km, success probability becomes negligible. Quantum repeaters extend range using entanglement swapping:
Alice ──── Link A ──── Repeater 1 ──── Link B ──── Repeater 2 ──── Link C ──── Bob
1. Generate entanglement on each link independently (A-B, B-C)
2. Perform Bell measurement at Repeater 1 → entanglement swaps across A-B-C
3. Repeat for longer distances
4. Entanglement purification: consume multiple noisy pairs to produce fewer high-fidelity pairs
QKD (Quantum Key Distribution)
QKD allows two parties to establish a shared secret key with security guaranteed by quantum mechanics:
BB84 Protocol (Bennett & Brassard, 1984):
1. Alice sends random qubits in one of two bases: {|0⟩,|1⟩} (Z basis) or {|+⟩,|−⟩} (X basis)
2. Bob measures each qubit in a randomly chosen basis
3. Alice and Bob publicly compare bases (not values!)
4. They keep only the bits where bases matched (sifting)
5. Error rate estimation: if QBER > ~11%, abort (eavesdropping detected)
6. Error correction + privacy amplification → shared secret key
Security guarantee: any eavesdropping introduces errors detectable by the legitimate parties. The no-cloning theorem prevents Eve from copying and re-sending qubits without disturbing the state.
Current deployments: commercial QKD systems from ID Quantique, Toshiba, and Chinese satellite-based QKD (Micius satellite, 2017). Limitations: distance (~100 km fiber, ~1000 km satellite), key rate (~Mbps at short distance), and cost.
Quantum Cryptography Beyond QKD
- Quantum digital signatures: unforgeable signatures based on quantum states
- Quantum secret sharing: split a secret among multiple parties; reconstruction requires a minimum threshold
- Position verification: prove your physical location using quantum challenges
Quantum-Classical Hybrid Workflows
Practical quantum computing is inherently hybrid—quantum processors handle specific subroutines while classical processors orchestrate:
┌───────────────────────────────────────────────────────────┐
│ Hybrid Orchestrator │
│ (classical: workflow management, error mitigation) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │Problem │ │Circuit │ │Classical │ │
│ │Decomposition│→│Compilation │→│Pre/Post-process │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │QPU Dispatch │→│Execution │→│Result Assembly │ │
│ │& Queueing │ │(with shots) │ │& Error Mitig. │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
└───────────────────────────────────────────────────────────┘
Quantum Cloud Platforms
| Platform | Backend | Access Model |
|---|---|---|
| IBM Quantum | Superconducting (Eagle, Heron) | Open access + premium |
| Google Quantum AI | Superconducting (Sycamore, Willow) | Research access |
| Amazon Braket | Multi-backend (IonQ, Rigetti, OQC) | Pay-per-task |
| Azure Quantum | Multi-backend (Quantinuum, IonQ, QCI) | Pay-per-task |
| Quantinuum | Trapped ion (H2) | Pay-per-task |
Quantum Compilers & Circuit Optimization
Compilation Pipeline
High-level circuit (Qiskit/Cirq/OpenQASM)
→ Unroll to native gate set (e.g., {Rz, SX, X, CNOT})
→ Map logical qubits to physical qubits (coupling graph aware)
→ Optimize: cancel redundant gates, merge rotations, commutativity analysis
→ Scheduling: minimize circuit depth subject to parallelism constraints
→ Resource estimation: count qubits, gates, depth for error budget
Circuit Optimization Techniques
- Peephole optimization: pattern matching for gate cancellations (e.g., H·H = I, CNOT·CNOT = I)
- Rotation merging: combine consecutive Rz(θ₁)·Rz(θ₂) → Rz(θ₁+θ₂)
- Template matching: apply known circuit identities (e.g., CNOT recycling)
- Qubit routing: SWAP insertion to satisfy hardware connectivity constraints; minimize SWAP overhead using SABRE algorithm
- Approximate synthesis: replace deep exact circuits with shorter approximate ones within an error tolerance
Resource Estimation
Before running on hardware, estimate resource requirements:
- Logical qubits: how many logical (error-corrected) qubits are needed?
- T-gate count: T gates are the bottleneck (require magic state distillation); count determines total time
- Circuit depth: how many logical cycles? Determines total execution time
- Physical qubits: logical qubits × overhead per logical qubit + ancilla qubits
Tools: Microsoft’s Azure Quantum Resource Estimator, Qiskit’s Transpiler with resource estimation passes.
Quantum Simulation
Simulating quantum systems classically is exponentially hard—the original motivation for quantum computers. Classical simulation remains essential for:
- Algorithm development and testing before hardware is available
- Verification: comparing quantum results against known answers
- Small-scale verification of quantum circuits (up to ~40 qubits state vector, ~100 qubits via tensor networks)
Simulation approaches:
| Method | Max Qubits | Memory | Speed |
|---|---|---|---|
| State vector | ~40 | 2^n complex numbers (16 GB at n=34) | Fast |
| Tensor network (MPS) | ~100 | Depends on entanglement | Moderate |
| Feynman path integral | Varies | Varies | Problem-dependent |
| Density matrix | ~20 | 4^n complex numbers | Slow |
Quantum Machine Learning
Quantum machine learning (QML) explores quantum advantages for ML tasks:
Potential Speedups
- Quantum linear algebra: HHL algorithm for solving linear systems—exponential speedup under specific conditions (well-conditioned, sparse matrices). Basis for quantum recommendation systems and quantum PCA.
- Quantum kernel methods: quantum computers compute classically hard kernel functions for SVMs. Advantage depends on whether the kernel is classically hard to evaluate.
- Quantum neural networks (QNNs): parameterized quantum circuits as model layers. Variational training (classical optimizer, quantum forward pass). Theoretical advantages unclear; active research area.
Honest Assessment
Current QML results are mixed. Most demonstrated quantum advantages rely on contrived problems. The barren plateau problem—gradients vanish exponentially with system size in many QNN architectures—is a major obstacle. The most promising near-term applications are in quantum chemistry and materials science (VQE), not general ML.
Interview Angle
“What is the surface code and why is it important for quantum computing?”
The surface code encodes one logical qubit in a 2D grid of physical qubits. Syndrome measurements detect errors without measuring the encoded data. Its threshold (~1%) is the highest of any known QEC code, making it the most practical choice for near-term fault-tolerant quantum computers. Overhead: a d² grid of physical qubits per logical qubit, where d is the code distance needed for the target error rate. A useful quantum computer will need thousands of physical qubits per logical qubit.
“How would you design a quantum-classical hybrid workflow for a pharmaceutical company?”
Use VQE to compute molecular ground state energies for drug candidates. Classical pre-processing: generate molecular Hamiltonians from quantum chemistry packages (PySCF). Quantum execution: prepare molecular ansatz circuits on a quantum computer, measure energy. Classical post-processing: optimize circuit parameters, compare energies across candidates. The quantum computer is an accelerator for the most expensive step (energy estimation), while classical computers handle everything else. Use error mitigation (zero-noise extrapolation, symmetry verification) to compensate for NISQ noise.
Key References
- Peruzzo et al., “A Variational Eigenvalue Solver on a Photonic Quantum Processor” (VQE, 2014)
- Farhi, Goldstone, Gutmann, “A Quantum Approximate Optimization Algorithm” (QAOA, 2014)
- Fowler et al., “Surface Codes: Towards Practical Large-Scale Quantum Computation” (2012)
- Lidar & Brun, “Quantum Error Correction” (2013)
- Preskill, “Quantum Computing in the NISQ era and beyond” (2018)