Observables, Expectation Values, and Pauli Operators

Intermediate Quantum Observables
Created by Pavel · 11.03.2026 at 14:32 UTC

Hermitian operators encode questions with real answers: the expectation $\langle\psi|O|\psi\rangle$ is what repeated experiments average toward when measuring $O$. Pauli expectations stay in $[-1,1]$ because each shot returns $\pm 1$.

In hybrid QML those expectations become ordinary floats for a classical loss, so bad readout design can starve the optimizer even when the circuit is deep. See Pauli background [1].


Sources

University approvals: 0
Tasks
Question 1

Which property must an observable operator satisfy?

Hint

Real eigenvalues requirement.

Question 2

Expectation value of a Pauli observable is bounded in which interval?

Hint

Eigenvalues are ±1.

Question 3

An expectation value is best interpreted as:

Hint

Average, not one shot.

Question 4

Why are expectation values useful in hybrid QML models?

Hint

Think interface between quantum and classical parts.

Question 5

Which set contains standard single-qubit Pauli observables?

Hint

Canonical trio.

Question 6

A $Z$-measurement experiment gives $+1$ in 780 shots and $-1$ in 220 shots (1000 total). What is the estimated expectation value $\mathbb{E}[Z]$?

Hint

Compute (N_plus - N_minus) / N_total.

Question 7

A model uses only one fixed observable for readout across all data. What is a possible limitation?

Hint

Readout design influences learnable information.

Question 8

Why can expectation-value objectives be stable interfaces to classical optimizers?

Hint

Think about numerical compatibility with losses.

Question 9

Implement empirical_pauli_z_expect(n_plus: int, n_minus: int) -> float as $(n_+ - n_-)/N$ with $N=n_+ + n_-$. Return 0.0 when $N=0$ to avoid division by zero.

Expression-mode tests; stdlib only.

Hint

Guard N==0 before dividing.

Starter code is prefilled; replace TODO blocks with your solution.
2 test cases will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Card Info
  • Topic: Quantum Observables
  • Difficulty: Intermediate
  • Completed: 0 users
Creator
Pavel
Pavel