Step 04 of 12 · 25 min
Bell state in Composer
One circuit. H on qubit 0, CX with control 0 and target 1, then measure. Predict, then simulate.
Build it
Write the prediction before you run: the ideal simulation piles on 00 and 11. Counts on 01 and 10 are missing or tiny.
Qiskit prints bitstrings with qubit 0 on the right. In this circuit, 00 and 11 look the same if you reverse them. The rightmost bit is still qubit 0.
A hardware compare is optional. It uses the Open Plan window. Hardware can show 01 and 10 because of noise. Start on the simulator.
- Open Composer and create a circuit with two wires.
- Place H on qubit 0.
- Place CX with control on qubit 0 and target on qubit 1.
- Measure both qubits.
- Read left to right: H, then CX, then measurement.
- Run the ideal simulation and compare it with the histogram on this page.
The histogram is flat
What may have happened: H is on a different qubit, or CX has the control and target swapped. Check that H is on qubit 0 and that CX uses qubit 0 as control and qubit 1 as target. A facilitator can look at the wires with you. You can keep adjusting on the simulator.
01 and 10 appeared on hardware
What may have happened: hardware noise added counts the ideal circuit does not predict. That can happen on a QPU. The ideal simulator should still pile on 00 and 11. Ask a facilitator if you want a second pair of eyes. Keep the simulator result as the picture of the circuit you wrote.
Composer does not load
What may have happened: the page stalled. Refresh once, and try current Chrome, Edge, or Firefox. Tell a facilitator if it stays blank. The Python lab on the next page does not need Composer, so you can keep learning there.
