Physical question
How does a sequence of rotations become a trainable prediction?
A parameterized quantum circuit is a function-producing physical process: it maps input data to state preparations, applies adjustable unitaries, and reads out an observable through repeated measurements. Its expressive power is constrained by the chosen encoding, the noncommuting rotations and the observable. A single qubit is transparent enough to derive the entire prediction analytically, making it possible to distinguish a mathematical trainable parameter from a parameter that has no effect on the selected measurement.
Prerequisites: Bloch-sphere rotations, Pauli observables, the Born rule and parameter-shift identities.
Calculated quantum predictions
Live readout and numerical experiments
Parameterized model output
Expectation value as a function of trainable θ
A changing rotation parameter only affects the chosen readout when the surrounding gates turn its phase into measurable population changes.
fθ(x)=cosβ cosx−sinβ sinx cosθ. The orange dot is the current parameter setting, and the curve's amplitude depends on both input encoding and the final readout basis.
Training sensitivity
How strongly does the observable respond to θ?
The derivative measures local trainability for this single parameter; a flat model output leads to a vanishing gradient.
∂θ f=sinβ sinx sinθ and equals [f(θ+π/2)−f(θ−π/2)]/2. Compare this direct result with shifted-circuit evaluations.
Input dependence
What function of the input x can the circuit express?
For fixed trainable rotations, the input dependence is an elementary combination of sinx and cosx; the chosen feature encoding fixes the available frequencies.
The one-layer encoding produces only first-harmonic trigonometric functions of x. Repeating input encoding may enrich the Fourier spectrum but also changes the trainable model and measurement cost.
Mathematical reconstruction
From Bloch rotations to an exact measurable function
Prepare |0〉 and apply U(θ,x,β)=Ry(β)Rz(θ)Ry(x), where Rμ(α)=exp(−iασμ/2). The initial Bloch vector (0,0,1) becomes (sinx,0,cosx) after the first Y rotation. The Z rotation gives (sinx cosθ,sinx sinθ,cosx), while the final Y rotation mixes its x and z components.
The measured Z outcome takes values ±1. Its + probability is (1+f)/2, and for N independent shots the estimator mean is f while its variance is (1−f²)/N. The sample plotted in the readout uses a deterministic pseudorandom seed to facilitate reproducible comparisons.
The parameter appears in one Rz gate with generator σz/2. The standard parameter-shift identity therefore evaluates the exact derivative from two additional circuit settings:
If either sinx or sinβ vanishes, the chosen Z expectation is independent of θ, even though the circuit contains a tunable Rz gate. This illustrates the importance of data encoding and measurement choice to a trainable model's sensitivity.
Exactly checkable limits
For x=0, the first Rz rotation acts on a σz eigenstate and only adds a phase, so no θ dependence survives. For β=0, measuring Z directly after the Z rotation also erases sensitivity to θ. At β=π/2 and x=π/2, f(θ)=−cosθ and its derivative is sinθ. Finite-shot fluctuations vanish when the ideal readout equals exactly ±1.
Assumptions and error sources
Ideal noiseless one-qubit gates and projective Pauli Z readout, with stochasticity from finite independent shots only. The model has a single trainable parameter and one data input; performance on actual datasets, entangling circuits, and hardware noise are developed separately.
Investigate independently
Follow three scientific questions
- Identify a redundant parameter. Set x=0 then β=0, varying θ each time. Explain the flat readout and why the parameter-shift derivative correctly becomes zero.
- Verify the shifted gradient. Choose x=β≈π/2 and θ≈π/2. Compute f(θ±π/2) and compare their difference with sinβ sinx sinθ.
- Estimate measurement cost. Pick a setting with f between −1 and +1, then change the number of shots. Compare the seeded finite-shot estimate with the exact f and its standard error.
Self-check: If β=0, what is the dependence of the measured Z expectation on trainable θ?
Extension: combine the circuit with a target y, a squared-error loss and a parameter-shift gradient update using the separate training laboratory.
Interpretation and further reading
What the result teaches
A quantum prediction is controlled jointly by data encoding, the structure of the trainable unitary and the measured observable. This toy example shows exact function expressivity, gradient evaluation and shot uncertainty while making no claim of a quantum learning advantage.
Mathematical source in the lecture notes: Parameterized quantum learning · Analytic gradients and measurement statistics.