
# Expectation & Uncertainty

> A single measurement gives one random eigenvalue; many measurements give a *distribution*. Its first
> two moments — the **expectation value** and the **variance** — summarize what an observable does to a
> state. The deepest structural fact in this lesson is that you cannot make *two* observables both
> sharp at once unless they commute: the **Robertson uncertainty relation**. We derive it from a single
> line of Cauchy–Schwarz, and see exactly where Heisenberg's $\Delta x\,\Delta p$ comes from.

## Learning Objectives

After this lesson you will be able to:

1. Compute the **expectation value** $\langle A\rangle = \langle\psi|A|\psi\rangle = \sum_k\lambda_k p_k$
   and prove the two forms agree.
2. Compute the **variance** $(\Delta A)^2 = \langle A^2\rangle - \langle A\rangle^2$ and interpret
   $\Delta A = 0$ as "definite value".
3. **Derive** the Robertson uncertainty relation $\Delta A\,\Delta B \ge \tfrac12|\langle[A,B]\rangle|$
   via the Cauchy–Schwarz inequality.
4. Apply it to **Pauli observables**, e.g. bound $\Delta X\,\Delta Z$ using $[X,Z]=-2iY$.
5. Distinguish **compatible** (commuting) from **incompatible** observables and state when joint
   measurement / a common eigenbasis exists.

---

## Intuition

Run the same measurement on many identically prepared copies of $|\psi\rangle$ and histogram the
eigenvalues you read off. The **expectation value** $\langle A\rangle$ is the mean of that histogram;
the **variance** $(\Delta A)^2$ is its spread. If $|\psi\rangle$ happens to be an eigenstate of $A$, the
histogram is a single spike — zero spread, a *definite* value.

Now the surprise. For *one* observable you can always find states with zero spread (the eigenstates).
But you generally **cannot** find a state that is simultaneously spike-sharp for two *different*
observables, like $X$ and $Z$. The obstruction is algebraic: $X$ and $Z$ do not commute. The Robertson
relation turns "how badly they fail to commute" — the size of $\langle[A,B]\rangle$ — into a hard lower
bound on the product of spreads. Incompatibility is not a measurement clumsiness; it is geometry forced
by non-commuting operators.

---

## Theory

### Expectation value

> **Definition.** For an observable $A=A^\dagger$ and normalized state $|\psi\rangle$, the **expectation
> value** is
> $$ \langle A\rangle \;:=\; \langle\psi|A|\psi\rangle . $$

This is the probability-weighted mean of the eigenvalues. Insert the spectral decomposition
$A=\sum_k\lambda_k P_k$ from [Lesson 1](01-projective-measurement.md):

$$
\langle A\rangle = \langle\psi|\Big(\sum_k\lambda_k P_k\Big)|\psi\rangle
= \sum_k \lambda_k\,\langle\psi|P_k|\psi\rangle
= \sum_k \lambda_k\,p_k ,
$$

which is exactly the classical mean $\sum_k\lambda_k\,\Pr[\text{outcome }k]$. So "$\langle\psi|A|\psi\rangle$"
and "average the eigenvalues against the Born probabilities" are the *same number* — one computed from
the operator, one from the experiment. Because $A$ is Hermitian and the $p_k$ are real, $\langle A\rangle\in\mathbb R$.

**Properties** (all immediate from linearity of the inner product):

- **Linearity:** $\langle aA + bB\rangle = a\langle A\rangle + b\langle B\rangle$ for real $a,b$.
- **Reality:** $\langle A\rangle = \overline{\langle A\rangle}$ since $\langle\psi|A|\psi\rangle =
  \overline{\langle\psi|A^\dagger|\psi\rangle} = \overline{\langle A\rangle}$.
- **Trace form:** $\langle A\rangle = \operatorname{Tr}(\rho A)$ with $\rho=|\psi\rangle\langle\psi|$
  ([0.1.3 E5](../../term-0-foundations/c01-linear-algebra/03-dirac-notation.md)) — the form that
  generalizes to mixed states in [Term 1.5](../c05-density-matrices/01-density-operator.md).

