In short: A quantum computer prepares qubits in a known state, spreads them into superposition, applies a short sequence of gates that steer amplitudes so wrong answers cancel and right answers reinforce, then measures to collapse the result into classical bits, repeating the run many times to read out probabilities.
The five-stage pipeline
Interviewers rarely want the Hilbert-space lecture. They want you to walk a run from start to finish and say what physically happens at each step. If you are new to the basics, start with what is quantum computing; here we follow one algorithm execution end to end.
Stage 1: initialising qubits
Every run starts from a known state, almost always |0⟩ on every qubit. On superconducting chips (IBM, Google) this means waiting several multiples of T1, the energy-relaxation time, which is typically 100 to 300 microseconds on current devices, or using active reset with a measurement and a conditional pulse. On trapped ions, optical pumping with a laser drives each ion into its ground state with over 99.9% fidelity. A register of n qubits in |0…0⟩ is a single basis state out of 2n; nothing quantum is happening yet.
Key fact: n qubits are described by 2n complex amplitudes. 50 qubits means about 1015 amplitudes, which is why classical state-vector simulators run out of memory near 45 to 50 qubits.
Stage 2: superposition with Hadamard gates
A Hadamard gate maps |0⟩ to (|0⟩+|1⟩)/√2. Applying H to all n qubits produces an equal superposition of all 2n basis states, each with amplitude 1/√2n. This is not "trying every answer in parallel and reading them all out." Measuring now would just give a random bit string. The value of superposition is that the following gates act on every amplitude at once, so you can manipulate a huge vector with a short circuit.
Stage 3: gate sequences and entanglement
Single-qubit gates (X, Z, H, rotations Rx, Ry, Rz) are unitary 2x2 matrices. Two-qubit gates such as CNOT or CZ create entanglement. The textbook example is a Bell pair: H on qubit 0, then CNOT with qubit 0 as control, gives (|00⟩+|11⟩)/√2. Neither qubit has a definite value alone, yet the two outcomes are perfectly correlated.
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2)
qc.h(0) # superposition
qc.cx(0, 1) # entangle
qc.measure([0, 1], [0, 1])
# 1000 shots -> roughly 500 "00" and 500 "11", never "01" or "10"
Hardware reality matters in interviews. A single-qubit gate takes about 20 to 50 ns, a two-qubit gate 100 to 500 ns, with two-qubit error rates around 0.1% to 1%. The compiler (Qiskit transpiler, Cirq) must map your logical circuit onto the chip's connectivity, inserting SWAPs, and decompose gates into the native set. Circuit depth is limited by decoherence: if T2 is 100 µs and a layer costs 300 ns, you have only a few hundred layers before noise wins.
Stage 4: interference does the real work
Amplitudes are complex numbers that can be negative. An oracle flips the sign (phase) of the amplitude on the correct answer without changing probabilities. A second operation, such as Grover's diffusion operator (reflection about the mean), converts that hidden sign difference into a visible amplitude difference. Wrong paths destructively interfere, the right path constructively interferes.
For N = 4 a single Grover iteration lands on the target with probability 1. For general N = 2n you need about (π/4)√N iterations; over-rotating makes the answer worse again. Shor's algorithm uses the same idea differently: a quantum Fourier transform makes amplitudes of the period of a modular function interfere into sharp peaks.
Stage 5: measurement and repeated shots
Measurement projects the state onto a basis state with probability equal to the squared amplitude magnitude (the Born rule). You get one classical bit string and the superposition is gone. So every real run is executed 1,000 to 10,000 times ("shots"), and you read the answer from the histogram. Readout is itself imperfect, with 1% to 5% error per qubit, so error mitigation corrects the histogram afterwards.
Key fact: Quantum speedup comes from interference, not from reading out all branches. If your explanation never mentions amplitudes cancelling, an interviewer will assume you described a lookup table.
Putting it together: a comparison table
| Stage | Operation | Typical hardware cost | Main failure mode |
|---|---|---|---|
| Initialise | Reset to |0…0⟩ | about 1 µs (active), 500 µs (passive) | Thermal residual excitation |
| Superpose | H on each qubit | 20 to 50 ns | Control pulse miscalibration |
| Gates | Oracle, CNOT/CZ | 100 to 500 ns per 2-qubit gate | Gate error 0.1% to 1% |
| Interfere | Diffusion, QFT | Many layers deep | Decoherence (T1, T2) |
| Measure | Projective readout | 0.5 to 2 µs | Readout error 1% to 5% |
Behind this sits a classical stack: microwave pulse generators, FPGAs for real-time feedback, and cryogenic control ASICs. That electronics is designed with the same tools as any mixed-signal SoC, using Cadence Virtuoso and Synopsys flows. If you want to build such control chips, ChipXpert VLSI training covers the design side. Error correction, the next big step, is covered in quantum error correction explained: a surface code may need roughly 1,000 physical qubits per logical qubit.
How to answer in an interview
- State the five stages in order and give one number for each (reset time, gate time, shots).
- Use a tiny worked example: Bell state for entanglement, N = 4 Grover for interference.
- Say plainly that measurement is destructive and answers are probabilistic, hence repeated shots.
- Name the limit: depth is capped by T2 and gate error, which is why today's devices are called NISQ.
Ready to go deeper? Build and run these circuits yourself in the hands-on modules on our CourseTron courses page, and practise interview-style walkthroughs with feedback.
FAQ
Does a quantum computer try all answers at once?
No. It holds amplitudes for all answers, but measurement returns only one. Algorithms are designed so interference concentrates probability on the correct answer before you measure.
Why are circuits run thousands of times?
Measurement is probabilistic and destructive, and hardware is noisy. Collecting 1,000 or more shots gives a histogram from which the most likely outcome and its confidence can be estimated.
What limits circuit depth today?
Decoherence times (T1, T2 around 100 µs on superconducting qubits) and gate errors of 0.1% to 1%. Errors accumulate multiplicatively, so a few hundred two-qubit gates already degrade results.
Which programming tools should I learn first?
Qiskit (IBM) and Cirq (Google) are the most common. Both let you build circuits, simulate them on a classical machine, and submit them to real hardware.