Quantum Computers

Quantum Computers

Lecture notes on qubits, superposition, interference, entanglement, measurement, Shor and Grover algorithms, quantum error correction, quantum machine learning, and post-quantum cryptography.

A quantum computer does not derive its power merely from the popular statement that a qubit can be “0 and 1 at the same time.” The deeper distinction is that computational states are represented by complex probability amplitudes and quantum operations can transform those amplitudes so that interference increases the probability of useful measurement outcomes.

From Classical Bits to Qubits

A pure single-qubit state is

|ψ> = α|0> + β|1>

with

|α|² + |β|² = 1

Measurement in the computational basis returns 0 with probability |α|² and 1 with probability |β|².

For n qubits the state vector may contain 2^n complex amplitudes:

|ψ> = Σx αx|x>

This exponential state-space dimension does not mean that a quantum computer performs 2^n ordinary computations and then exposes all 2^n answers. A measurement does not reveal the entire state vector. A useful quantum algorithm must arrange amplitudes and phases so that interference makes the desired property observable with sufficiently high probability.

Superposition and Interference

Applying a Hadamard gate to |0> gives

H|0> = (|0> + |1>) / √2

A measurement now yields either basis state with equal probability. This alone provides no computational advantage.

The important feature appears when amplitudes are recombined. Because amplitudes carry phase, paths can interfere constructively or destructively. Quantum algorithm design therefore uses unitary transformations to amplify useful outcomes and suppress unwanted ones.

The ideal evolution of a closed quantum system is represented by a unitary operator:

|ψ'> = U|ψ>
U†U = I

Common gates include the Pauli X, Y, and Z gates, Hadamard H, phase gates, and controlled multi-qubit operations such as CNOT.

Entanglement

Some multi-qubit states cannot be decomposed into independent states of their constituent qubits. A Bell state is

|Φ+> = (|00> + |11>) / √2

Entanglement creates correlations that are central to quantum information processing, error correction, teleportation, and quantum networking. It does not provide controllable faster-than-light communication.

Measurement and Classical Control

Most gate-model systems are hybrid:

classical program
→ prepare quantum state
→ apply quantum circuit
→ measure
→ classical bits
→ classical post-processing

Scheduling, control electronics, error handling, orchestration, data management, and application logic remain largely classical. Quantum states are internal computational representations.

It is nevertheless incorrect to claim that every quantum computer can accept only classical bits as input. Quantum networks, sensors, and other quantum systems may provide quantum states directly.

Historical Motivation

One of the original motivations for quantum computing was the difficulty of simulating quantum physics on classical machines. Richard Feynman emphasized that the state space of a quantum system can grow exponentially when represented directly on a classical computer. David Deutsch later developed the model of a universal quantum computer.

This leads to an important principle: a controllable quantum system can represent the mathematics of another quantum system without explicitly storing every amplitude in a classical state vector.

What Does Quantum Speedup Mean?

Quantum computers do not accelerate every algorithm. Advantage is problem-dependent and must be described in a specific computational model.

Relevant metrics include:

asymptotic complexity
query complexity
circuit depth
logical-qubit count
state-preparation cost
measurement count
error-correction overhead
classical pre/post-processing
wall-clock latency

A better Big-O expression for the quantum kernel is not sufficient by itself to establish practical advantage.

Grover's Algorithm

For unstructured search among N candidates, classical black-box search requires O(N) queries in the worst case. Grover's algorithm reduces the quantum query complexity to

O(√N)

This is a quadratic, not exponential, speedup. Its mechanism is amplitude amplification: an oracle marks the target and repeated transformations increase the target state's amplitude before measurement.

Shor's Algorithm

Shor's algorithm provides polynomial-time quantum algorithms for integer factorization and discrete logarithms. This directly affects cryptosystems whose security depends on these problems, including RSA, finite-field Diffie-Hellman, and elliptic-curve discrete-logarithm systems.

The theoretical algorithm should not be confused with present hardware capability. Breaking modern cryptographic keys requires a large fault-tolerant machine with enough logical qubits and a sufficiently low logical error rate.

What Quantum Computers Do Not Do

Quantum computation does not remove the boundary between computable and uncomputable problems. An uncomputable problem does not become computable merely because the hardware is quantum.