### Variance and the standard deviation

> **Definition.** The **variance** of $A$ in state $|\psi\rangle$ is
> $$ (\Delta A)^2 \;:=\; \big\langle (A - \langle A\rangle I)^2\big\rangle = \langle A^2\rangle - \langle A\rangle^2, $$
> and the **uncertainty** (standard deviation) is $\Delta A = \sqrt{(\Delta A)^2}\ge 0$.

The two expressions agree by expanding and using linearity (write $\mu=\langle A\rangle$, a real scalar):

$$
\big\langle (A-\mu I)^2\big\rangle = \langle A^2 - 2\mu A + \mu^2 I\rangle
= \langle A^2\rangle - 2\mu\langle A\rangle + \mu^2 = \langle A^2\rangle - \mu^2 .
$$

Define the **centered operator** $\bar A := A - \langle A\rangle I$ (Hermitian, with $\langle\bar A\rangle=0$).
Then a clean restatement we will use in the derivation:

$$
(\Delta A)^2 = \langle \bar A^2\rangle = \langle\psi|\bar A^\dagger \bar A|\psi\rangle = \|\bar A|\psi\rangle\|^2 .
$$

So **the variance is a squared norm** — automatically $\ge 0$, and **zero iff $\bar A|\psi\rangle = 0$**,
i.e. iff $A|\psi\rangle = \langle A\rangle|\psi\rangle$: the state is an eigenstate and the value is
definite. This recovers the [Lesson 1](01-projective-measurement.md) observation that eigenstates give
deterministic outcomes, now phrased as $\Delta A = 0$.

### The Robertson uncertainty relation

> **Theorem (Robertson, 1929).** For any two observables $A=A^\dagger$, $B=B^\dagger$ and any normalized
> state $|\psi\rangle$,
> $$ \boxed{\;\Delta A\,\Delta B \;\ge\; \tfrac12\big|\langle[A,B]\rangle\big|\;}. $$

**Derivation.** Let $\bar A = A-\langle A\rangle I$ and $\bar B = B-\langle B\rangle I$ (both Hermitian),
and define the vectors

$$
|f\rangle := \bar A|\psi\rangle, \qquad |g\rangle := \bar B|\psi\rangle .
$$

By the variance-as-norm identity, $(\Delta A)^2 = \langle f|f\rangle$ and $(\Delta B)^2 = \langle g|g\rangle$.
The **Cauchy–Schwarz inequality** ([0.1.2](../../term-0-foundations/c01-linear-algebra/02-inner-products-norms.md))
gives

$$
(\Delta A)^2 (\Delta B)^2 = \langle f|f\rangle\langle g|g\rangle \;\ge\; |\langle f|g\rangle|^2 .
\tag{1}
$$

Now compute the cross term $\langle f|g\rangle = \langle\psi|\bar A\bar B|\psi\rangle$ (using
$\bar A^\dagger=\bar A$). Split any product into its Hermitian (anticommutator) and anti-Hermitian
(commutator) parts:

$$
\bar A\bar B = \tfrac12\{\bar A,\bar B\} + \tfrac12[\bar A,\bar B].
$$

Take expectations. The anticommutator $\{\bar A,\bar B\}$ is Hermitian, so $\langle\{\bar A,\bar B\}\rangle$
is **real**; the commutator $[\bar A,\bar B]$ is **anti**-Hermitian ($[\bar A,\bar B]^\dagger = -[\bar A,\bar B]$),
so $\langle[\bar A,\bar B]\rangle$ is **purely imaginary**. Hence

$$
\langle f|g\rangle = \underbrace{\tfrac12\langle\{\bar A,\bar B\}\rangle}_{\text{real}}
+ \underbrace{\tfrac12\langle[\bar A,\bar B]\rangle}_{\text{imaginary}},
$$

and because the real and imaginary parts add in quadrature,

