How can one qubit have a 70% chance of outcome 0 and a 30% chance of outcome 1?
A pure qubit state is specified by two complex amplitudes. Their squared magnitudes—not the amplitudes themselves—give probabilities when measured in the chosen basis.
State and transformation
Quantum circuit
Circuit wire labels follow the Qiskit indexing convention; Statevector results are computed with an ideal simulator, not hardware.
Analytic predictions and simulator results
Swipe the results table horizontally to see all columns.
| Quantity | Analytic prediction | Computed value or classical sample |
|---|---|---|
| Exact Z-basis P(0) | 70.00% | 70.00% · Qiskit |
| Exact Z-basis P(1) | 30.00% | 30.00% · Qiskit |
| NumPy draws: outcome 0 | 70% in expectation | 713 / 1,024 (69.63%) |
Values are reported from the previously completed local experiments: exact ideal statevector probabilities (Qiskit), classical NumPy sampling where stated, and the specified NumPy density-matrix calculation. These are not observations from physical quantum hardware. Rounded values are shown for readability.
Minimal Qiskit example
This independently written teaching snippet illustrates the verified circuit principle without disclosing the private lab source. Run it with NumPy and Qiskit installed; this abbreviated public snippet has undergone source and syntax review, but not a separate Qiskit-enabled execution test.
import numpy as np
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
p0 = 0.70
theta = 2 * np.arccos(np.sqrt(p0))
circuit = QuantumCircuit(1)
circuit.ry(theta, 0)
state = Statevector.from_instruction(circuit)
print(np.round(state.data, 6))
print(np.round(state.probabilities(), 6))
assert np.allclose(state.probabilities(), [0.7, 0.3])The circuit starts in |0⟩. This Ry preparation produces real, nonnegative amplitudes; general pure qubit states also carry relative complex phase.
Computations are local ideal statevector calculations. Nothing here sends jobs to an IBM Quantum device or cloud backend.
What we can conclude
A gate can prepare the requested amplitudes; the resulting statevector agrees with the analytic prediction. Finite sampling need not equal the exact probability.
Statevector.from_instruction computes an ideal quantum state on a classical computer. The 1,024 draws reported here came from NumPy—not a physical QPU or a shot-based Qiskit backend.