Nor is there a known result showing that all NP-complete problems can be solved in polynomial time on a quantum computer. BQP captures the standard class of decision problems efficiently solvable with bounded error on a quantum computer, but the exact relationship between major complexity classes remains a theoretical question.

State Preparation and Data Loading

Suppose a classical vector

x = (x1, x2, ..., xN)

is to be amplitude-encoded as

|x> = 1/||x|| Σi xi|i>

Preparing this state may itself be expensive. Algorithms that assume efficient oracles, QRAM, sparse access, or pre-existing quantum states must be evaluated together with the cost of realizing those assumptions.

A fast quantum kernel surrounded by expensive loading and extraction can lose its end-to-end advantage.

Output and Measurement Bottlenecks

A quantum state can compactly represent information that cannot be fully extracted in one measurement. Consequently, many useful quantum algorithms estimate an observable, expectation value, classification, sample, or global property rather than writing every component of a large vector into classical memory.

HHL as an Example

The Harrow-Hassidim-Lloyd algorithm addresses

Ax = b

under specific assumptions concerning sparsity, conditioning, state preparation, and access to A and b.

Its output is a quantum state related to the solution:

|x>

not a free classical listing of all components of x. If every component must be reconstructed classically, readout can consume much of the theoretical advantage.

Quantum Simulation

Quantum simulation is one of the most natural application areas because molecular and many-body systems are themselves quantum mechanical.

Potential applications include:

  • molecular ground-state energies,
  • reaction mechanisms,
  • catalyst design,
  • battery chemistry,
  • magnetic materials,
  • superconducting systems,
  • strongly correlated quantum matter.

The goal is not to eliminate physical experiments. A realistic use is to reduce the experimental search space and model candidate systems more accurately before laboratory validation.

Optimization

Quantum annealing, QAOA, and other methods are investigated for combinatorial optimization. Difficult optimization does not automatically imply quantum advantage. Strong classical baselines—including mathematical programming, local search, approximation algorithms, and specialized heuristics—must be included in any meaningful comparison.

Gate-model quantum computing and quantum annealing are distinct computational models and should not be compared by physical-qubit count alone.

Quantum Hardware

A qubit is an information concept, not one physical implementation. Research platforms include:

  • superconducting circuits,
  • trapped ions,
  • neutral atoms,
  • photonic systems,
  • semiconductor spin qubits,
  • topological approaches.

Important engineering metrics include gate fidelity, readout fidelity, coherence time, gate latency, connectivity, crosstalk, reset time, control complexity, scalability, and logical error rate.

Decoherence, Physical Qubits, and Logical Qubits

Real qubits interact with their environment. Gate errors, readout errors, crosstalk, thermal noise, control imperfections, and decoherence limit circuit depth.

A physical qubit is a hardware quantum degree of freedom. A logical qubit is protected quantum information encoded across multiple physical qubits using quantum error correction.

The resource chain is therefore:

algorithm
→ logical qubits
→ logical gates
→ target logical error rate
→ error correction
→ physical qubits
→ physical operations
→ wall-clock execution time

A thousand physical qubits and a thousand high-quality logical qubits are radically different resources.

Quantum Error Correction and Fault Tolerance

The no-cloning theorem prevents an unknown arbitrary quantum state from being copied perfectly. Classical redundancy schemes therefore cannot be transferred directly to quantum information.

Quantum error correction encodes logical information into larger entangled states and measures error syndromes without directly measuring the protected logical state.

Fault tolerance extends this principle to computation performed with imperfect components. If physical error rates satisfy the requirements of a fault-tolerant architecture, logical error rates can in principle be suppressed enough to support long computations, at substantial resource cost.

NISQ Systems and Hybrid Algorithms

Current processors are often discussed as noisy intermediate-scale quantum systems. They have limited circuit depth and are not general large-scale fault-tolerant machines.

Hybrid algorithms use a classical optimizer around a parameterized quantum circuit:

choose θ classically
→ prepare |ψ(θ)>
→ run quantum circuit
→ measure cost
→ update θ classically
→ repeat

