# What's the observable when measuring multiple qubits in the computational basis?

In Nielsen and Chuang (Quantum Computing and Quantum Information) the following definition is given to a projective measurement:

Projective measurements are described by an observable $$M$$: $$M = \sum_m m P_m$$ with $$P_m$$ a projector onto the Eigenspace of $$M$$ with eigenvalue $$m$$.

My question now is, when we say we measure a system of $$n$$ qubits in the computational basis, to which observable do we refer precisely?

For 1 qubit, I know that this refer to the Z observable:

$$Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = |0 \rangle \langle 0| - |1\rangle \langle 1|.$$

For $$n$$ qubits,my intuition would be:

\begin{align*} P_1 & = \underbrace{Z \otimes I \otimes ... \otimes I}_{n \textrm{ terms}}. \\ P_2 & = I \otimes Z \otimes ... \otimes I. \\ & ... \\ P_n & = I \otimes I \otimes ... \otimes Z. \end{align*}

with $$I$$ being the identity matrix.

Then the observable would be as in the definition. Is that correct?

Note that your current definitions of the projection matrices $$\{P_{1},P_{2},...,P_{n}\}$$ are actually not projection matrices, since $$P_{i}^{2} = I \not= P_{i} \,\, \forall i$$.

What works 'better' is if you have something like:

$$\begin{equation} \begin{split} P_{1}^{+1} =& |0\rangle\langle 0 | \otimes I \otimes I....\otimes I \\ P_{1}^{-1} =& |1\rangle\langle 1 | \otimes I \otimes I....\otimes I \\ P_{2}^{+1} =& I \otimes |0\rangle\langle 0 | \otimes I....\otimes I \\ P_{2}^{-1} =& I \otimes |1\rangle\langle 1 | \otimes I....\otimes I \\ & \vdots \\ P_{n}^{+1} =& I \otimes I....\otimes I \otimes |0\rangle\langle 0|\\ P_{n}^{-1} =& I \otimes I.... \otimes I \otimes |1\rangle\langle 1 |\\ \end{split} \end{equation}$$

However, a PVM must have that $$\sum_{i = 0}^{2n-1} P_{i} = I$$, which is clearly not the case here! One could solve for this by renormalizing, but there is another thing missing here: these projectors actually don't account for any correlations that the measurements might have.

A better 'choice' is therefore the measurement operators $$Z_{n} = Z \otimes Z \otimes Z ... \otimes Z$$. This operator has $$2^{n}$$ eigenvectors:

$$Z_{n} = \sum_{i \in \{0,1\}^{n}} m_{i} |i\rangle\langle i|,$$ where $$m_{i} = 1 - 2p_{m} = \pm 1$$ with $$p_{m}$$ the parity of the bitstring $$i$$ (i.e. $$m_{i} = +1$$ if the parity is even and $$m_{i} = -1$$ when the parity is odd). The problem here is that the measurement might only return the measurement outcome, so that you only learn the parity of the measured state.

If you want to tell all the different states apart, it is better to associate each state $$|i\rangle$$ with its own measurement outcome. If $$i_{d}$$ is the decimal representation of the bitstring $$i$$, a clear choice is to associate this decimal representation with the state $$|i\rangle$$ as the measurement outcome. The observable $$D$$ for this measurement is then:

$$D = \sum_{i} i_{d} |i\rangle\langle i|.$$

This is also the content of the answer by DaftWullie.

• Can you explicitly state how $m_i$ is chosen? Jun 15, 2021 at 17:39
• @thespaceman I updated the answer
– JSdJ
Jun 16, 2021 at 9:00

You simply want any diagonal operator that has distinct diagonal elements (which would imply that every basis element maps to a distinct output of the measurement).

One convenient way to denote this in terms of Pauli matrices is $$\sum_{i=1}^N2^{N-i-1}(1-Z_i)$$ For a basis state $$|x\rangle$$ where $$x$$ is a binary number, the eigenvalue is the decimal representation of $$x$$ (and hence distinct). Of course, you can drop all the identity terms as those just give a shift in all the eigenvalues.

Note that if you are considering a projective measurement, there is no need to deal with observables at all. A projective measurement is characterised by the basis $$\newcommand{\ket}{\lvert #1\rangle}\{\ket{u_i}\}_i$$ on which you are measuring, and therefore the associated projection probabilities $$p_i\equiv \lvert\langle u_i\rvert \psi\rangle\rvert^2$$ (when $$\ket\psi$$ is the state being measured). You don't need anything else.

Bringing an observable into the picture can be useful, depending on the circumstances and what exactly you are interested in. But remember that observables are used to compute expectation values. In other words, you define an observable by attaching numbers to the possible measurement outcomes, and then computing the expectation value of these numbers with respect to the probability distribution $$p_i$$.