<a href="https://qworld.net" target="_blank" align="left"></a>
$$
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\inner}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\bra}[1]{\left\langle#1\right|}
\newcommand{\ket}[1]{\left|#1\right\rangle}
\newcommand{\braket}[2]{\left\langle#1|#2\right\rangle}
\newcommand{\ketbra}[2]{\left|#1\right\rangle\left\langle#2\right|}
\newcommand{\angleset}[1]{\left\langle#1\right\rangle}
\newcommand{\expected}[1]{\left\langle#1\right\rangle}
\newcommand{\dv}[2]{\frac{d#1}{d#2}}
\newcommand{\real}[0]{\mathfrak{Re}}
$$

# Projective Measurement

_prepared by Israel Gelover_

### <a name="definition_3_6">Definition 3.6</a> Projector

Given a subset of vectors $\set{\ket{f_i}}_{i=1}^n \subset \mathcal{H}$, we define the _Projector_ over the subspace $\mathcal{F}$ generated by them as:

\begin{equation*}
    \begin{split}
        \hat{P}:\mathcal{H} &\to \mathcal{F} \\
        \ket{\psi} &\to \sum_{i=1}^n \ket{f_i}\braket{f_i}{\psi}
    \end{split}
\end{equation*}

It is clear that what we obtain from this operator is a linear combination of $\set{\ket{f_i}}_{i=1}^n$ and therefore, the resulting vector is an element of the subspace generated by these vectors. And it is precisely this definition what we used to calculate the <a href="./WorkedExample.ipynb#5">Wave function collapse</a>.

### <a name="definition_3_7">Definition 3.7</a> Projective Measurement

A _Projective Measurement_ is described with a self-adjoint operator

\begin{equation*}
    \hat{M} = \sum_m m\hat{P}_m
\end{equation*}

Where $\hat{P}_m$ is a projector on the subspace corresponding to the eigenvalue $m$ of $\hat{M}$.

This is known as the spectral decomposition of the $\hat{M}$ operator, and any self-adjoint operator can be expressed in terms of its spectral decomposition. We emphasize that this way of decomposing a projective measurement is very useful to us since it involves the eigenvalues and the projectors associated with these eigenvalues.

### Example

Let

\begin{equation}\label{op_h}
    \hat{H} = \ketbra{0} + i\ketbra{1}{2} - i\ketbra{2}{1}
\end{equation}

Let us recall that in the example of <a href="./WorkedExample.ipynb#3">Time evlution</a> we saw that this is a self-adjoint operator, therefore we can use it as a projective measurement, and the way to do it is by obtaining its spectral decomposition through the eigenvalues and eigenvectors that we already calculated. That is

\begin{equation*}
    \begin{split}
        \varepsilon_1 = 1 \qquad&\qquad \ket{\varepsilon_1} = \ket{0} \\
        \varepsilon_2 = 1 \qquad&\qquad \ket{\varepsilon_2} = \frac{1}{\sqrt{2}}(\ket{1} + i\ket{2}) \\
        \varepsilon_3 = -1 \qquad&\qquad \ket{\varepsilon_3} = \frac{1}{\sqrt{2}}(\ket{1} - i\ket{2})
    \end{split}
\end{equation*}

Note that we only have two different eigenvalues: $1$ and $-1$. The eigenvalue $1$ has multiplicity $2$ and therefore has  associated a subspace of dimension $2$, while the eigenvalue $-1$ has multiplicity $1$ and therefore has associated a subspace of dimension $1$.

Thus

\begin{equation*}
    \hat{H} = 1\cdot\hat{P_1} + (-1)\cdot\hat{P_{-1}}
\end{equation*}

Where, from <a href="#definition_3_6">Definition 3.6</a>

\begin{equation*}
    \begin{split}
        \hat{P_1} &= \ketbra{\varepsilon_1}{\varepsilon_1} + \ketbra{\varepsilon_2}{\varepsilon_2} \\
        \hat{P_{-1}} &= \ketbra{\varepsilon_3}{\varepsilon_3}
    \end{split}
\end{equation*}

Therefore

\begin{equation*}
    \hat{H} = \ketbra{\varepsilon_1}{\varepsilon_1} + \ketbra{\varepsilon_2}{\varepsilon_2} - \ketbra{\varepsilon_3}{\varepsilon_3}
\end{equation*}

Something that may not be so clear from this result is that in $\hat{H} = \ketbra{0} + i\ketbra{1}{2} - i\ketbra{2}{1}$ we have $\hat{H}$ expressed in terms of the base $\set{\ket{0}, \ket{1}, \ket{2}}$ and what the spectral decomposition is doing is diagonalize the operator $\hat{H}$, since we are expressing it in terms of its eigenvectors and that what turns out to be is a diagonal matrix, in this case

\begin{equation*}
    \hat{H} = \begin{pmatrix}
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        0 & 0 & -1
    \end{pmatrix}
\end{equation*}

## Measurement Related Postulates

This formalism of projective measurements allows us on the one hand to group the postulates of quantum mechanics related to measurement in a single formalism, but on the other hand, it also allows us to focus on the state that we want to measure and on the state of the system after the measurement. Let us recall that the postulates of quantum mechanics related to measurement focus on the value that we can measure, that is, on the eigenvalue of an observable that is related to a measurable physical quantity. This formalism allows us to focus on the state in which the vector (that we originally had) ends up after measurement, and so to speak, to put aside for a bit what we are measuring.

In the following proposition we are going to describe the postulates related to the measurement that we already mentioned, but in a more condensed way in two quantities.

### <a name="proposition_3_8">Proposition 3.8</a>

Let $\hat{M} = \sum_m m\hat{P_m}$ be a projective measurement expressed in terms of its spectral decomposition. ($\hat{M}$ can be an observable)

1. If the system is in the state $\ket{\psi}$, the probability of measuring the eigenvalue $m$ is given by

\begin{equation*}
    P_\psi(m) = \bra{\psi}\hat{P_m}\ket{\psi}
\end{equation*}

2. The state of the system immediately after measuring the eigenvalue $m$ is given by

\begin{equation*}
    \ket{\psi} \to \frac{\hat{P_m}\ket{\psi}}{\sqrt{P(m)}}
\end{equation*}

**Proof:**

1. Let's verify the first statement by calculating the expected value. Recall that by <a href="#definition_3_6">Definition 3.6</a>, the $m$ projector applied to $\ket{\psi}$ is given by

\begin{equation*}
    \hat{P_m}\ket{\psi} = \sum_{i=1}^{g_m} \ket{m_i}\braket{m_i}{\psi}
\end{equation*}

where $g_m$ is the multiplicity of the eigenvalue $m$. Thus

\begin{equation*}
    \begin{split}
        \bra{\psi}\hat{P_m}\ket{\psi} &= \bra{\psi} \sum_{i=1}^{g_m} \ket{m_i}\braket{m_i}{\psi} = \sum_{i=1}^{g_m} \braket{\psi}{m_i}\braket{m_i}{\psi} \\
        &= \sum_{i=1}^{g_m} \braket{m_i}{\psi}^*\braket{m_i}{\psi} = \sum_{i=1}^{g_m} \abs{\braket{m_i}{\psi}}^2 \\
        &= P_\psi(m)
    \end{split}
\end{equation*}

This last equality is given by <a href="./Postulates.ipynb#definition_3_1">Postulate V</a>.

2. Let's remember that projecting the vector can change its norm and therefore we need to renormalize it. Let us then calculate the magnitude of the projection, calculating the internal product of the projection with itself. In the previous section we gave the expression of the $m$ projector applied to $\ket{\psi}$, let's see now that

\begin{equation*}
    \bra{\psi}\hat{P_m}^* = \sum_{i=1}^{g_m} \braket{\psi}{m_i}\bra{\psi}
\end{equation*}

Thus

\begin{equation*}
    \begin{split}
        \abs{\hat{P_m}\ket{\psi}}^2 &= \bra{\psi}\hat{P_m}^* \hat{P_m}\ket{\psi} \\
        &= \sum_{i=1}^{g_m} \braket{\psi}{m_i}\bra{\psi} \sum_{i=1}^{g_m} \ket{m_i}\braket{m_i}{\psi} \\
        &= \sum_{i=1}^{g_m} \braket{\psi}{m_i} \braket{m_i} \braket{m_i}{\psi} \\
        &= \sum_{i=1}^{g_m} \braket{\psi}{m_i}\braket{m_i}{\psi} \\
        &= \sum_{i=1}^{g_m} \braket{m_i}{\psi}^*\braket{m_i}{\psi} \\
        &= \sum_{i=1}^{g_m} \abs{\braket{m_i}{\psi}}^2 \\
        &= P_\psi(m) \\
        \implies \\
        \abs{\hat{P_m}\ket{\psi}} &= \sqrt{P_\psi(m)}
    \end{split}
\end{equation*}

### <a name="remark">Remark</a>

In summary, with this projector formalism, we can express the measurement-related postulates in two simpler expressions:

**1. The probability of measuring an eigenvalue is the expected value of the projector associated with the eigenvalue.**  
**2. The state of the system after measurement is obtained by applying the projector to the state and renormalizing. The normalization constant is precisely the square root of the probability, calculated in the previous section.**

As we have already mentioned, this formalism is useful when we are not so interested in what we are going to measure, but rather we are interested in the state of the system after measurement. That is, instead of verifying what is the observable, calculate the eigenvalues of the observable, calculate the probability based on the eigenvectors associated with these eigenvalues, etc. All this, that is required by the quantum mechanics postulates related to measurement in order to find a probability, is already implicit in the projector formalism.

On the other hand, when we talk about measurements in quantum computing, we usually refer to measurements in the computational basis, and the computational basis is the basis of the Pauli operator $\hat{\sigma_z}$. So the observable that is almost always used in quantum computing is $\hat{\sigma_z}$, that is, when talking about measuring a qubit, we are talking about measuring the observable $\hat{\sigma_z}$ and calculating the probability to find the eigenvalue $+1$ or the eigenvalue $-1$ of $\hat{\sigma_z}$. The eigenvalue $+1$ is associated with the qubit $\ket{0}$ and the eigenvalue $-1$ is associated with the qubit $\ket{1}$.

Observables are very useful when we are interested in measuring magnitudes that have a physical interpretation such as momentum, position or energy, on the other hand, in quantum computing we are interested in knowing if when the measurement is made the system will be in a state $\ket{0}$ or in a state $\ket{1}$, beyond the measured eigenvalue or the observable with which you are working. It is for this reason that this formalism of projective measurements is particularly useful in this area.

Let's see how we can apply it in a concrete example.

### <a name="example">Example</a>

Let $\ket{\psi}$ be the state

\begin{equation*}
    \ket{\psi} = \sqrt{\frac{3}{8}}\ket{00} + \frac{1}{2}\ket{01} + \frac{1}{2}\ket{10} + \frac{1}{\sqrt{8}}\ket{11} \in \mathbb{B}^{\otimes2}
\end{equation*}

We note that the state is normalized, that is, it is a valid state in $\mathbb{B}^{\otimes2}$ and thus we can answer the following questions.

**1. What is the probability of finding the first qubit in $\ket{0}$?**

To emphasize the previous comments, let's start by considering the following projective measurement, which corresponds to the expression in terms of outer products of the Pauli operator $\hat{\sigma_x}$

\begin{equation*}
    \hat{M} = (1)\hat{P_0} + (-1)\hat{P_1} \enspace \text{ where } \enspace \hat{P_0} = \ketbra{0}{0}, \enspace \hat{P_1} = \ketbra{1}{1}
\end{equation*}

We know that to answers this question we need to find the probability of measuring the eigenvalue of $\hat{M}$ associated with the qubit $\ket{0}$, but note that according to section **1.** of the previous remark, what is relevant to make this calculation is only $\hat{P_0}$. That is, we are not interested in the eigenvalue that is measured, nor the observable. To accentuate this fact, we could even have considered any other projective measurement such as

\begin{equation*}
    \hat{M} = \alpha\hat{P_0} + \beta\hat{P_1}
\end{equation*}

and this would still be a self-adjoint operator and therefore a valid projective measure, for all $\alpha,\beta \in \mathbb{R}$.

For all this to agree with the formalism of the postulates of quantum mechanics, we usually take $\hat{M} = \hat{\sigma_z}$ as we did initially, that is, formally from a physical point of view, what we will do is measure the observable $\hat{\sigma_z}$. However, from a mathematical point of view we can measure any projective measurement (self-adjoint operator) that distinguishes with a certain eigenvalue the qubit $\ket{0}$ and with a different eigenvalue the qubit $\ket{1}$.

In summary, what is really relevant for this calculation is the projector of the eigenvalue associated with the state we want to measure, in this case what we want to calculate is $\bra{\psi}\hat{P_0}\ket{\psi}$, except that we are working on $\mathbb{B}^{\otimes2}$, but that detail will be clarified below.

According to section **1.** of the previous remark, to calculate this probability, we must calculate the expected value of a projector, but we cannot simply consider $\hat{P_0}$ because of the fact that we just mentioned, that we are working on $\mathbb{B}^{\otimes2}$. Since in this case the state of the second qubit is not relevant, what we need is the following

\begin{equation*}
    \begin{split}
        &\bra{\psi}\hat{P_0}\otimes\hat{I}\ket{\psi} = \\
        &= \bra{\psi} \left[\ketbra{0}\otimes\hat{I}\left(\sqrt{\frac{3}{8}}\ket{00} + \frac{1}{2}\ket{01} + \frac{1}{2}\ket{10} + \frac{1}{\sqrt{8}}\ket{11} \right) \right] \\
        &= \bra{\psi} \left[ \sqrt{\frac{3}{8}} \ketbra{0}\otimes\hat{I}\ket{00} + \frac{1}{2} \ketbra{0}\otimes\hat{I}\ket{01} + \frac{1}{2} \ketbra{0}\otimes\hat{I}\ket{10} + \frac{1}{\sqrt{8}} \ketbra{0}\otimes\hat{I}\ket{11} \right] \\
    \end{split}
\end{equation*}

Let us recall from <a href="../2-math/TensorProduct.ipynb#definition_2_11">Definition 2.11</a>, that $\hat{A} \otimes \hat{B}(\ket{a} \otimes \ket{b}) = (\hat{A}\ket{a})\otimes(\hat{B}\ket{b})$. This means that we must apply the projector $\ketbra{0}{0}$ to the first qubit and the operator $\hat{I}$ to the second qubit, since its state is not relevant to us. Thus

\begin{equation*}
    \begin{split}
        \bra{\psi}\hat{P_0}\otimes\hat{I}\ket{\psi} &= \bra{\psi} \left( \sqrt{\frac{3}{8}} \ket{00} + \frac{1}{2} \ket{01} \right) \\
        &= \left(\sqrt{\frac{3}{8}}\bra{00} + \frac{1}{2}\bra{01} + \frac{1}{2}\bra{10} + \frac{1}{\sqrt{8}}\bra{11}\right) \left(\sqrt{\frac{3}{8}} \ket{00} + \frac{1}{2} \ket{01}\right) \\
        &= \left(\sqrt{\frac{3}{8}}\right)\left(\sqrt{\frac{3}{8}}\right)\braket{00}{00} + \left(\frac{1}{2}\right)\left(\frac{1}{2}\right)\braket{01}{01} \\
        &= \frac{3}{8} + \frac{1}{4} = \frac{5}{8}
    \end{split}
\end{equation*}

This is congruent with the intuition given by the fact that the amplitudes associated with the states where the first qubit is $\ket{0}$ are $\sqrt{\frac{3}{8}}$ and $\frac{1}{2}$ and to calculate the probability of measuring these states, we take the modulus squared of the amplitudes, which is known as _Born's Rule_.

In summary, formally what we did was calculate the probability of measuring the eigenvalue $+1$ of the observable $\hat{\sigma_z}\otimes\hat{I}$, which is completely congruent with what the postulates tell us. But as we previously highlighted, for practical issues of carrying out this calculation, the only thing that was relevant, was the projector associated with the state we wanted to measure, we do not need to know the observable or the eigenvalue to measure. Which allows us to put aside a bit the formalism that the postulates entail.

**2. What is the status immediately after measurement?**

Section **2.** of the previous remark tells us that

\begin{equation*}
    \begin{split}
        \ket{\psi} \longrightarrow \frac{\hat{P_0}\otimes\hat{I}\ket{\psi}}{\sqrt{P(\ket{0})}} &= \frac{\hat{P_0}\otimes\hat{I}\ket{\psi}}{\sqrt{\frac{5}{8}}} \\
        &= \sqrt{\frac{8}{5}}\hat{P_0}\otimes\hat{I}\ket{\psi} \\
        &= \sqrt{\frac{8}{5}}\left(\sqrt{\frac{3}{8}}\ket{00} + \frac{1}{2}\ket{01}\right) \\
        &= \sqrt{\frac{3}{5}}\ket{00} + \sqrt{\frac{2}{5}}\ket{01}
    \end{split}
\end{equation*}

Where $P(\ket{0})$ is the probability that we just calculated in the first question. Technically it would have to be the probability of measuring the eigenvalue $+1$, but from what we explained previously, we allow ourselves to use this notation.

Note that this new state is the projection of $\ket{\psi}$ over the subspace generated by all the states that have the first qubit in $\ket{0}$, namely $\set{\ket{00}, \ket{01}}$, therefore this condition is also true. On the other hand, we note that the normalization is correct since $\abs{\sqrt{\frac{3}{5}}}^2 + \abs{\sqrt{\frac{2}{5}}}^2 = \frac{3}{5} + \frac{2}{5} = 1$.

**3. What is the probability of measuring some qubit in $\ket{1}$?**

Let us consider the following events

\begin{equation*}
    \begin{split}
        A &= \text{Measure first qubit in} \ket{1} \\
        B &= \text{Measure second qubit in} \ket{1}
    \end{split}
\end{equation*}

Recall from probability theory that

\begin{equation*}
    P(A \cup B) = P(A) + P(B) - P(A \cap B)
\end{equation*}

So what we are looking for is

\begin{equation*}
    \begin{split}
        P(A \cup B) &= \bra{\psi}\hat{P_1}\otimes\hat{I}\ket{\psi} + \bra{\psi}\hat{I}\otimes\hat{P_1}\ket{\psi} - \bra{\psi}\hat{P_1}\otimes\hat{P_1}\ket{\psi} \\
        &= \bra{\psi}\left(\frac{1}{2}\ket{10} + \frac{1}{\sqrt{8}}\ket{11}\right) + \bra{\psi}\left(\frac{1}{2}\ket{01} + \frac{1}{\sqrt{8}}\ket{11}\right) - \bra{\psi}\left(\frac{1}{\sqrt{8}}\ket{11}\right) \\
        &= \frac{1}{2}\braket{\psi}{10} + \frac{1}{\sqrt{8}}\braket{\psi}{11} + \frac{1}{2}\braket{\psi}{01} + \frac{1}{\sqrt{8}}\braket{\psi}{11} - \frac{1}{\sqrt{8}}\braket{\psi}{11} \\
        &= \left(\frac{1}{2}\right)\left(\frac{1}{2}\right) + \left(\frac{1}{\sqrt{8}}\right)\left(\frac{1}{\sqrt{8}}\right) + \left(\frac{1}{2}\right)\left(\frac{1}{2}\right) \\
        &= \frac{1}{4} + \frac{1}{8} + \frac{1}{4} = \frac{5}{8}
    \end{split}
\end{equation*}

Note that the amplitudes of the terms of $\ket{\psi}$ that have some qubit in $\ket{1}$ are precisely $\frac{1}{2}$, $\frac{1}{2}$ and $\frac{1}{\sqrt{8}}$, if we calculate the sum of its squared modules we have exactly

\begin{equation*}
    \abs{\frac{1}{2}}^2 + \abs{\frac{1}{2}}^2 + \abs{\frac{1}{\sqrt{8}}}^2 = \frac{1}{4} + \frac{1}{4} + \frac{1}{8} = \frac{5}{8} = P(AUB)
\end{equation*}


The goal of this section on projective measurement is to highlight that in quantum computing, when we talk about measuring, it is much more practical to ask about the state of the system than the value to be measured, which might not be so relevant in this context. For example, if we have a state $\ket{\psi}$ of three qubits, it is easier to think of calculating the probability of measuring $\ket{010}$ than to think of calculating the probability of measuring a certain eigenvalue of $\hat{\sigma_z}\otimes\hat{\sigma_z}\otimes\hat{\sigma_z}$, which is actually what we are doing in the background but without the formalism of the postulates of quantum mechanics. We can say that in quantum computing the state of the system (the qubits themselves) is more relevant than the eigenvalues obtained from measuring $\hat{\sigma_z}$.

It is important to note that in quantum computing, measurement can also be part of an algorithm. When this topic is addressed, it will be clear that many times a measurement is made to project to a certain state that is being sought and continue with the algorithm from that new state. Therefore, being able to know the state of a system after a certain measurement turns out to be very relevant.

### <a name="remark_3_9">Remark 3.9</a>

1. Non-orthogonal states cannot be reliably distinguished by a projective measurement.

Let us remember that if we have a certain state $\ket{\psi}$, we measure an observable (self-adjoint operator) and obtain an eigenvalue of that measurement, what the postulates of quantum mechanics regarding the measurement tell us, is that this state $\ket{\psi}$ will be projected on the subspace associated with the measured eigenvalue. In terms of the previous section, this means applying a projector to the $\ket{\psi}$ state.

What do we mean by reliably distinguish them? By using a projective measurement we can measure one of them with  probability $1$, and measure the other with probability $0$. For example, if we wanted to distinguish if we have the state $\ket{\varphi}$ and not state $\ket{\psi}$, we would simply want to measure the expected value of the projector $\hat{P_\varphi}$ in $\ket{\varphi}$ and get $1$ and in turn get $0$ by measuring it in $\ket{\psi}$. Let's see why we can't make this reliable distinction with two states that are not orthogonal using an example.

Let us consider the following non-orthogonal states

\begin{equation*}
    \ket{\psi} = \ket{0} \enspace \text{ y } \enspace \ket{\varphi} = \frac{1}{\sqrt{2}}(\ket{0} + \ket{1})
\end{equation*}

And the projector

\begin{equation*}
    \hat{P_\psi} = \ketbra{\psi}{\psi}
\end{equation*}

Thus we have

\begin{equation*}
    \begin{split}
        P(\ket{\psi}) &= \bra{\psi}\hat{P_\psi}\ket{\psi} = \braket{\psi}{\psi}\braket{\psi}{\psi} = 1 \\
        P(\ket{\varphi}) &= \bra{\varphi}\hat{P_\psi}\ket{\varphi} = \braket{\varphi}{\psi}\braket{\psi}{\varphi} = \frac{1}{\sqrt{2}}\frac{1}{\sqrt{2}} = \frac{1}{2}
    \end{split}
\end{equation*}

It should be clear from this particular example that we cannot have a projector that allows us to reliably distinguish two non-orthogonal states.

2. Orthogonal states can be reliably distinguished by a projective measurement.

Let's consider the states

\begin{equation*}
    \ket{\psi} = \ket{0} \enspace \text{ and } \enspace \ket{\varphi} = \ket{1}
\end{equation*}

\begin{equation*}
    \begin{split}
        \hat{P_\psi} &= \ketbra{\psi}{\psi} \\
        \implies \\
        P(\ket{\psi}) &= \bra{\psi}\hat{P_\psi}\ket{\psi} = \braket{\psi}{\psi}\braket{\psi}{\psi} = 1 \\
        P(\ket{\varphi}) &= \bra{\varphi}\hat{P_\psi}\ket{\varphi} = \braket{\varphi}{\psi}\braket{\psi}{\varphi} = 0
    \end{split}
\end{equation*}

It should be clear from this particular example that we can reliably distinguish orthogonal states.

4a71e94865b5875eb960c23bd78e3221322ecf31
ipynb
Jupyter Notebook
3-qm/ProjectiveMeasurement.ipynb
igelover/math-intro-to-qc
4ad535402cb6ccd619c4e4fd5c257ae8c6ce76d3
MIT
2022-01-18T00:26:27.000Z
2022-01-18T00:26:27.000Z
3-qm/ProjectiveMeasurement.ipynb
igelover/math-intro-to-qc
4ad535402cb6ccd619c4e4fd5c257ae8c6ce76d3
MIT
3-qm/ProjectiveMeasurement.ipynb
igelover/math-intro-to-qc
4ad535402cb6ccd619c4e4fd5c257ae8c6ce76d3
MIT
Qwen/Qwen-72B
1. YES
2. YES