liveBook · Manning

Product state

As explained in Building Quantum Software with Python

A product state is a composite quantum state that can be expressed as the combination of independent states of its constituent qubits.

A product state combines independent single-qubit states into one composite quantum state. Like tossing two independently biased coins, its outcomes are all pairings of the constituent outcomes, and each composite amplitude is the product of two single-qubit amplitudes. section 4.2.1

Construct a two-qubit product state by:

  • Represent each single-qubit state with two complex amplitudes, using probability magnitudes and phase directions. section 4.2.1
  • Multiply every amplitude from the first state by every amplitude from the second, producing four amplitudes in outcome order. section 4.2.1
  • Use polar-form arithmetic: multiply magnitudes and add phase directions. section 4.2.1
  • Extend the pattern recursively across qubits when encoding geometric-sequence states with Hadamard and phase gates. section 8.2

Multiplying two single-qubit states

For p = 0.75, θ₀ = 0°, θ₁ = 60°, q = 0.5, φ₀ = 0°, and φ₁ = −120°, the resulting amplitudes are [(0.61237+0j), (−0.30619−0.53033j), (0.17678+0.30619j), (0.17678−0.30619j)]. The same list results from direct complex multiplication or from multiplying the probabilities and adding the phase directions. section 4.2.1

new_state = [first_state[0]*second_state[0], first_state[0]*second_state[1],
                first_state[1]*second_state[0], first_state[1]*second_state[1]]
print([round(amp.real, 5)+1j*round(amp.imag, 5) for amp in new_state])

Inspect the compact Python construction that forms the four amplitudes by multiplying the two constituent amplitude lists. section 4.2.1

How Building Quantum Software with Python covers it

How deep it goes
Derives two-qubit amplitudes through probability, phase, and Python multiplication, then extends the pattern recursively across n qubits.
Examples
Demonstrates biased-coin outcomes, a worked two-qubit Python state, state tables, and geometric-sequence encoding diagrams.
What it assumes
Assumes single-qubit probabilities and amplitudes, while developing complex-number multiplication in polar form through concrete examples.
What you can do after
Build a two-qubit product state from complex amplitude lists and recognize recursively encoded n-qubit product states.
How it connects
Connects single-qubit states, complex amplitudes, polar form, Hadamard gates, phase gates, and the quantum Fourier transform.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Quantum Software with Python. The section links point to the parts of the book it draws on.