$$
|\langle f|g\rangle|^2 = \tfrac14\big|\langle\{\bar A,\bar B\}\rangle\big|^2 + \tfrac14\big|\langle[\bar A,\bar B]\rangle\big|^2
\;\ge\; \tfrac14\big|\langle[\bar A,\bar B]\rangle\big|^2 .
\tag{2}
$$

Finally, the constant shifts cancel in the commutator: $[\bar A,\bar B] = [A - \langle A\rangle I,\,B-\langle B\rangle I] = [A,B]$
(the identity commutes with everything). Chaining (1) and (2),

$$
(\Delta A)^2(\Delta B)^2 \;\ge\; |\langle f|g\rangle|^2 \;\ge\; \tfrac14|\langle[A,B]\rangle|^2 .
$$

Taking nonnegative square roots gives $\Delta A\,\Delta B \ge \tfrac12|\langle[A,B]\rangle|$. ∎

**Reading the bound.** The right-hand side is *state-dependent* — it is $\tfrac12|\langle\psi|[A,B]|\psi\rangle|$,
not a universal constant (except in special cases like $[x,p]=iI$, where it becomes the Heisenberg
constant $\tfrac12$). Dropping the anticommutator term in (2) is the only inequality besides
Cauchy–Schwarz; keeping it gives the tighter **Schrödinger uncertainty relation** (Exercise E5).

> **Heisenberg as a special case.** For position and momentum, $[\hat x,\hat p] = i\hbar I$ (here
> $\hbar=1$ per [Appendix C](../../appendix/C-notation-glossary.md)), so $\langle[\hat x,\hat p]\rangle = i$
> for *every* state and Robertson collapses to the familiar $\Delta x\,\Delta p\ge \tfrac12$. The qubit
> Pauli version below is the finite-dimensional analog.

### Example structure: Pauli observables

For the Paulis, $[X,Z] = XZ - ZX$. Using the Pauli algebra ([Appendix E](../../appendix/E-math-identities.md)),
$XZ = -iY$ and $ZX = +iY$, so

$$
[X,Z] = -iY - iY = -2iY .
$$

(Equivalently from $[\sigma_j,\sigma_k]=2i\varepsilon_{jkl}\sigma_l$: $[X,Z]=2i\varepsilon_{xzy}Y = -2iY$.)
Robertson then reads

$$
\Delta X\,\Delta Z \;\ge\; \tfrac12|\langle -2iY\rangle| = |\langle Y\rangle| .
$$

So the product of $X$- and $Z$-spreads is bounded below by the *magnitude of the $Y$-expectation*. On
$|0\rangle$: $\langle X\rangle=\langle Y\rangle=0$, $\langle Z\rangle=1$, $\langle X^2\rangle=\langle Z^2\rangle=1$
(since $X^2=Z^2=I$). Thus $\Delta X = 1$, $\Delta Z = 0$, product $=0$, and the bound $|\langle Y\rangle|=0$
holds with equality — $Z$ is sharp, so the relation permits $X$ to be maximally spread. On
$|{+}i\rangle = \tfrac1{\sqrt2}(|0\rangle+i|1\rangle)$ (the $+1$ eigenstate of $Y$): $\langle Y\rangle = 1$,
$\langle X\rangle = \langle Z\rangle = 0$, so $\Delta X = \Delta Z = 1$ and the bound is again **saturated**:
$1\cdot1 = |\langle Y\rangle| = 1$.

### Compatible vs. incompatible observables

> **Definition.** Observables $A,B$ are **compatible** if $[A,B]=0$, else **incompatible**.

**Theorem (simultaneous diagonalization).** Two Hermitian operators commute **iff** they share a common
orthonormal eigenbasis.

*Sketch.* ($\Leftarrow$) If both are diagonal in $\{|v_k\rangle\}$ they trivially commute. ($\Rightarrow$)
If $[A,B]=0$ and $A|v\rangle=\lambda|v\rangle$, then $A(B|v\rangle) = B(A|v\rangle) = \lambda(B|v\rangle)$,
so $B$ preserves each $\lambda$-eigenspace of $A$; restrict $B$ (still Hermitian) to that eigenspace and
diagonalize it there, repeating per eigenspace. The combined eigenvectors diagonalize both. ∎

