VibeQ
quantum computing in plain English
Open the app VibeGDS ↗ Circuit tutorial

Quantum computing in plain English

Eleven short sections, each with a circuit you can run in VibeQ while you read. No physics background needed; a little comfort with probabilities and the idea of a coin flip is enough.

1. Bits and qubits
2. Superposition is not "both at once"
3. Measurement: where the randomness comes from
4. The Bloch sphere
5. Gates
6. Entanglement
7. Interference: how quantum algorithms win
8. The famous algorithms
9. Teleportation and dense coding
10. Noise, errors and error correction
11. The hardware, and what to expect today

1. Bits and qubits

A classical bit is a switch: 0 or 1. A qubit is a physical system (an electron's spin, a superconducting loop's current, an ion's energy level) that has two states we label |0⟩ and |1⟩, plus the freedom to be in a combination of them. We write such a combination as

|ψ⟩ = a·|0⟩ + b·|1⟩, with |a|² + |b|² = 1

The numbers a and b are amplitudes. They can be negative, and in general complex. Their squares are the probabilities of reading 0 or 1 when you measure. That single sentence contains most of what is strange about quantum computing: probabilities come from squaring amplitudes, and amplitudes can cancel each other out.

A quantum computer holds n qubits. The state of all of them together is a list of 2ⁿ amplitudes, one for every bit string. Ten qubits is 1,024 amplitudes; fifty qubits is more amplitudes than any classical memory could store. That is the resource. The catch is that you only ever read out one bit string per run.

2. Superposition is not "both at once"

The gate that creates superposition is the Hadamard, H. On a qubit in |0⟩ it produces

H|0⟩ = (|0⟩ + |1⟩)/√2    so P(0) = ½, P(1) = ½

People say the qubit is "0 and 1 at the same time". A better picture: the qubit is in a definite state, |+⟩, that is simply not 0 or 1, the way north-east is a definite direction that is neither north nor east. If you ask it "north or east?" you get a random answer; if you ask "north-east or south-west?" you get a definite one. The question you ask is the measurement basis.

Try it A quantum random bit: one qubit in an equal superposition, measured once per shot. Look at the sampled counts: a fair coin.

Now the key fact. Apply H twice: H·H|0⟩ = |0⟩, with certainty. The second H does not "re-randomise"; it recombines the two amplitudes so that the |1⟩ part cancels. Randomness only appears when you measure. Between measurements everything is deterministic and reversible.

3. Measurement: where the randomness comes from

Measuring a qubit forces it into |0⟩ or |1⟩ with probabilities |a|² and |b|², and from then on it stays there (the superposition is gone). This is why quantum algorithms are designed as: prepare, manipulate amplitudes, measure once at the very end. Measuring in the middle throws information away, unless that is the point (teleportation uses it deliberately).

VibeQ shows you two things: the exact probabilities, computed from the amplitudes without measuring, and the sampled counts, which is what an experiment sees after N runs ("shots"). With 1,024 shots a 50/50 split comes out as roughly 512 ± 16 each.

4. The Bloch sphere

|0⟩|1⟩ |+⟩

Every single-qubit state is a point on a sphere: |0⟩ at the north pole, |1⟩ at the south pole, the equal superpositions around the equator (|+⟩ in front, |−⟩ at the back, and the ones with imaginary phases left and right). Single-qubit gates are rotations of this sphere. VibeQ draws one sphere per qubit in the Simulate tab. When a qubit is entangled with others its arrow shrinks toward the centre: on its own it has no definite direction at all.

5. Gates

A gate is a reversible operation on amplitudes. The ones you will meet most:

GateWhat it doesPicture
XBit flip: |0⟩ ↔ |1⟩ (the quantum NOT).180° turn about the x axis
ZPhase flip: leaves |0⟩, multiplies |1⟩ by −1. Invisible if you measure right away; decisive after another H.180° about z
HSuperposition maker and un-maker: |0⟩ → |+⟩, |1⟩ → |−⟩, and back.180° about the x+z diagonal
S, TQuarter and eighth turns of phase on |1⟩. T is what makes a gate set universal.90° / 45° about z
RX(θ), RY(θ), RZ(θ)Rotate by any angle θ. RY(π/3)|0⟩ has P(1) = sin²(π/6) = ¼.θ about that axis
CNOT (CX)Two qubits: flip the target if the control is 1. The gate that creates entanglement.–
CZ, CP(θ)Two qubits: apply a phase only when both are 1. Symmetric; no "target".–
Toffoli (CCX)Three qubits: flip the target if both controls are 1. Reversible AND.–

Any computation can be built from one-qubit rotations plus CNOT, which is why every chip exposes some such set and the compiler (the "transpile" step in VibeQ's Verify tab) rewrites your circuit into it.

Try it H, then CZ with the other qubit in |0⟩, then H again: the CZ does nothing because the control is never 1, and the two H's cancel. Outcome 00 with certainty.

6. Entanglement

Put qubit 0 in |+⟩ and then CNOT it onto qubit 1. The result is the Bell state

(|00⟩ + |11⟩)/√2

Measure either qubit and you get a fair coin; measure both and they always agree. Neither qubit has a state of its own any more (its Bloch arrow is zero length); only the pair does. This is not a hidden shared coin flip decided in advance: measurements along different axes violate bounds that any pre-decided answer would obey (Bell's theorem), which is why entanglement is a genuine computational resource rather than a bookkeeping trick.

Try it A Bell pair. Then: a 4-qubit GHZ state (all agree), and a 3-qubit W state (exactly one qubit is 1, nobody knows which).

GHZ and W are the two families of three-qubit entanglement, and they behave differently under loss: drop one qubit of a GHZ state and the rest is a plain classical mixture; drop one of a W state and the others stay entangled.

7. Interference: how quantum algorithms win

Amplitudes add like waves. Two paths to the same outcome with opposite signs cancel; two with the same sign reinforce. A quantum algorithm is a choreography that makes the wrong answers cancel and the right answer reinforce, before the single measurement at the end. Superposition lets you explore many bit strings in one state; interference is what turns that into an answer you can read.

The smallest example is the Hadamard sandwich from section 2: H, then a Z (phase flip) or nothing, then H. With nothing in between you read 0; with a Z in between you read 1, every time. The Z did not change any probability on its own (it only changed a sign), but the second H turned that sign into a certain outcome. Every oracle algorithm is this trick at scale.

8. The famous algorithms

Deutsch and Deutsch-Jozsa: one question instead of many

You are given a black-box function f on n bits that is promised to be either constant or balanced (half 0s, half 1s). Classically you may need 2ⁿ⁻¹ + 1 evaluations to be sure. Quantumly, one evaluation on a superposition of all inputs, followed by H gates, gives all-zeros for constant and anything else for balanced.

Try it Deutsch-Jozsa with the balanced oracle f(x) = x0 XOR x2: the readout is 101, never 000.

Bernstein-Vazirani: read a hidden string in one shot

If f(x) = s·x mod 2 for a hidden string s, the same circuit returns s itself. Classically you need n queries.

Try it Bernstein-Vazirani with the secret 1011.

Grover: search faster than looking at everything

Among N items one is marked. Classically you expect N/2 looks. Grover's algorithm finds it in about √N steps: start in an equal superposition, flip the sign of the marked item's amplitude (the oracle), then "reflect about the mean" (the diffusion step), and repeat. Each round rotates the state a fixed angle toward the answer, so you must stop at the right round: for 2 qubits one round is exact, for 3 qubits two rounds give about 94 %.

Try it Grover on 3 qubits marking |101⟩, two iterations. Then ask for three iterations and watch the probability fall again.

The quantum Fourier transform and phase estimation

The QFT turns phases into readable bit strings. Applied to a plain basis state it spreads the amplitude evenly (so you see a flat histogram), which looks useless until you use it backwards: phase estimation lets a register of counting qubits "feel" the phase a gate applies to an eigenstate and writes that phase out in binary. The T gate's phase of 1/8 reads as 001 on three counting qubits; S's 1/4 reads as 010. This is the core of Shor's factoring algorithm (which estimates the period of modular exponentiation) and of many chemistry algorithms (which estimate energies).

Try it Phase estimation of T: the counting register reads 001 with certainty.

Simon: the ancestor of Shor

A function with a hidden period s (f(x) = f(x ⊕ s)) yields, each run, a random string y with y·s = 0. A handful of runs and some linear algebra reveal s. Classically this needs exponentially many queries; this was the first exponential separation and the direct inspiration for Shor's algorithm.

Try it Simon with s = 11: only 00 and 11 ever appear.

9. Teleportation and dense coding

Entanglement plus classical communication can move a quantum state without moving the qubit. Teleportation: Alice holds an unknown state and half of a Bell pair; she measures both in the Bell basis (CNOT then H, then two measurements), sends the two classical bits to Bob, who applies X and/or Z to his half. His qubit is now in Alice's original state, and hers is destroyed. No information travelled faster than light: without the two bits, Bob's qubit is random.

Try it Teleport RY(π/3)|0⟩: the receiving qubit reads 1 exactly 25 % of the time, the state's own statistics.

Superdense coding is the mirror image: with a shared Bell pair, Alice can send two classical bits by sending one qubit, choosing one of four local operations before she sends it.

Try it Superdense coding of the bits 1, 0.

10. Noise, errors and error correction

Real qubits are fragile. A two-qubit gate on today's best superconducting chips is wrong roughly 0.3 to 1 % of the time; readout is wrong around 1 %; and a qubit left alone loses its state in tens to hundreds of microseconds. Multiply those over a circuit and you get the rule of thumb VibeQ warns about: past a few dozen two-qubit gates, most shots are noise.

Classical error correction copies bits; quantum states cannot be copied (the no-cloning theorem), and measuring them to check destroys them. The way out is to spread one logical qubit over several physical ones and measure only parities (do qubits 1 and 2 agree?), which reveal an error without revealing the state. The 3-qubit bit-flip code corrects one X error; the phase-flip code corrects one Z error; Shor's 9-qubit code and the surface code correct both, at the price of many physical qubits per logical one. Fault-tolerant machines are the goal of the whole field; the circuits in VibeQ are the ones on today's "NISQ" hardware, run without correction.

Try it The bit-flip code: inject an error, read the syndrome, correct, and recover |1⟩.

11. The hardware, and what to expect today

PlatformQubitNative gates (as VibeQ compiles them)ConnectivityCharacter
Superconducting (IBM, Google, Rigetti)Josephson-junction circuit at ~15 mKrz, sx, x, cx (or cz, ecr)Nearest neighbours on a lattice (IBM: heavy-hex)Fast gates (tens of ns), short lifetimes, SWAPs for distant pairs
Trapped ions (IonQ, Quantinuum)Electronic levels of a single atomrx, ry, rz, rxx (Mølmer-Sørensen)All-to-all within a trapSlow gates (µs), long lifetimes, high fidelity
Neutral atoms (QuEra, Pasqal)Rydberg states of trapped atomsGlobal rotations, Rydberg CZReconfigurableHundreds of qubits, strong for analogue problems
Photonic (PsiQuantum, Xanadu)Photons in waveguides, the chips VibeGDS designsBeam splitters, phase shifters, measurementsLinear optics plus feed-forwardRoom-temperature components, probabilistic gates

What you can do today: run circuits of a few dozen qubits and a few dozen two-qubit gates on real machines through cloud consoles, using the OpenQASM 3 file VibeQ exports. What you cannot yet do: break RSA, or run a chemistry simulation that beats a classical computer; those need error-corrected machines with thousands of logical qubits. The honest state of the art is "useful experiments, not yet useful advantage", and the circuits on this page are the ones everyone learns on.

Open VibeQ and build the circuits in this page   Next how to make circuits well