Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

A single qubit with Qiskit

Published Sep 28, 2026

Last updated Sep 28, 2026

We prepare the one-qubit state ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha|0\rangle + \beta|1\rangle, draw its circuit, print its statevector, and plot it on the Bloch sphere. The amplitudes must satisfy ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1.

The outputs below are saved from a completed run. To change the amplitudes, open this notebook in Jupyter, edit alpha and beta, and run the cells from top to bottom. This example uses an exact statevector calculation, so no quantum hardware account is needed.

Create a circuit with one qubit. Change the two amplitudes below to try your own normalized state. Qiskit orders the amplitudes as [α,β][\alpha,\beta], corresponding to [∣0⟩,∣1⟩][|0\rangle,|1\rangle]. The initialize instruction prepares those amplitudes on qubit 0.

Loading...

Print the quantum state. Statevector.from_instruction evaluates the circuit before any measurement. The array contains complex amplitudes; their squared magnitudes give the measurement probabilities.

Statevector [alpha, beta]:
[0.866+0.j 0.5  +0.j]
|psi> = (0.8660+0.0000j)|0> + (0.5000+0.0000j)|1>
Probabilities [P(0), P(1)]: [0.75 0.25]

Visualize the state with Qiskit. The arrow points to the pure state on the Bloch sphere. Its north and south poles represent ∣0⟩|0\rangle and ∣1⟩|1\rangle.

Loading...

Compare different choices of α\alpha and β\beta. Each example creates a fresh one-qubit circuit, prints its amplitudes and probabilities, and displays its Bloch sphere. In particular, ∣+⟩=(∣0⟩+∣1⟩)/2|+\rangle = (|0\rangle+|1\rangle)/\sqrt{2} and ∣+i⟩=(∣0⟩+i∣1⟩)/2|+i\rangle = (|0\rangle+i|1\rangle)/\sqrt{2} have the same measurement probabilities but different relative phases and different Bloch vectors.


|0>: alpha = 1.0000, beta = 0.0000
Statevector: [1.+0.j 0.+0.j]
|psi> = (1.0000+0.0000j)|0> + (0.0000+0.0000j)|1>
P(0), P(1): [1. 0.]
Loading...

|1>: alpha = 0.0000, beta = 1.0000
Statevector: [0.+0.j 1.+0.j]
|psi> = (0.0000+0.0000j)|0> + (1.0000+0.0000j)|1>
P(0), P(1): [0. 1.]
Loading...

|+>: alpha = 0.7071, beta = 0.7071
Statevector: [0.7071+0.j 0.7071+0.j]
|psi> = (0.7071+0.0000j)|0> + (0.7071+0.0000j)|1>
P(0), P(1): [0.5 0.5]
Loading...

|+i>: alpha = 0.7071, beta = 0.0000+0.7071j
Statevector: [0.7071+0.j     0.    +0.7071j]
|psi> = (0.7071+0.0000j)|0> + (0.0000+0.7071j)|1>
P(0), P(1): [0.5 0.5]
Loading...

Qiskit reference: Statevector and plot_bloch_multivector.