What is ⟨Z⟩ and how is it computed from measurements?
It is the average of Z (+1 for outcome 0, −1 for 1): ⟨Z⟩ = P(0) − P(1), estimated from counts as (n0 − n1)/N.
The expectation value of an observable $O$ in the state $|\psi\rangle$ is $\langle O\rangle=\langle\psi|O|\psi\rangle$. The operator $Z$ has two eigenvalues: $+1$ for the state $|0\rangle$ and $-1$ for $|1\rangle$, so $\langle Z\rangle=P(0)-P(1)$. Example: $R_Y(\theta)|0\rangle$ gives $\langle Z\rangle=\cos\theta$.
For Pauli strings on several qubits, such as $Z_0Z_1$, each outcome $b_1b_0$ is given the value $(-1)^{b_0\oplus b_1}$ (i.e. by the parity of the bits) and then we take the mean. To measure $\langle X\rangle$ or $\langle Y\rangle$ we rotate the basis first.
These quantities are what variational algorithms work with: VQE minimises $\langle H\rangle$, and the lab's VQC classifier reads $\langle Z_0\rangle$ and converts it into the class probability $P(1)=(1-\langle Z_0\rangle)/2$. In Qiskit they are computed with StatevectorEstimator and SparsePauliOp.
Related topics
References
- Michael A. Nielsen; Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press doi:10.1017/CBO9780511976667The standard reference for quantum computing; the Crossref record gives 2012 for the Cambridge Core online edition.
- IBM Quantum (2025). Qiskit SDK API documentation. IBM Quantum Documentation quantum.cloud.ibm.com
- Microsoft (2025). Pauli Measurements in Quantum Computing. Azure Quantum documentation learn.microsoft.com
