Yes. Replace the target qubit by a register of qubits and implement the controlled unitary gateThe algebra in c uses only normalization and unitarity, so for an arbitrary pure register quantum state it still gives . For a mixed register quantum state , linearity gives . With ,Only the control qubit needs to be pure. A uniformly randomized computational basis preparation supplies the target maximally mixed state. This is the principle of trace estimation by a maximally mixed Hadamard test. The extension is algebraic; efficiently implementing controlled- still requires a known suitable gate construction. Moreover, estimating the unnormalized trace to fixed additive precision requires increasingly precise estimation of the normalized signal as grows. There is no automatic efficient reconstruction of all entries of .
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 53 1 3 Solution 2026-10-14
Prepare the auxiliary system in the maximally mixed state . Then , so the two measurement bases giveThere is no need to know the eigenvectors of . Choose a uniformly random member of any known orthonormal basis on each run; discarding the classical preparation label produces . Alternatively, discard one half of a maximally entangled pair of -level systems. This is trace estimation by a maximally mixed Hadamard test.
The circuit directly estimates the normalized trace. To demand fixed absolute accuracy in the unnormalized trace requires normalized accuracy ; straightforward independent frequency sampling consequently uses order runs at fixed confidence. Thus the construction should not be confused with a dimension-independent guarantee for arbitrary absolute trace precision.