Consequences for measurement:

- **Compatible** ($[A,B]=0$): there is a common eigenbasis $\{|v_k\rangle\}$ with $A|v_k\rangle=a_k|v_k\rangle$
  and $B|v_k\rangle=b_k|v_k\rangle$. A single projective measurement in that basis returns *both* values
  $(a_k,b_k)$ at once — they are **jointly measurable**, the order does not matter, and Robertson's bound
  is vacuous ($\langle[A,B]\rangle=0$, allowing $\Delta A=\Delta B=0$ simultaneously, e.g. on a common
  eigenstate).
- **Incompatible** ($[A,B]\ne0$): no common eigenbasis, measuring one disturbs the other, and Robertson
  forces $\Delta A\,\Delta B > 0$ on any state where $\langle[A,B]\rangle\ne0$. $X$ and $Z$ are the
  canonical example.

This is the precise statement of "you can't measure both at once": not a limit of apparatus, but the
non-existence of a basis in which both are diagonal. Generalized (non-projective) measurements can
*trade off* information about incompatible observables — the subject of [Lesson 3](03-povm-generalized.md).

---

## Worked Examples

### Example 1 — Mean and variance of $Z$ on a general qubit

Let $|\psi\rangle = \cos\tfrac\theta2|0\rangle + e^{i\phi}\sin\tfrac\theta2|1\rangle$ (Bloch angles;
[Term 1.2](../c02-qubits-bloch/02-bloch-sphere.md)). Then with $Z=\operatorname{diag}(1,-1)$,

$$
\langle Z\rangle = \cos^2\tfrac\theta2 - \sin^2\tfrac\theta2 = \cos\theta .
$$

Since $Z^2 = I$, $\langle Z^2\rangle = 1$, so

$$
(\Delta Z)^2 = \langle Z^2\rangle - \langle Z\rangle^2 = 1 - \cos^2\theta = \sin^2\theta,
\qquad \Delta Z = |\sin\theta| .
$$

The spread vanishes at the poles ($\theta=0,\pi$, the eigenstates $|0\rangle,|1\rangle$) and is maximal
on the equator ($\theta=\pi/2$, e.g. $|+\rangle$), where $\Delta Z = 1$ — matching Example 1 of
[Lesson 1](01-projective-measurement.md).

### Example 2 — Saturating $\Delta X\,\Delta Z \ge |\langle Y\rangle|$

Take $|\psi\rangle = |{+}i\rangle = \tfrac1{\sqrt2}(|0\rangle + i|1\rangle)$, the $+1$-eigenstate of $Y$.

**Expectations.** $\langle X\rangle = \langle{+}i|X|{+}i\rangle = 0$ and $\langle Z\rangle = 0$ (the Bloch
vector points along $+y$, so $x$- and $z$-components vanish), while $\langle Y\rangle = 1$.

**Variances.** $X^2=Z^2=I\Rightarrow\langle X^2\rangle=\langle Z^2\rangle=1$, so
$(\Delta X)^2 = 1 - 0 = 1$ and likewise $(\Delta Z)^2 = 1$; hence $\Delta X=\Delta Z=1$.

**Bound.** $\Delta X\,\Delta Z = 1$ and the Robertson right-hand side is
$\tfrac12|\langle[X,Z]\rangle| = \tfrac12|\langle -2iY\rangle| = |\langle Y\rangle| = 1$. The inequality
is an **equality** — $|{+}i\rangle$ is a *minimum-uncertainty state* for the pair $(X,Z)$. (Geometrically,
maximizing $|\langle Y\rangle|$ while keeping $\langle X\rangle=\langle Z\rangle=0$ pushes both spreads to
their largest equal value, and Cauchy–Schwarz is tight because $|f\rangle$ and $|g\rangle$ are
proportional — see the NumPy check below.)

---

## Hands-on (Python)

