Skip to content
Quantum ComputingAN INTERACTIVE OPEN TEXTBOOK
charithj.com.au

Multiple qubits and tensor products

Combining two systems creates four amplitudes, with an ordering convention that matters.

16 min readDr. Charith Jayasekara↓ Chapter PDF
By the end, you’ll be able to
  • Compute a two-qubit product state numerically.
  • Use the site’s most-significant-bit ordering convention.

For ∣a⟩=(a0,a1)T\lvert a\rangle=(a_0,a_1)^T and ∣b⟩=(b0,b1)T\lvert b\rangle=(b_0,b_1)^T,

∣a⟩⊗∣b⟩=(a0b0a0b1a1b0a1b1).\lvert a\rangle\otimes\lvert b\rangle= \begin{pmatrix}a_0b_0\\a_0b_1\\a_1b_0\\a_1b_1\end{pmatrix}.

Our basis order is ∣00⟩,∣01⟩,∣10⟩,∣11⟩\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle. The leftmost qubit, q0, is the most significant bit. Other frameworks may display bitstrings differently; check before comparing results.

Take ∣a⟩=∣+⟩\lvert a\rangle=\lvert+\rangle and ∣b⟩=∣1⟩\lvert b\rangle=\lvert1\rangle. Their joint vector is

12(0101)=∣01⟩+∣11⟩2.\frac1{\sqrt2}\begin{pmatrix}0\\1\\0\\1\end{pmatrix} =\frac{\lvert01\rangle+\lvert11\rangle}{\sqrt2}.

Measuring gives 01 or 11 equally often. The second qubit is always 1; the first is equally likely to be 0 or 1.

An n-qubit pure state has 2n2^n complex amplitudes. A general classical statevector simulation therefore needs exponential memory. This describes the cost of storing an arbitrary statevector, not a claim that a quantum device lets you read all those amplitudes in one shot.

Some structured states and circuits admit much more efficient classical simulation. Exponential state-space dimension alone is not evidence of useful quantum advantage.

In the gate playground, apply H to q0 and X to q1. Verify the expected 01/11 distribution. Then change X to q0 instead: explain the result by tracing the ordering rather than guessing from the bitstring labels.

Build four entries without losing their labels

Section titled “Build four entries without losing their labels”
WORKED DIAGRAM · F12Build four joint amplitudes from two vectors
Build four joint amplitudes from two vectorsFor |+⟩ ⊗ |1⟩, each joint amplitude is a product of one component from each factor. Read the resulting column in the fixed order 00, 01, 10, 11.|+⟩ = (1/√2, 1/√2)ᵀ|1⟩ = (0, 1)ᵀ|00⟩(1/√2) × 0= 0|01⟩(1/√2) × 1= 1/√2|10⟩(1/√2) × 0= 0|11⟩(1/√2) × 1= 1/√2Joint column: (0, 1/√2, 0, 1/√2)ᵀ
For |+⟩ ⊗ |1⟩, each joint amplitude is a product of one component from each factor. Read the resulting column in the fixed order 00, 01, 10, 11.

The tensor product combines systems, rather than adding alternative states of one system. Two one-qubit columns produce a four-entry joint column. Each entry is labelled by a pair of basis values. Writing those labels beside the multiplication is a reliable way to avoid swapping the two middle components, especially when comparing frameworks that use different display conventions.

Our leftmost bit is q0. Thus the bitstring 10 means q0 is one and q1 is zero. Its numeric index is two. The same physical circuit may appear with reversed printed bitstrings in another tool. That difference is a convention issue until you map qubit identities and measurement registers explicitly. Never infer the control wire from a bitstring’s visual position without checking the tool’s convention.

Prepare the first qubit in plus and the second in the positive-y state. Each first-qubit amplitude is one over the square root of two. The second-qubit amplitudes are one over the square root of two and i over the square root of two. Multiplying each pair gives

∣+⟩⊗∣+i⟩=12(∣00⟩+i∣01⟩+∣10⟩+i∣11⟩).|+\rangle\otimes|+i\rangle =\frac12\left(|00\rangle+i|01\rangle+|10\rangle+i|11\rangle\right).

