# 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 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{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}$$$$

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} = \pm 1$$ based on the parity of the bitstring $$i$$. As a measurement outcome,you then get the bitstring $$i$$, associated with the projection on the state $$|i\rangle$$.

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}[1]{\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$$.