Site Tools


quantum-dummy-text

Quantum concepts

A Qubit lives in a two-dimensional complex Hilbert space $\mathbb{C}^2$. You write its state in Dirac notation as $\lvert\psi\rangle = a\lvert 0\rangle + b\lvert 1\rangle$, where $a$ and $b$ are complex numbers called probability amplitudes, constrained by $|a|^2 + |b|^2 = 1$. The two basis states $\lvert 0\rangle$ and $\lvert 1\rangle$ are the quantum analogs of classical 0 and 1, but before any measurement the qubit genuinely occupies both at once — the amplitudes are not a description of ignorance, they are a physical feature of the system.

What happens when you actually measure the qubit? It collapses: you get $\lvert 0\rangle$ with probability $|a|^2$ or $\lvert 1\rangle$ with probability $|b|^2$, and the original superposition is destroyed. That rule is the Born rule, and it is the only way quantum information becomes classical information. This is also why you cannot just “read” a quantum state — a single measurement gives you one classical bit, and you cannot recover the amplitudes $a$ and $b$ from it.

A quantum register of $n$ qubits has a state vector in $\mathbb{C}^{2^n}$. That exponential blowup is the whole story: a 50-qubit register requires $2^{50} \approx 10^{15}$ complex amplitudes to describe classically, which is already intractable. When two qubits are entangled, their joint state cannot be written as a product of individual qubit states — measuring one qubit instantly determines something about the other, regardless of distance. The Bell states are the canonical maximally entangled two-qubit states and show up constantly in quantum information.

Quantum state

A quantum state is a complete description of a quantum system at a given moment. For a pure single-qubit system that is just a unit vector in $\mathbb{C}^2$ — two complex numbers (minus the global phase freedom) — which you can visualize as a point on the Bloch sphere. The north and south poles are the computational basis states $\lvert 0\rangle$ and $\lvert 1\rangle$. Every other point on the sphere is a superposition state, with the equator holding the states that are in equal superposition between $\lvert 0\rangle$ and $\lvert 1\rangle$.

The six cardinal points of the Bloch sphere are the most commonly used single-qubit states. The $\pm z$ poles are $\lvert 0\rangle$ and $\lvert 1\rangle$. The $\pm x$ equatorial points are $\lvert +\rangle$ and $\lvert -\rangle$, which differ only in the relative sign of their amplitudes. The $\pm y$ equatorial points are $\lvert +i\rangle$ and $\lvert -i\rangle$, which carry a complex relative phase of $\pm i$. These six states are the eigenstates of the three Pauli operators $X$, $Y$, $Z$, and come up in measurement bases, gate decompositions, and state preparation constantly.

Multi-qubit entangled states do not fit on a single Bloch sphere — the state space is too large for that picture. The Bell states are the four maximally entangled two-qubit states and are the building block of quantum teleportation, superdense coding, and Bell inequality tests. Three-qubit entanglement splits into two distinct classes: the GHZ state is a fragile “all or nothing” superposition that collapses to a fully unentangled product state if you lose even one qubit, while the W state is robust — tracing out any one qubit still leaves the other two entangled.

Quantum gates

Quantum gates are the operations that act on qubits. Every gate is a unitary matrix, which means two things: it preserves the norm of the state vector (probabilities always sum to 1), and it is reversible. There is no quantum equivalent of a lossy classical gate like AND or OR — every quantum operation can be undone. In practice this means circuits can run backwards, which is sometimes useful and sometimes a constraint you have to work around.

Single-qubit gates correspond to rotations on the Bloch sphere. The X gate rotates $180°$ around the $x$-axis, swapping $\lvert 0\rangle \leftrightarrow \lvert 1\rangle$ like a classical NOT. The Hadamard gate rotates the north pole to the $+x$ equatorial point, turning $\lvert 0\rangle$ into equal superposition $\lvert +\rangle$. The Z gate leaves $\lvert 0\rangle$ unchanged and flips the sign of $\lvert 1\rangle$. The rotation gates $R_x$, $R_y$, $R_z$ generalize these to arbitrary angles, and the U gate parameterizes every possible single-qubit rotation in three angles $(\theta, \phi, \lambda)$.

Two-qubit gates are where entanglement enters the picture. The CX gate flips a target qubit if and only if the control qubit is $\lvert 1\rangle$; applied to $\lvert +\rangle\lvert 0\rangle$ it produces a Bell state. Together with single-qubit gates, CX forms a universal gate set — any unitary on any number of qubits can be decomposed into CX plus single-qubit rotations. Designing a quantum algorithm then means choosing which gates to apply and in what order so that interference amplifies the probability of the right answer and kills off the wrong ones. That interference engineering is the central challenge of quantum programming.

Quantum algorithms

The circuit model is the dominant framework for quantum algorithms. You start with a register initialized to $\lvert 0\rangle^{\otimes n}$, apply a sequence of gates, and then measure. The algorithm is the circuit: it has to be designed so that the amplitudes of wrong answers interfere destructively while the amplitudes of correct answers interfere constructively. There are no loops, no branches in the classical sense — just carefully engineered interference. Getting this right is hard, which is why the number of known quantum algorithms with proven speedups is still relatively small.

The famous ones are worth knowing. Deutsch-Jozsa is the simplest example that shows a quantum computer can outperform a classical one on a structured query problem — not practically useful, but the proof of concept. Shor's algorithm factors integers in polynomial time, which threatens RSA and was the main reason governments started funding quantum computing seriously. Grover's algorithm gives a quadratic speedup for searching an unstructured database — not as dramatic as Shor's, but it applies to a much wider class of problems. The Quantum Fourier Transform is the subroutine that powers Shor's and several others.

Current hardware is nowhere near running Shor's at any useful scale. We are in the NISQ era: devices with tens to a few thousand qubits, error rates too high for deep fault-tolerant circuits, and coherence times measured in microseconds to milliseconds. Near-term algorithms like VQE (quantum chemistry) and QAOA (combinatorial optimization) work around this by using shallow circuits and offloading the optimization to a classical outer loop. Whether NISQ algorithms will deliver any genuine quantum advantage before fault-tolerant hardware arrives is still an open question.

Quantum error correction

The gate model assumes qubits evolve in perfect isolation. Real hardware does not cooperate. Physical qubits interact with their environment through stray electromagnetic fields, thermal fluctuations, and imperfect control pulses. This causes decoherence: the quantum state leaks information into the surroundings and the superposition gradually degrades into a classical mixture. Once a qubit decoheres, the interference that the algorithm depended on no longer works.

When decoherence enters the picture, a state vector is no longer enough to describe the system. You need a density matrix $\rho$, a positive semidefinite matrix of trace 1 that encodes both quantum superposition and classical uncertainty. A pure state like $\lvert\psi\rangle\langle\psi\rvert$ has $\text{tr}(\rho^2) = 1$; a fully decohered mixed state has $\text{tr}(\rho^2) < 1$. The dynamics of this open system are governed by the Lindblad master equation, which adds dissipation and dephasing terms to the Schrödinger equation. Individual noise events — bit flips, phase flips, amplitude damping — are modeled as Kraus operators acting on $\rho$.

Quantum error correction works by encoding a single logical qubit into several physical qubits so that errors can be detected and corrected without ever measuring the logical state directly. The trick is to measure only error syndromes — quantities that reveal whether an error occurred and what type, without collapsing the encoded information. This requires a lot of physical qubits per logical qubit (current estimates for fault tolerance are in the hundreds to thousands), which is why fault-tolerant quantum computing remains an engineering challenge rather than a done deal.

quantum-dummy-text.txt · Last modified: by 127.0.0.1