Observables, Bases & Expectation Values
Measuring in any basis, Pauli observables and expectation values.
"Zero or one?" is just one question you can ask a qubit. Every Hermitian matrix defines another, and its average value can be estimated from shots. This is the language in which energies, Bloch vectors and error-correction checks are all written.
What you’ll learn
- Turn a Hermitian operator into a projective measurement using its spectral decomposition.
- Compute expectation values and variances, and read the Bloch vector off .
- Measure in any single-qubit basis by rotating first, and derive the - and -readout circuits.
- Explain when observables can be measured together, and measure a two-qubit parity without learning the individual bits.
- Estimate the number of shots needed to reach a target precision.
Observables are Hermitian operators
An observable is a quantity you can measure, represented by a Hermitian operator . The spectral theorem lets you write it as
where the are its distinct, real eigenvalues and projects onto the corresponding eigenspace. Measuring means performing the projective measurement and reporting the eigenvalue as the result.
| Observable | Eigenvalue | Eigenvalue | Spectral form |
|---|---|---|---|
| , the Bloch point |
What are the possible outcomes of measuring the observable , and in which basis is it measured?
- , in the eigenbasis of the Hadamard gate (the Bloch axis halfway between and )
- , in the basis
- and , in the basis
- , by measuring half the shots in and half in
Show the answer
A. , in the eigenbasis of the Hadamard gate (the Bloch axis halfway between and )
with , a unit vector, so its eigenvalues are . It is exactly the Hadamard matrix , which is Hermitian as well as unitary.
Expectation values and the Bloch vector
The expectation value needs no diagonalization: sandwich between the state's bra and ket. For a mixed state, .
The variance of the outcome distribution, because .
For a Pauli observable, the variance is fixed by the mean.
The three Pauli averages are the Cartesian coordinates of the Bloch vector . For example .
A qubit has Bloch angles and . What is ?
Show the answer
0.87
, so -basis shots give with probability .
Measuring in any basis
Hardware typically measures only . To measure an observable whose eigenbasis is , that is , apply first and then measure :
For , apply . For , apply : first , then .
With all three readouts in hand you can reconstruct an unknown state. The widget below prepares a fixed "mystery" state and measures it in whichever basis you choose.
Suppose your data give , and . Which state was prepared?
Show the answer
B.
gives , and with gives . So .
Commuting observables and parity checks
Two observables can be measured together, in a single shot, exactly when they commute.
Multi-qubit observables give the most useful examples. The parity , with eigenvalue on and on , commutes with , even though and anticommute: the two sign flips cancel.
Measuring uses the rank-2 projectors . It reveals whether two bits agree, without revealing either bit. With an ancilla qubit, two CNOTs copy the parity, and only the parity, onto the ancilla.
How many shots?
Each shot of a Pauli measurement returns with variance , so the sample mean of shots has standard error
Reaching precision takes about shots: up to for . A Hamiltonian written as a sum of Paulis, , has , and commuting terms can be measured simultaneously. Grouping them is a major cost-saver in variational algorithms.
Think first Why can't you estimate and of a qubit from the same shots?
and anticommute, so they have no common eigenbasis. A shot in the basis yields a value and destroys the information: it collapses the state onto or , for which is a coin flip. You have to split your shots between bases.
Key takeaways
- An observable is a Hermitian ; measuring it is the projective measurement , with the eigenvalues as outcome labels.
- . For Paulis , and is the Bloch vector.
- To measure , apply and then measure : for ; then for .
- Commuting observables share an eigenbasis and can be measured together. Parity checks like learn one bit of correlation and nothing else.
- Estimating to precision takes about shots.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
A qubit gives outcome (the eigenvalue of ) with probability . What are and ?
- and
- and
- and
- and
Show the answer
C. and
and , so .
Your hardware measures only . Which gates, applied in this order before the measurement, implement a measurement of ?
- only
- , then
- , then
- , then
Show the answer
D. , then
You need with . With (first , then ): . It maps and .
Which pair of two-qubit observables can be measured simultaneously in a single shot?
- and
- and
- and
- and
Show the answer
A. and
and anticommute on each qubit, so the two signs cancel and they commute. Their common eigenbasis is the Bell basis.
You measure on and obtain . What is the state afterward?
- or , each with probability
- Unchanged:
Show the answer
B. Unchanged:
The state already lies in the eigenspace of , spanned by and . The projector leaves it alone: a parity measurement neither reveals nor disturbs which bit is which.
Go deeper
- Uncertainty Relations · Robertson, Schrödinger and entropic uncertainty relations.
- Mutually Unbiased Bases · Maximally complementary measurements and where they come from.
- Commuting Observables & Contextuality · Kochen–Specker and the Peres–Mermin square.
Further reading
- M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, §2.1 (Hermitian operators, simultaneous diagonalization) and §2.2.5 (projective measurements) (Cambridge, 10th anniv. ed., 2010).
- J. J. Sakurai & J. Napolitano, Modern Quantum Mechanics, 2nd ed., Ch. 1 (2011).
- R. de Wolf, Quantum Computing: Lecture Notes, arXiv:1907.09415.