Beginner lesson · No prerequisites
Your first qubit experiment
Can one operation change the odds of what you read? Make a prediction, measure a simulated qubit, then change the circuit and try again.
Try the experiment ↓ Read the three questionsIdea 1 / Measurement
What could one reading show?
Prepare a qubit in 0. A gate is an operation that changes its state. Start with one Hadamard gate, written H. Predict which results a 0/1 measurement could give.
Read the experiment in words and numbers
A qubit has an amplitude for each possible reading. Amplitudes can carry signs or phases that affect how contributions combine. The probability is the squared magnitude of the amplitude. These examples use real amplitudes.
Step 1 of 2 · Prepare 0
Amplitude for 0 is 1. Amplitude for 1 is 0.
| Step | Amplitude for 0 | Amplitude for 1 | Chance of 1 |
|---|---|---|---|
| Prepare 0 | 1 | 0 | 0% |
| Apply H | 1/√2 | 1/√2 | 50% |
The H gate gives both answers equal amplitude. Each has a one-half chance when you measure in the 0/1 basis. The simulator runs locally using the fixed seed 1729. Reset replays the same sequence. Longer runs include earlier trials. A real device can also have gate and readout errors.
Change the gate sequence
Try two H gates and predict again. For a harder comparison, try H then Z and Z then H. Look at the sign in the state table, then add the same final H to each sequence.
Three questions to take with you
What does one measurement give you?
One bit, 0 or 1, in the basis you choose. In the first circuit, each freshly prepared qubit has the same chance of either result. A single result cannot reveal those odds.
Recall · Would 14 ones in 24 trials contradict a 50% prediction?
No. Fifty percent describes the odds on each trial. A finite sample can have an uneven split. More trials help estimate the probabilities.
Why can a second gate make the result certain?
H splits the starting amplitude into two equal parts. A second H recombines them. The contributions to 1 have opposite signs and cancel. The contributions to 0 reinforce, so you get 0 every time in this ideal circuit.
Recall · What changes if we measure between the two H gates?
The first measurement leaves a 0 or a 1. Applying H to either gives equal 0/1 odds. Leaving the amplitudes undisturbed between the gates was essential to the certain result.
Where does a real machine enter the picture?
In a superconducting processor, a controller sends a pulse to the chip and extracts a classical result from a readout signal. Its electronics collect those results over repeated runs. Our browser experiment calculates the ideal probabilities and samples them in software.
Recall · Would a 50/50 split prove that a real gate was accurate?
No. Other states and even classical random bits could produce the same counts. Different measurement settings and calibration data are needed to test what a physical gate did.
In one November report, researchers checked which of two frequencies a single superconducting qubit occupied, then retuned their controls. The improvement applied to the measured device and operating conditions. Read how a real controller used one extra measurement.
Where can a relative sign show up?
Try adding a Z gate between two H gates. Track the amplitudes and see why the final result changes to 1.
Explore interference in the Foundations lab →Definitions and further reading
- Qubit
- A two-level quantum system used to encode information.
- Amplitude
- A number associated with a possible outcome in a chosen basis. Its magnitude and phase determine how possibilities combine.
- Probability
- The squared magnitude of an amplitude, giving the chance of that outcome.
- Measurement
- An operation that returns a classical outcome and in general changes the quantum state.
IBM Quantum Learning on states, probabilities and gates · Work through the state-vector calculations · Explore the historical timeline