We compute expectations and variances exactly, then **numerically verify the Robertson bound over many
random states** — and find the states that saturate it.

```python
import numpy as np

I = np.eye(2, dtype=complex)
X = np.array([[0, 1], [1, 0]], dtype=complex)
Y = np.array([[0, -1j], [1j, 0]], dtype=complex)
Z = np.array([[1, 0], [0, -1]], dtype=complex)


def expectation(A, psi):
    """<A> = <psi|A|psi>, returned as a real float (A is Hermitian)."""
    return np.real(psi.conj() @ (A @ psi))


def variance(A, psi):
    """(ΔA)^2 = <A^2> - <A>^2."""
    return expectation(A @ A, psi) - expectation(A, psi) ** 2


def uncertainty(A, psi):
    return np.sqrt(max(variance(A, psi), 0.0))    # clip tiny negatives from roundoff


def random_qubit(rng):
    """Haar-ish random pure qubit: normalize a complex Gaussian vector."""
    v = rng.normal(size=2) + 1j * rng.normal(size=2)
    return v / np.linalg.norm(v)


# Commutator [X, Z] = -2 i Y  (sanity check)
comm_XZ = X @ Z - Z @ X
print("[X,Z] == -2iY :", np.allclose(comm_XZ, -2j * Y))   # True
```

```python
# Verify Robertson:  ΔA ΔB >= (1/2)|<[A,B]>|  for many random states and Pauli pairs
rng = np.random.default_rng(1)
pairs = {"(X,Z)": (X, Z), "(X,Y)": (X, Y), "(Y,Z)": (Y, Z)}

worst_slack = {}
for name, (A, B) in pairs.items():
    comm = A @ B - B @ A
    min_slack = np.inf
    for _ in range(100_000):
        psi = random_qubit(rng)
        lhs = uncertainty(A, psi) * uncertainty(B, psi)
        rhs = 0.5 * np.abs(psi.conj() @ (comm @ psi))   # (1/2)|<[A,B]>|
        slack = lhs - rhs
        assert slack >= -1e-9, f"Robertson violated for {name}: {slack}"
        min_slack = min(min_slack, slack)
    worst_slack[name] = min_slack

print("Min (LHS - RHS) over 100k random states (>=0 confirms the bound):")
for name, s in worst_slack.items():
    print(f"  {name}: {s:.2e}")   # ~0  -> the bound is tight (saturated somewhere)
```

```python
# Saturation: |+i> is a minimum-uncertainty state for (X, Z).
plus_i = np.array([1, 1j], dtype=complex) / np.sqrt(2)
dX, dZ = uncertainty(X, plus_i), uncertainty(Z, plus_i)
rhs = abs(expectation(Y, plus_i))               # (1/2)|<[X,Z]>| = |<Y>|
print(f"ΔX·ΔZ = {dX*dZ:.4f},  |<Y>| = {rhs:.4f}  -> equality:",
      np.isclose(dX * dZ, rhs))                  # True

# Why it saturates: f = (X-<X>)|ψ> and g = (Z-<Z>)|ψ> are proportional (Cauchy–Schwarz tight).
f = (X - expectation(X, plus_i) * I) @ plus_i
g = (Z - expectation(Z, plus_i) * I) @ plus_i
ratio = f / g                                    # constant (up to roundoff) where g != 0
print("f ∝ g :", np.allclose(ratio[0], ratio[1]))   # True
```

> The empirical loop is a *property test*: we never construct an adversarial state, we sample broadly
> and assert the inequality holds (with `min_slack ≈ 0` proving it is tight, not loose). This is the
> standard way to gain confidence in an analytic bound before trusting a derivation in code.

---

## Exercises

**E1 (easy).** For $|\psi\rangle = |+\rangle$, compute $\langle X\rangle$, $\langle Z\rangle$, and the
variances $(\Delta X)^2$, $(\Delta Z)^2$.

<details><summary>Solution</summary>

