# Finding the optimal projective measurement to distinguish between two pure states

I would like some help on what should be a simple computation that I'm failing to see through to the end. Suppose I have a qubit which can be in the state $$|v\rangle$$ with probability $$p$$, or $$|w\rangle$$ with probability $$1-p$$. I will choose some unitary basis $$|a\rangle, |b\rangle$$, and measure the qubit -- if I get $$a$$ I will guess the state was $$v$$, and if I get $$b$$ I will guess the state was $$w$$. My probability of success is $$S = p|\langle a|v \rangle|^2 + (1-p)|\langle b | w \rangle|^2$$ What I want is to maximize this probability. I can think of $$a,b$$ as functions of some parameter and apply calculus: $$S' = p 2 \Re(\langle a' | v \rangle \langle v | a \rangle) + (1-p)2\Re(\langle b' | w\rangle \langle w | b\rangle)$$ If we're setting this to $$0$$ we can ignore the factor of $$2$$.

Since $$\langle a | a \rangle = 1$$, differentiating we obtain $$\Re\langle a' | a \rangle = 0$$, and similarly $$\Re\langle b'|b \rangle = 0$$.

Writing for now $$v = v_a a + v_b b$$ we get $$\langle v|a \rangle = \overline{v_a}$$. Hence $$\Re(\langle a'|v\rangle \langle v|a \rangle) = \Re(v_a \overline{v_a} \langle a'|a \rangle + \overline{v_a}v_b \langle a'|b \rangle)$$ but since $$v_a \overline{v_a} = |v_a|^2$$ is real and $$\langle a' | a \rangle$$ is purely imaginary the first term dies and we obtain $$\Re(\overline{v_a}v_b \langle a'|b \rangle)$$. A similar computation goes for $$w$$, and in the end we can write

$$0 = S'/2 = \Re(p \overline{v_a}v_b \langle a'|b \rangle + (1-p) w_a \overline{w_b} (-\overline{\langle a'|b \rangle}))$$

where I used $$\langle b'|a \rangle = - \overline{\langle a'|b \rangle}$$ which is obtained by differentiating the relation $$\langle a | b \rangle = 0$$.

This is where I get stuck. It feels like I need to combine these terms somehow so some kind of cancellation between the $$\langle a'|b \rangle$$ and $$- \overline{\langle a'|b \rangle}$$ terms happen, but I don't see how to do it. Any help is greatly appreciated.

Edit: I realize now we can use $$w_a \overline{w_b} = \overline{\overline{w_a}w_b}$$ to obtain $$p \Re(\overline{v_a}v_b \langle a'|b \rangle) = (1-p) \Re(\overline{w_a}w_b \langle a'|b \rangle)$$ where I can ignore the conjugate over everything on the right hand side since we're taking the real part.

(What I wrote previously after this did not make sense)

• To clarify, you don't assume anything about $\langle v \mid w \rangle$? They could both be the same state or very close and you'd be SOL and that would be allowed? Dec 24 '19 at 22:19
• @AHusain, I think for the question to make sense we should assume they're distinct (i.e. non-collinear) states. Other than that I don't think it matters how close together they are. If they're very close my probability of success will be low, but the problem of maximizing that probability is still mathematically the same. Dec 24 '19 at 23:50
• This doesn’t take into account the probabilities, but is essentially the formalism you want: quantumcomputing.stackexchange.com/a/4172/1837 Dec 25 '19 at 6:41
• @Pedro it might help to introduce a parametrisation to write the derivatives $|a'\rangle$ etc explicitly. E.g. you can write $|a\rangle=\cos\theta|0\rangle+e^{i\varphi}\sin\theta|1\rangle$ and $|b\rangle=\sin\theta e^{-i\varphi}|0\rangle - \cos\theta|1\rangle$ (assuming you are dealing with qubits). This also makes it explicit that these states have more than one degree of freedom, so you need to impose vanishing derivatives wrt each parameter
– glS
Dec 29 '19 at 12:27
• @glS This sounds like it will be a huge mess! Dec 29 '19 at 14:15

Defining $$S=S(\mathbf a)$$ as per the OP, we then have $$2S = p\left(1+ \mathbf a\cdot \mathbf v\right) + (1-p)\left(1- \mathbf a\cdot \mathbf w\right) \\ = 1 + \mathbf a\cdot(p\mathbf v - (1-p)\mathbf w).$$ We want to maximise this quantity with respect to $$\mathbf a\in\mathbb R$$ with $$\|\mathbf a\|=1$$. An easy way is to impose the gradient $$\nabla S$$ be proportional to $$\nabla(\|\mathbf a\|^2-1)=2\mathbf a$$ (that is, to use the Lagrange multiplier method). An even easier way is to notice that, given an arbitrary (real) vector $$\mathbf x$$, the quantity $$\mathbf a\cdot\mathbf x$$ is maximised for $$\mathbf a\simeq\mathbf x$$.
We conclude that the maximum of $$S$$ is achieved when $$\mathbf a = N[p\mathbf v-(1-p)\mathbf w],$$ where $$N\in\mathbb R$$ ensures the normalisation.
Notice that, if $$\langle v|w\rangle=0$$, you have $$\mathbf w=-\mathbf v$$, and thus $$2S=1+\mathbf a\cdot\mathbf v$$, which gives $$S_{\max}=1$$ for the choice $$\mathbf a=\mathbf v$$. This is of course what we should expect: orthogonal states can be reliably distinguished via suitable choice of measurement.