Back to Module 4 notes

These problems practise Pauli-basis linear inversion and its error bars, the projection onto the state space, the optimality conditions of maximum likelihood, and the role of the rank in the trace-distance error.

Problem 1

Problem 4.1 (Single-qubit tomography by hand).

A qubit is measured times in each of the , and bases (). The outcome is seen , and times.

  1. Compute the linear-inversion estimate of and its eigenvalues. Is it a state?
  2. Run the threshold rule of Proposition 4.5 on the eigenvalues of . Show more generally that for a qubit with estimated Bloch vector , , projected least squares returns the pure state with Bloch vector , and that it changes nothing when .
  3. Estimate the standard error of each Bloch component from Proposition 4.2, plugging in the estimates for the unknown .
  4. Evaluate the bound and part 3 of Theorem 4.3 for these data with , and find how many shots per basis that theorem asks for to guarantee .

Problem 2

Problem 4.2 (Balanced settings beat random settings).

Instead of measuring each of the Pauli settings exactly times, draw a setting uniformly at random for each of the copies, and average the product snapshots of part 4 of Proposition 4.2.

  1. Show that the eigenvalues of each snapshot are products of factors from , and that .

  2. Show that is unbiased and .

  3. Show that the balanced estimator of Definition 4.1 with the same is never worse:

    with equality only for the maximally mixed state. Explain the difference coefficient by coefficient.

  4. Evaluate both risks for the noisy Bell state of Example 4.13 with .

Problem 3

Problem 4.3 (Maximum likelihood for a qubit).

Consider single-qubit Pauli-basis data with shots per basis, the POVM , and the notation of Definition 4.10.

  1. Show that the linear-inversion estimate reproduces the data exactly: for all six outcomes.
  2. Deduce that if then is a maximum-likelihood estimate, in two ways: from and Proposition 4.11, and from Gibbs’ inequality for probability vectors and .
  3. Suppose . Show that every maximum-likelihood estimate is a pure state. (Hint: if is full rank, forces ; expand in the Pauli basis.)
  4. For the data of Problem 4.1, argue that the maximum-likelihood estimate has Bloch vector , write down the function of it maximizes, and compare the maximizer with the projected least squares estimate.

Problem 4

Problem 4.4 (When does projection help?).

The snippet runs Pauli-basis tomography on three qubits ( shots per setting, ) for one random state of each rank , and prints the mean trace distance of linear inversion and of projected least squares over 200 runs, and the smallest nonzero eigenvalue of the state.

import numpy as np
from functools import reduce
from itertools import product
rng, n, d, m = np.random.default_rng(5), 3, 8, 50   # 27 settings x 50 shots
sig = [np.array([[0, 1], [1, 0]]), np.array([[0, -1j], [1j, 0]]),
       np.diag([1, -1])]
keys = list(product(product(range(3), repeat=n), product([1, -1], repeat=n)))
op = lambda b, s, c: reduce(np.kron, [(np.eye(2) + c * x * sig[y]) / 2
                                      for y, x in zip(b, s)])
proj, snap = [np.array([op(b, s, c) for b, s in keys]) for c in (1, 3)]
def tomography(rho):                  # m shots per setting, linear inversion
    p = np.einsum("kij,ji->k", proj, rho).real.reshape(3**n, 2**n)
    counts = np.array([rng.multinomial(m, q) for q in p]).ravel()
    return np.einsum("k,kij->ij", counts, snap) / (3**n * m)
def pls(Y):                           # nearest state in Frobenius norm
    w, V = np.linalg.eigh(Y)
    u = np.sort(w)[::-1]; css = np.cumsum(u) - 1
    k = np.nonzero(u - css / np.arange(1, d + 1) > 0)[0][-1]
    return (V * np.maximum(w - css[k] / (k + 1), 0)) @ V.conj().T
tdist = lambda A, B: 0.5 * np.abs(np.linalg.eigvalsh(A - B)).sum()
for r in [1, 2, 4, 8]:                # a random state of rank r
    G = rng.normal(size=(d, r)) + 1j * rng.normal(size=(d, r))
    rho = G @ G.conj().T / np.linalg.norm(G)**2
    li, ps = np.mean([[tdist(Y, rho), tdist(pls(Y), rho)]
                      for Y in [tomography(rho) for _ in range(200)]], axis=0)
    print(r, round(li, 3), round(ps, 3), round(np.linalg.eigvalsh(rho)[-r], 3))

The four printed lines are 1 0.343 0.14 1.0, 2 0.351 0.21 0.435, 4 0.357 0.257 0.037 and 8 0.366 0.306 0.001.

  1. Explain why tomography returns the linear-inversion estimate without ever computing a Pauli coefficient.
  2. Use and Jensen’s inequality to bound the expected trace distance of linear inversion, and use Theorem 4.6 to bound that of projected least squares for each . Compare with the printed values.
  3. Why does the advantage of projection shrink as grows, and why is it not zero at ?
  4. Predict, without running the code, how the four pairs of numbers change if is multiplied by .