$|+\rangle$ is the $+1$-eigenstate of $X$, so $\langle X\rangle = 1$ and (since $X^2=I$)
$(\Delta X)^2 = 1 - 1 = 0$. For $Z$: $\langle Z\rangle = \tfrac12(1) + \tfrac12(-1) = 0$, $\langle Z^2\rangle=1$,
so $(\Delta Z)^2 = 1$. The $X$ value is sharp, the $Z$ value maximally spread — consistent with
$|+\rangle$ being an $X$-eigenstate.
</details>

**E2 (easy).** Show that $\Delta A = 0$ if and only if $|\psi\rangle$ is an eigenstate of $A$.

<details><summary>Solution</summary>

$(\Delta A)^2 = \|(A-\langle A\rangle I)|\psi\rangle\|^2$. A squared norm is $0$ iff the vector is $0$,
i.e. $A|\psi\rangle = \langle A\rangle|\psi\rangle$ — exactly the eigenvalue equation with eigenvalue
$\langle A\rangle$. ∎
</details>

**E3 (medium).** Verify the Robertson bound for $A=X$, $B=Z$ on the state $|0\rangle$, and explain why
it holds with equality despite $X$ and $Z$ not commuting.

<details><summary>Solution</summary>

On $|0\rangle$: $\langle X\rangle=0\Rightarrow(\Delta X)^2 = \langle X^2\rangle = 1$, so $\Delta X=1$;
$\langle Z\rangle = 1\Rightarrow(\Delta Z)^2 = 1-1 = 0$, so $\Delta Z=0$. Product $=0$. RHS:
$\tfrac12|\langle[X,Z]\rangle| = |\langle 0|Y|0\rangle| = 0$. Equality holds because the *bound itself*
vanishes here: $\langle Y\rangle = 0$ on $|0\rangle$. Non-commutativity forbids both being sharp *only
where $\langle[A,B]\rangle\ne0$*; on $|0\rangle$ the commutator's expectation is zero, so one observable
($Z$) is allowed to be perfectly sharp.
</details>

**E4 (medium).** Prove that if $[A,B]=0$ (with $A,B$ Hermitian) then there exists a state with
$\Delta A = \Delta B = 0$ simultaneously, and conversely give a pair where no such state exists.

<details><summary>Solution</summary>

If $[A,B]=0$ they share an orthonormal eigenbasis $\{|v_k\rangle\}$ (simultaneous-diagonalization
theorem). Take $|\psi\rangle=|v_k\rangle$: it is an eigenstate of both, so $\Delta A=\Delta B=0$ by E2.
Conversely, for $A=X$, $B=Z$ ($[X,Z]=-2iY\ne0$): a common-zero-spread state would be a simultaneous
eigenstate, hence a common eigenvector, which would force $X,Z$ to commute — contradiction. So no qubit
state has $\Delta X=\Delta Z=0$ together. ∎
</details>

**E5 (hard).** Derive the **Schrödinger uncertainty relation** by keeping the anticommutator term:
$$ (\Delta A)^2(\Delta B)^2 \ge \Big|\tfrac12\langle\{A,B\}\rangle - \langle A\rangle\langle B\rangle\Big|^2 + \Big|\tfrac1{2i}\langle[A,B]\rangle\Big|^2 . $$

<details><summary>Solution</summary>

From the derivation, $\langle f|g\rangle = \tfrac12\langle\{\bar A,\bar B\}\rangle + \tfrac12\langle[\bar A,\bar B]\rangle$
with the first term real and the second imaginary. Cauchy–Schwarz gives
$(\Delta A)^2(\Delta B)^2 \ge |\langle f|g\rangle|^2 = \big(\tfrac12\langle\{\bar A,\bar B\}\rangle\big)^2 + \big(\tfrac1{2i}\langle[\bar A,\bar B]\rangle\big)^2$
(real$^2$ + imag$^2$, writing the imaginary part as $\tfrac1{2i}\langle[\bar A,\bar B]\rangle\in\mathbb R$).
Now $[\bar A,\bar B]=[A,B]$, and the anticommutator expands as $\langle\{\bar A,\bar B\}\rangle =
\langle\{A,B\}\rangle - 2\langle A\rangle\langle B\rangle$ (the cross terms; check by expanding
$\bar A = A-\langle A\rangle I$). Substituting yields the stated relation. Dropping the (nonnegative)
anticommutator/covariance term recovers Robertson. ∎
</details>