VQE and QAOA are prominent examples. Hybrid structure alone does not establish advantage; measurement overhead, optimization difficulty, noise, and classical alternatives remain decisive.

Quantum Machine Learning

Machine learning and quantum algorithms overlap in linear algebra, optimization, sampling, and high-dimensional representations. Research includes quantum kernels, parameterized quantum circuits, quantum linear-algebra methods, sampling, and learning directly from quantum data.

The distinction between classical data and quantum data is fundamental. Classical text, images, audio, and tabular data must be encoded into a quantum system. Quantum experimental data may already exist in a form naturally processed by a quantum device.

Claims of speedup must therefore include the data-access model.

Large Language Models

Modern Transformer workloads are dominated by large tensor operations executed efficiently on GPUs and other classical accelerators. Replacing a matrix multiplication with a quantum subroutine does not automatically accelerate an LLM.

An end-to-end analysis must include model-state preparation, input encoding, nonlinear operations, intermediate-state use, gradients, optimization, measurement, and classical control.

The correct question is not “Will quantum computers make AI exponentially faster?” but:

Which specific subproblem, under which data-access and output requirements, can be solved at lower end-to-end cost with a quantum algorithm?

Quantum-Inspired Classical Algorithms

Quantum research can also improve classical algorithms. Ewin Tang's work on recommendation systems demonstrated that part of an apparent quantum advantage could be reproduced classically when a comparable data-access model was available.

This suggests a rigorous comparison process:

identify the claimed quantum advantage
→ identify the structural assumption producing it
→ ask whether that assumption is genuinely quantum
→ compare with the strongest classical algorithm

Cryptographic Impact

The clearest long-term security impact concerns public-key cryptography.

A sufficiently capable fault-tolerant quantum computer running Shor's algorithm threatens:

RSA
finite-field DH
ECDH
DSA
ECDSA

This is a future-capability threat model, not a claim that present quantum computers can break modern production keys.

Harvest Now, Decrypt Later

Long-lived confidential traffic can be collected today and stored until future cryptanalytic capability becomes available:

capture encrypted data now
→ retain it
→ obtain future quantum capability
→ attack vulnerable key establishment
→ decrypt historical data

Migration urgency therefore depends on data confidentiality lifetime as well as hardware timelines.

Symmetric Cryptography and Grover

For an ideal k-bit key search, Grover reduces query complexity from approximately

2^k

to

2^(k/2)

This does not equal practical wall-clock attack cost. Reversible circuit implementation, logical resources, error correction, and oracle depth substantially affect real cost.

Post-Quantum Cryptography

Post-quantum cryptography runs on classical computers and uses schemes intended to resist known classical and quantum attacks.

NIST's first core PQC standards published in 2024 include:

FIPS 203 → ML-KEM
FIPS 204 → ML-DSA
FIPS 205 → SLH-DSA

Migration is a system-engineering problem involving PKI, certificates, TLS, VPNs, HSMs, firmware signing, key management, protocol sizes, performance, interoperability, and long-lived devices.

Crypto-agility—the ability to replace cryptographic mechanisms without redesigning the entire system—is therefore strategically important.

Post-Quantum Cryptography vs Quantum Cryptography

PQC and quantum cryptography are different.

PQC uses classical hardware with quantum-resistant mathematical constructions. Quantum Key Distribution uses quantum states and physical communication properties.

BB84 is a foundational QKD protocol. QKD still requires authenticated classical communication and specialized infrastructure; it is not a drop-in software replacement for ordinary Internet cryptography.

Quantum Networks and No-Cloning

Quantum networks aim to distribute quantum states or entanglement between nodes. Quantum teleportation transfers a quantum state using shared entanglement plus classical communication; it does not transmit usable information faster than light.

The no-cloning theorem also means that classical concepts such as arbitrary copying, replication, and fan-out cannot be applied directly to unknown quantum states.

Quantum Computational Advantage

A demonstration that a quantum device outperforms known classical methods on a specific task does not imply superiority on general workloads. Classical simulation algorithms also improve, making quantum advantage a moving target.

Performance must be characterized using more than physical-qubit count:

logical qubits
gate fidelity
measurement fidelity
coherence
connectivity
circuit depth
logical error rate
execution time

Classical Simulation Limits

