⚛ Quantum & Post-Quantum

Quantum Computing Explained: Qubits, Superposition, and Entanglement

Quantum computing is a model of computation that harnesses quantum-mechanical phenomena such as superposition, entanglement, and interference to process information in ways classical machines cannot efficiently reproduce. For security practitioners, quantum computing matters because a sufficiently capable machine could undermine much of the public-key cryptography that protects data in transit and at rest. This article breaks down the fundamental building blocks, qubits, superposition, and entanglement, and shows how they combine into powerful quantum algorithms.

From Classical Bits to Qubits

A classical bit is definitively either 0 or 1. A qubit (quantum bit) is the quantum analogue, but instead of holding a single fixed value it holds a *state* that can be a blend of both basis states, written |0⟩ and |1⟩ in Dirac (bra-ket) notation.

A qubit's state is described by two complex numbers called amplitudes, as in |ψ⟩ = α|0⟩ + β|1⟩, subject to the normalization constraint |α|² + |β|² = 1. The values α and β encode both a magnitude and a phase. Geometrically, a single qubit's state maps to a point on the surface of the Bloch sphere, where the poles represent |0⟩ and |1⟩ and every other point is a valid superposition. Physical qubits are built from several substrates, including superconducting circuits, trapped ions, and photons.

Superposition

Superposition is the ability of a qubit to exist as a weighted combination of |0⟩ and |1⟩ at the same time. A register of n qubits can represent a superposition over all 2ⁿ possible bit strings simultaneously. This exponentially large state space is a key source of quantum computing's potential power.

Crucially, you cannot read the amplitudes directly. When you measure a qubit, it collapses to a single classical outcome. The Born rule gives the probability of each result: you observe 0 with probability |α|² and 1 with probability |β|². Measurement is irreversible and destroys the superposition, so quantum algorithms must be engineered to make the *desired* answer overwhelmingly likely before measurement occurs.

Entanglement

Entanglement is a uniquely quantum correlation between two or more qubits whose joint state cannot be factored into independent single-qubit states. When qubits are entangled, measuring one instantaneously constrains the outcomes of the others, regardless of the distance between them.

The canonical example is the Bell state |Φ⁺⟩ = (|00⟩ + |11⟩)/√2. Here the two qubits are perfectly correlated: measuring the first as 0 guarantees the second is 0, and likewise for 1, even though neither qubit had a definite value beforehand. Entanglement lets quantum algorithms coordinate interference across many qubits, and it underpins protocols such as quantum teleportation and entanglement-based quantum key distribution.

Quantum Gates and Circuits

Quantum computation proceeds by applying quantum gates, reversible operations represented by unitary matrices, to qubits arranged in a circuit. Common gates include:

  • Hadamard (H) creates superposition, mapping |0⟩ to an equal blend of |0⟩ and |1⟩.
  • Pauli-X is the quantum NOT gate, swapping |0⟩ and |1⟩.
  • CNOT (controlled-NOT) flips a target qubit conditioned on a control qubit and can generate entanglement.
  • Phase gates rotate the relative phase between amplitudes.

A minimal circuit that produces the Bell state above looks like this:

q0: ──H──●──      # Hadamard puts q0 into superposition
         │
q1: ─────X──      # CNOT entangles q1 with q0
        (then measure q0 and q1)

Interference and Why Quantum Algorithms Work

The final ingredient is interference. Because amplitudes are complex numbers, they can add constructively or cancel destructively, much like waves. A well-designed quantum algorithm arranges the computation so that amplitudes leading to wrong answers cancel while amplitudes leading to the correct answer reinforce one another.

This mechanism drives the two algorithms that most concern cryptographers:

The Challenge of Building Real Machines

Qubits are fragile. Interaction with the environment causes decoherence, which corrupts quantum states, and every gate operation introduces noise. Practical large-scale machines therefore require quantum error correction, in which many noisy *physical* qubits are combined to form one reliable *logical* qubit. The heavy overhead this imposes is a central reason why cryptographically relevant quantum computers remain a formidable engineering challenge, and why estimates of the threat timeline vary widely.

Key Takeaways

  • Quantum computing stores information in qubits, which use superposition to represent combinations of |0⟩ and |1⟩ rather than a single fixed value.
  • Superposition over n qubits spans 2ⁿ states, but measurement collapses the system to one classical outcome governed by the Born rule.
  • Entanglement creates correlations between qubits that have no classical equivalent and are essential to quantum algorithms.
  • Quantum gates manipulate amplitudes so that interference amplifies correct answers and cancels wrong ones.
  • Decoherence and the overhead of error correction make scalable quantum hardware extremely difficult to build, which shapes how quickly the cryptographic threat can materialize.
quantum-computingqubitssuperpositionentanglementcryptography

Frequently asked questions

What is quantum computing?

Quantum computing is a model of computation that uses quantum-mechanical phenomena such as superposition, entanglement, and interference to process information in ways classical computers cannot efficiently reproduce. Instead of bits that are strictly 0 or 1, it uses qubits that can represent blended states. For security it matters because a sufficiently capable quantum computer could break much of the public-key cryptography that protects data.

What is a qubit?

A qubit, or quantum bit, is the basic unit of quantum information and the quantum analogue of a classical bit. Rather than holding a fixed 0 or 1, it holds a state that can be a weighted combination of both, described by complex numbers called amplitudes. A register of n qubits can represent a superposition over all 2^n possible bit strings at once.

What is superposition in quantum computing?

Superposition is the ability of a qubit to exist as a weighted combination of 0 and 1 at the same time rather than a single fixed value. This lets n qubits span an exponentially large space of 2^n states simultaneously, which is a key source of quantum computing's power. However, measuring a qubit collapses it to one classical outcome, so algorithms must make the desired answer overwhelmingly likely before measurement.

What is quantum entanglement?

Entanglement is a uniquely quantum correlation between two or more qubits whose joint state cannot be separated into independent single-qubit states. When qubits are entangled, measuring one instantly constrains the outcomes of the others regardless of the distance between them. Entanglement lets quantum algorithms coordinate interference across many qubits and underpins protocols such as quantum teleportation and quantum key distribution.

Why is quantum computing a threat to cryptography?

A large, fault-tolerant quantum computer could run Shor's algorithm to efficiently factor large integers and solve discrete logarithms, breaking RSA, Diffie-Hellman, and elliptic-curve cryptography. Grover's algorithm additionally offers a quadratic speedup against symmetric ciphers and hash functions, effectively halving their security. This is why organizations are moving toward post-quantum cryptography.

Why are quantum computers so hard to build?

Qubits are extremely fragile, and any interaction with their environment causes decoherence that corrupts their quantum states, while every gate operation adds noise. Practical large-scale machines require quantum error correction, combining many noisy physical qubits into a single reliable logical qubit. This heavy overhead is a central reason cryptographically relevant quantum computers remain a formidable engineering challenge.

Try it hands-on

K0G is an open toolkit of browser-based security utilities — hashing, encoding, JWT, certificates, crypto and more, all running locally in your browser.

Explore the tools →