Every Z outcome has probability one quarter. The repeated pattern of real and imaginary entries tells you which qubit carries the phase: the factor changes when q1 changes, while q0’s two branches have the same relationship. Equal joint probabilities do not mean that the state has no structure. The complex entries retain information needed for later gates.

Applying H to q0 returns that qubit to zero, leaving the second qubit unchanged. The only nonzero joint amplitudes are then those of 00 and 01. Applying H to q1 instead creates a different pair of one-qubit amplitudes and acts within each q0 branch. Keeping the wire identity in the algebra makes these outcomes predictable before running a simulator.

For a product state, the joint probability of a pair equals the product of its two local probabilities. Summing over the other qubit recovers each local distribution. For plus tensor one, q0 is evenly distributed and q1 is always one, so the only outcomes are 01 and 11 with equal probabilities. The tensor table in the diagram makes those zeros explicit.

The converse needs care: independent probabilities in one chosen basis do not establish that a pure state is a product. Relative phases can create entanglement while leaving all four Z probabilities equal. A complete product-state check must include amplitudes, or sufficiently informative measurements in other bases. A histogram discards phase information and cannot by itself determine separability.

For a pure two-qubit column with entries a, b, c and d in our order, a useful test is whether the determinant of its reshaped two-by-two amplitude array vanishes. A product state satisfies ad equal to bc. If those quantities differ, no pair of one-qubit vectors can reproduce the joint state. The next lesson uses this test on a Bell state, where the failure is immediate.

An n-qubit pure state has a component for every n-bit basis label, giving two to the power n complex entries in a general statevector simulation. Adding a qubit doubles that storage. Product states have shorter descriptions, and some structured entangled states can also be simulated efficiently. The general exponential representation is not a proof that every quantum circuit is hard to simulate or useful for an application.

Measurement still returns a bitstring on each shot. A quantum algorithm cannot read all two-to-the-power-n amplitudes in one call. It must use their structure to make a useful property accessible through a manageable number of measurements. Tensor products expand the space of possible states; algorithm design determines whether that space helps solve the specified problem.

The lab starts with input 01 and two qubits. Add H to q0 only. Predict the four amplitudes in order, including the two zero entries, then reveal. Confirm that the one in the input selector refers to numeric index one, which is bitstring 01. To prepare the complex example above, reset to input 00, apply H to both wires and S to q1.

L02 · INTERACTIVE LABRuns on your device

Quantum gate playground

Choose a basis-state input and a one-, two- or three-qubit register. Build gates left to right and inspect their complex statevector after recording a prediction.

Experiment controls
|01⟩ → I
Maximum 20 gates. q0 is the leftmost bit. Editing a circuit recomputes it from the input.

For the chosen input and circuit, predict the nonzero amplitudes, their signs and the measured bitstrings.

Record a prediction to enable the results.

Results are hidden.

Prepare your experiment using the controls. Record a prediction, then reveal the statevector or run the experiment.

Changing the preparation or circuit starts a new prediction.

MODEL · Ideal pure-state vector, complex double precisionORDER · q0 is the leftmost bit
Take it further

Compare H|0⟩ with H|1⟩ using one qubit. Their Z probabilities agree; their amplitude signs do not. Add a second H to distinguish them.

Write the statevector for one tensor plus, and compare it with plus tensor one. Find a Z measurement that distinguishes these preparations. Explain why their equal-sized component lists do not make them the same state.

Check your reasoning

One tensor plus has column zero, zero, one over square root of two, one over square root of two. Its possible outcomes are 10 and 11. Plus tensor one instead gives 01 and 11. Measuring q0 or q1 over fresh trials distinguishes their local distributions. Tensor-factor order specifies which physical subsystem carries each state and cannot be swapped silently.

PAUSE & THINK

With q0 leftmost, which outcomes can |+⟩ ⊗ |1⟩ produce in Z?

Choose your answer

Reference: IBM Quantum — Multiple-system quantum information.

ONE IDEA FURTHER

Ready for the next step?

Your progress stays in this browser.