A full state-vector simulation requires 2^n complex amplitudes. With 16 bytes per complex double-precision amplitude, raw state storage is approximately:

30 qubits → 16 GiB
35 qubits → 512 GiB
40 qubits → 16 TiB
45 qubits → 512 TiB
50 qubits → 16 PiB

Yet qubit count alone does not determine simulation difficulty. Tensor networks, stabilizer methods, symmetry, sparsity, low entanglement, and approximation can make particular circuits much easier to simulate.

A Realistic Hybrid Architecture

A plausible long-term architecture is:

application
    |
classical CPU/GPU system
    |
    +-- data management
    +-- networking
    +-- control
    +-- classical computation
    |
    +-- QPU accelerator
          |
          +-- selected quantum subroutines

The QPU is therefore better understood as a specialized accelerator than as a universal replacement for classical computing.

End-to-End Quantum Advantage

A practical comparison should account for:

Ttotal =
    Tstate_preparation
  + Tclassical_preprocessing
  + Tquantum_execution
  + Terror_correction
  + Tmeasurement
  + Trepetitions
  + Tclassical_postprocessing
  + Tcommunication

Practical advantage requires the full quantum path to outperform the best relevant classical implementation at the target problem size and accuracy.

Application Areas

Promising research areas include quantum chemistry, materials, selected optimization problems, finance, energy, and drug-related molecular simulation. Their maturity and evidence levels differ substantially.

Quantum computing should therefore be evaluated problem by problem rather than through broad claims about “exponential speed.”

Common Misconceptions

  • A qubit is not simply two classical bits processed simultaneously.
  • n qubits do not provide free access to 2^n classical answers.
  • Quantum computers are not known to solve all NP-complete problems efficiently.
  • Present quantum computers cannot run Shor at the scale required to break modern RSA keys.
  • PQC does not require a quantum computer.
  • QKD and PQC are different technologies.
  • More physical qubits do not automatically mean more useful computational power.
  • Quantum hardware does not automatically make general-purpose AI training exponentially faster.

Engineering Checklist

Before adopting a quantum approach, determine:

  1. What is the exact problem and output requirement?
  2. Which quantum algorithm applies?
  3. What is the strongest classical baseline?
  4. What data-access assumptions are required?
  5. What is the state-preparation cost?
  6. What is the oracle cost?
  7. How many logical qubits and logical gates are required?
  8. What logical error rate is necessary?
  9. What physical error-correction overhead follows?
  10. How many measurements and repetitions are required?
  11. How is the result extracted?
  12. What classical pre/post-processing is required?
  13. What is the end-to-end latency and resource cost?
  14. At what problem size does any advantage appear?

Quantum computing is important not because it removes every computational limit, but because it demonstrates that computational complexity can depend on the physical and mathematical model used to perform computation.

References

  • Feynman, R. P. “Simulating Physics with Computers.” International Journal of Theoretical Physics, 1982.
  • Deutsch, D. “Quantum Theory, the Church-Turing Principle and the Universal Quantum Computer.” Proceedings of the Royal Society A, 1985.
  • Shor, P. W. “Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer.” SIAM Journal on Computing, 1997.
  • Grover, L. K. “A Fast Quantum Mechanical Algorithm for Database Search.” STOC, 1996.
  • Wootters, W. K., Zurek, W. H. “A Single Quantum Cannot Be Cloned.” Nature, 1982.
  • Harrow, A. W., Hassidim, A., Lloyd, S. “Quantum Algorithm for Linear Systems of Equations.” Physical Review Letters, 2009.
  • Preskill, J. “Quantum Computing in the NISQ era and beyond.” Quantum, 2018.
  • Biamonte, J. et al. “Quantum Machine Learning.” Nature, 2017.
  • Tang, E. “A Quantum-Inspired Classical Algorithm for Recommendation Systems.” STOC, 2019.
  • Huang, H. Y. et al. “Quantum Advantage in Learning from Experiments.” Science, 2022.
  • Bennett, C. H., Brassard, G. “Quantum Cryptography: Public Key Distribution and Coin Tossing.” 1984.
  • NIST. FIPS 203, FIPS 204, FIPS 205, 2024.
QR code for this page