How does Quantum Computing Work?

Technology — James William Steven Parker

Quantum computing works by preparing, manipulating and measuring quantum states according to the rules of quantum mechanics. The fundamental information carrier is the qubit, whose state can be a superposition of the computational basis states 0 and 1. A quantum computation begins by preparing qubits in known states, commonly the all-zero state. Quantum gates then apply precisely controlled unitary transformations to those qubits. These transformations alter probability amplitudes and relative phases, and multi-qubit gates can create entanglement.

The circuit is designed so that quantum interference changes the probability distribution of possible measurement results in a useful way. At the end, measurements convert quantum information into classical bits that a conventional computer can record and analyse. A quantum algorithm therefore consists not merely of "using superposition", but of a carefully constructed sequence of state preparation, transformations, interference and measurement designed to extract particular information with a useful probability of success.

A single-qubit state can be written as alpha times the basis state 0 plus beta times the basis state 1, with alpha and beta being complex amplitudes whose squared magnitudes sum to one. If a qubit is measured in the computational basis, the result is 0 with probability given by the squared magnitude of alpha and 1 with probability given by the squared magnitude of beta.

Before measurement, the amplitudes evolve deterministically according to quantum operations, even though individual measurement results are probabilistic. This distinction is important because quantum computation does not mean that a computer simply stores two classical values in one qubit. The amplitudes contain information about probability and phase, and quantum gates transform both. Relative phase is especially important because interference depends on how amplitudes combine. A quantum algorithm can therefore cause amplitudes for some outcomes to reinforce one another while amplitudes for other outcomes cancel.

With multiple qubits, the computational state space expands exponentially in the number of qubits. Two qubits have four computational-basis states, three have eight, and n qubits have 2^n basis states in the mathematical state representation. A general n-qubit pure state is described by amplitudes associated with these basis states. Entangling gates can create states that cannot be represented as independent single-qubit states. This high-dimensional state space is one reason quantum systems are difficult to simulate classically in general.

However, the exponential number of amplitudes should not be interpreted as exponential classical memory that can be directly read from the quantum processor. Measurement returns only a classical outcome, and extracting a complete arbitrary state would generally require many repeated experiments and an amount of information that grows rapidly. Quantum algorithms must therefore encode the desired computation into measurable statistical outcomes rather than relying on direct access to every amplitude.

Quantum interference is the mechanism that turns superposition into algorithmic utility. Suppose a quantum algorithm produces several computational paths leading to the same possible measurement outcome. Their complex amplitudes combine, and the resulting probability depends on the squared magnitude of the combined amplitude. If amplitudes have compatible phases, they can reinforce one another; if their phases oppose one another, they can partially or completely cancel. Quantum algorithms use this principle deliberately.

The Hadamard transform, for example, can create superpositions and later recombine them so that phase information affects the probability distribution. Grover's search algorithm uses repeated transformations to increase the amplitude of a desired solution relative to other possibilities. Shor's algorithm uses quantum interference and the quantum Fourier transform to extract periodic structure that supports efficient factoring. Thus superposition by itself does not provide a useful computational advantage; the algorithm must create and exploit interference in a controlled manner.

Quantum measurements provide the connection between the quantum computation and classical information. Measuring a qubit in a chosen basis produces a classical result according to probabilities determined by the quantum state. Measurement generally changes the state, so algorithms cannot normally measure every intermediate state without disturbing the computation. Different measurement bases can reveal different properties of the same quantum state.

In a computational basis measurement, a qubit yields 0 or 1, while other bases can be used to investigate complementary observables. Practical quantum algorithms often run the same circuit repeatedly, producing many samples called shots. The distribution of those outcomes can reveal the answer or estimate an expectation value. Statistical sampling is therefore an integral part of many quantum computations, particularly variational and hybrid algorithms. A useful quantum result is normally inferred from repeated measurements rather than obtained as a deterministic readout of an entire quantum state.

Physical quantum computers implement abstract gates using hardware-specific control operations. In superconducting systems, microwave pulses manipulate quantum states of electrical circuits; in trapped-ion systems, laser or electromagnetic interactions control internal ion states; in other platforms, optical, electrical or magnetic controls may be used. The physical operation corresponding to a logical gate is not perfectly ideal. Calibration errors, environmental coupling, crosstalk, leakage, measurement errors and control noise introduce deviations from the intended quantum transformation.

Quantum compilation translates an abstract circuit into operations supported by the particular hardware, taking account of native gates, connectivity and timing. Error mitigation techniques can sometimes reduce the effect of errors in near-term experiments, while quantum error correction aims to encode logical qubits in many physical qubits so that errors can be detected and corrected during computation.

Scalable quantum computing requires fault-tolerant operation because physical errors accumulate as circuits become deeper and larger. Quantum error-correcting codes distribute a logical qubit across multiple physical qubits and use additional measurements to determine error syndromes. The syndrome information indicates aspects of the physical error without directly revealing the logical quantum information. A classical decoding process can infer likely errors, after which corrections can be applied physically or tracked in software.

Fault tolerance requires physical error rates and operation conditions to remain within regimes where error correction can suppress rather than amplify errors. This is difficult because adding error correction itself introduces more operations, measurements and qubits, each of which can introduce further errors. The practical pathway from today's noisy experimental devices to large-scale fault-tolerant machines therefore involves improvements in physical fidelity, qubit connectivity, control systems, fabrication, decoding, logical operations and system architecture rather than simply increasing a single qubit-count number.

A complete quantum computing system is consequently a hybrid of quantum and classical technologies. A classical computer typically prepares or compiles circuits, sends control instructions to the quantum processor, collects measurement results, performs statistical processing and manages experiments. The quantum processor performs the parts of the computation for which quantum evolution is being exploited. In some algorithms, especially variational methods, the two systems form an iterative loop in which classical optimisation changes quantum-circuit parameters based on measured outputs.

The usefulness of quantum computing ultimately depends on whether the complete system can perform a target task more efficiently, accurately or otherwise advantageously than relevant classical alternatives after accounting for data loading, circuit execution, error correction, measurement and infrastructure overhead. Quantum computing therefore works through controlled quantum-state evolution and interference followed by classical interpretation, not through a simple replacement of binary transistors with a faster type of transistor.