|q⟩ Bad Qubits

beginner · Physics · Observables, Operators & Measurement

Checkpoint: Operators and Outcomes

This checkpoint pulls together two central results of the module: finding the eigenvalues of an observable and computing the expectation value of that observable in a given state. Work through the derivation below, then complete the exercise.

The operator and the state

Consider a Hermitian operator AA whose matrix in the {0,1}\{|0\rangle, |1\rangle\} basis is

A=(3113).A = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix}.

The matrix is symmetric with real entries, so A=AA^\dagger = A (Hermitian). The system is prepared in the normalized state

ψ=150+251.|\psi\rangle = \frac{1}{\sqrt{5}}\,|0\rangle + \frac{2}{\sqrt{5}}\,|1\rangle.

We can verify normalization: 1/52+2/52=1/5+4/5=1|1/\sqrt{5}|^2 + |2/\sqrt{5}|^2 = 1/5 + 4/5 = 1. Good.

Step 1 — finding the eigenvalues

The eigenvalues λ\lambda satisfy the characteristic equation det(AλI)=0\det(A - \lambda I) = 0:

det(3λ113λ)=(3λ)21=0.\det\begin{pmatrix} 3-\lambda & 1 \\ 1 & 3-\lambda \end{pmatrix} = (3-\lambda)^2 - 1 = 0.

Expanding, (3λ)2=1(3 - \lambda)^2 = 1, so 3λ=±13 - \lambda = \pm 1, giving

λ+=4,λ=2.\lambda_+ = 4, \qquad \lambda_- = 2.

Both eigenvalues are real (as required for a Hermitian operator), and only these two values can be returned by any measurement of AA.

The corresponding normalized eigenvectors are found by substituting back:

|2\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}1\\-1\end{pmatrix}.$$ ## Step 2 — expanding the state in the eigenbasis To use the Born-rule form of the expectation value, we expand $|\psi\rangle$ in the eigenbasis. The overlap coefficients are: $$c_+ = \langle 4|\psi\rangle = \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{5}} + \frac{1}{\sqrt{2}} \cdot \frac{2}{\sqrt{5}} = \frac{3}{\sqrt{10}},$$ $$c_- = \langle 2|\psi\rangle = \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{5}} - \frac{1}{\sqrt{2}} \cdot \frac{2}{\sqrt{5}} = \frac{-1}{\sqrt{10}}.$$ Check: $|c_+|^2 + |c_-|^2 = 9/10 + 1/10 = 1$ ✓. The Born-rule probabilities are $p_+ = 9/10$ and $p_- = 1/10$: a measurement of $A$ returns $4$ with probability $90\%$ and $2$ with probability $10\%$. ## Step 3 — computing the expectation value Two equivalent routes reach the same answer. **Route A — weighted average of eigenvalues (Born rule):** $$\langle A \rangle = \lambda_+ p_+ + \lambda_- p_- = 4 \cdot \frac{9}{10} + 2 \cdot \frac{1}{10} = \frac{36}{10} + \frac{2}{10} = \frac{38}{10} = 3.8.$$ **Route B — matrix sandwich $\langle\psi|A|\psi\rangle$ (direct calculation):** First, apply $A$ to the column vector $\psi = [1/\sqrt{5},\; 2/\sqrt{5}]^T$: $$A\,|\psi\rangle = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} \begin{pmatrix} 1/\sqrt{5} \\ 2/\sqrt{5} \end{pmatrix} = \begin{pmatrix} 5/\sqrt{5} \\ 7/\sqrt{5} \end{pmatrix} = \begin{pmatrix} \sqrt{5} \\ 7/\sqrt{5} \end{pmatrix}.$$ Then take the inner product with $\langle\psi| = [1/\sqrt{5},\; 2/\sqrt{5}]$: $$\langle\psi|A|\psi\rangle = \frac{1}{\sqrt{5}} \cdot \frac{5}{\sqrt{5}} + \frac{2}{\sqrt{5}} \cdot \frac{7}{\sqrt{5}} = \frac{5}{5} + \frac{14}{5} = 1 + \frac{14}{5} = \frac{19}{5} = 3.8.$$ Both routes give $\langle A \rangle = 3.8$. <Callout type="tip"> Route A and Route B must always agree — Route A is derived from Route B by inserting the completeness relation $\sum_n |\lambda_n\rangle\langle\lambda_n| = I$ into $\langle\psi|A|\psi\rangle$. If your two routes disagree, check that your eigenvectors are normalized and orthogonal. </Callout> ## Try it This is a numerical exercise — your code should `return` a number. Using the operator and state defined above, compute $\langle A \rangle = \langle\psi|A|\psi\rangle$ via the matrix-sandwich route. <RunnableExample />

Sign in on the full site to ask questions and join the discussion.