**E6 (hard).** Show $\langle A\rangle$ is the value of $c$ minimizing $\langle(A-cI)^2\rangle$, and that
the minimum equals $(\Delta A)^2$. (The mean is the least-squares predictor — the quantum echo of the
classical fact that $\mathbb E[X]$ minimizes mean-squared error.)

<details><summary>Solution</summary>

$g(c) := \langle(A-cI)^2\rangle = \langle A^2\rangle - 2c\langle A\rangle + c^2$ (real, quadratic in $c$).
$g'(c) = -2\langle A\rangle + 2c = 0 \Rightarrow c = \langle A\rangle$, a minimum since $g''=2>0$. The
minimum value $g(\langle A\rangle) = \langle A^2\rangle - \langle A\rangle^2 = (\Delta A)^2$. ∎ This is
why the variance is *the* natural measure of spread: it is the irreducible mean-squared deviation after
optimally centering.
</details>

---

## Checkpoint

1. Prove $\langle\psi|A|\psi\rangle = \sum_k\lambda_k p_k$ for an observable with spectral
   decomposition $A=\sum_k\lambda_k P_k$.
2. Why is $(\Delta A)^2 = \langle A^2\rangle - \langle A\rangle^2$ always $\ge 0$, and when is it $0$?
3. State the Robertson relation and name the single inequality at the heart of its proof.
4. Why does only the commutator (not the anticommutator) appear in the Robertson bound?
5. Compute $[X,Z]$ and the resulting bound on $\Delta X\,\Delta Z$.
6. What does $[A,B]=0$ imply about jointly measuring $A$ and $B$?

<details><summary>Answers</summary>

1. $\langle\psi|A|\psi\rangle = \sum_k\lambda_k\langle\psi|P_k|\psi\rangle = \sum_k\lambda_k p_k$ since
   $p_k=\langle\psi|P_k|\psi\rangle$ (Born rule).
2. It equals $\|(A-\langle A\rangle I)|\psi\rangle\|^2$, a squared norm, hence $\ge0$; it is $0$ iff
   $|\psi\rangle$ is an eigenstate of $A$.
3. $\Delta A\,\Delta B\ge\tfrac12|\langle[A,B]\rangle|$; the heart is the **Cauchy–Schwarz** inequality
   applied to $|f\rangle=\bar A|\psi\rangle$, $|g\rangle=\bar B|\psi\rangle$.
4. $|\langle f|g\rangle|^2$ splits into a real part (anticommutator) plus imaginary part (commutator)
   in quadrature; dropping the nonnegative anticommutator term keeps the commutator, giving the bound.
   (Keeping it yields the tighter Schrödinger relation.)
5. $[X,Z]=-2iY$, so $\Delta X\,\Delta Z\ge\tfrac12|\langle-2iY\rangle| = |\langle Y\rangle|$.
6. Commuting observables share an eigenbasis, so a single measurement in that basis returns both values
   at once (joint measurability), order-independent, with no forced uncertainty trade-off.

</details>

---

## Further Reading

- **[NC]** Nielsen & Chuang, §2.2.5 — expectation/variance of observables; the uncertainty principle as
  presented for measurement.
- **[Sak]** Sakurai & Napolitano, §1.4 — dispersion, the uncertainty relation, and compatible/incompatible
  observables with the simultaneous-diagonalization theorem.
- **[Pre]** Preskill, *Ph219*, Ch. 2–3 — operators, expectation values, and commutation.

---

← Prev: [Projective Measurement](01-projective-measurement.md) · Up: [Term 1](../README.md) · Next: [POVMs & Generalized Measurement](03-povm-generalized.md) →
