Distinguishing quantum states via positive measurements

In this tutorial, we are going to show how to make use of qustop to calculate the optimal probability of distinguishing a state from an ensemble of quantum states when Alice and Bob are allowed to use global (positive) measurements on their system.

Minimum-error distinguishability via positive measurements

The optimal probability with which Bob can distinguish the state he is given may be obtained by solving the following semidefinite program (SDP).

\[\begin{split}\begin{align*} \textbf{Primal:} \quad & \\ \text{maximize:} \quad & \sum_{i=0}^n p_i \langle M_i, \rho_i \rangle \\ \text{subject to:} \quad & \sum_{i=0}^n M_i = \mathbb{I}_{\mathcal{A} \otimes \mathcal{B}},\\ & M_1, \ldots, M_n \in \text{Pos}(\mathcal{A} \otimes \mathcal{B}). \end{align*}\end{split}\]
\[\begin{split}\begin{equation} \begin{aligned} \textbf{Dual:} \quad & \\ \text{minimize:} \quad & \text{Tr}(Y) \\ \text{subject to:} \quad & Y - \rho_i \in \text{Pos}(\mathcal{A} \otimes \mathcal{B}), \quad \forall i = 1, \ldots, n, \\ & Y \in \text{Herm}(\mathcal{A} \otimes \mathcal{B}). \end{aligned} \end{equation}\end{split}\]

The qustop package solves either of these two optimization problems depending on whether the optimal measurements are required.

For the special case of distinguishing between two states, the probability of optimally distinguishing is exactly

\[\text{opt}_{\text{POS}}(\eta) = \frac{1}{2} + \frac{1}{4} \left\lVert \eta(0) - \eta(1) \right\rVert_1\]

where \(\left\lVert \cdot \right\rVert_1\).

A result of [tWalgate00] shows that any two orthogonal pure states can be distinguished perfectly. This result actually applies to LOCC measurements and is a stronger claim than just for positive measurements, but since \(\text{opt}_{\text{LOCC}}(\eta) \leq \text{opt}_{\text{POS}}(\eta)\) is true for any ensemble \(\eta\), it also holds for positive measurements.

For example, consider the two orthogonal pure states

\[| \psi_0 \rangle = \sqrt{\frac{3}{4}} | + \rangle + \sqrt{\frac{1}{4}} | - \rangle \quad \text{and} \quad | \psi_1 \rangle = \sqrt{\frac{1}{4}} | + \rangle - \sqrt{\frac{3}{4}} | - \rangle.\]

Since \(| \psi_0 \rangle\) and \(| \psi_1 \rangle\) are pure and mutually orthogonal, they are able to be perfectly distinguished.

 1import numpy as np
 2
 3from qustop import Ensemble, OptDist, State
 4
 5# Define single-qubit |+> and |-> basis states.
 6e_p, e_m = (
 7    1 / np.sqrt(2) * np.array([[1, 1]]).T,
 8    1 / np.sqrt(2) * np.array([[1, -1]]).T,
 9)
10
11dims = [2]
12# sqrt(3/4)|+> + sqrt(1/4)|->
13psi_1 = State(np.sqrt(3 / 4) * e_p + np.sqrt(1 / 4) * e_m, dims)
14# sqrt(1/4)|+> - sqrt(3/4)|->
15psi_2 = State(np.sqrt(1 / 4) * e_p - np.sqrt(3 / 4) * e_m, dims)
16
17# Verify that the states `psi_1` and `psi_2` are pure:
18print(f"Is psi_1 pure: {psi_1.is_pure}")
19print(f"Is psi_2 pure: {psi_2.is_pure}")
20
21ensemble = Ensemble([psi_1, psi_2])
22
23res = OptDist(ensemble, "pos", "min-error")
24
25# 0.999999998061445
26res.solve()
27print(res.value)
28
29# The closed-form equation yields: 0.9999999999999999 = 1
30print(1 / 2 + 1 / 4 * np.linalg.norm(psi_1.value - psi_2.value, ord="nuc"))

Consider now the following two mixed states

\[| \phi_1 \rangle = \sqrt{\frac{3}{4}} |+ \rangle + \sqrt{\frac{1}{4}} |- \rangle \quad \text{and} \quad | \phi_2 \rangle = \sqrt{\frac{1}{4}} |+ \rangle + \sqrt{\frac{3}{4}} |- \rangle.\]

The following code sample shows that the closed-form equation matches the result obtained from qustop, however, since they are mixed states and not pure, we are not able to perfectly distinguish them.

 1import numpy as np
 2
 3from qustop import Ensemble, OptDist, State
 4
 5# Define single-qubit |+> and |-> basis states.
 6e_p, e_m = (
 7    1 / np.sqrt(2) * np.array([[1, 1]]).T,
 8    1 / np.sqrt(2) * np.array([[1, -1]]).T,
 9)
10
11dims = [2]
12# sqrt(3/4) |+> + sqrt(1/4)|->
13phi_1 = State(np.sqrt(3 / 4) * e_p + np.sqrt(1 / 4) * e_m, dims)
14# sqrt(1/4) |+> + sqrt(3/4)|->
15phi_2 = State(np.sqrt(1 / 4) * e_p + np.sqrt(3 / 4) * e_m, dims)
16
17# Verify that the states `phi_1` and `phi_2` are mixed:
18print(f"Is phi_1 pure: {phi_1.is_pure}")
19print(f"Is phi_2 pure: {phi_2.is_pure}")
20
21ensemble = Ensemble([phi_1, phi_2])
22
23res = OptDist(ensemble, "pos", "min-error")
24
25# 0.7500000000609778
26res.solve()
27print(res.value)
28
29# The closed-form equation yields: 3/4
30print(1 / 2 + 1 / 4 * np.linalg.norm(phi_1.value - phi_2.value, ord="nuc"))

On the note of orthogonality, if the ensemble of states provided consist of all mutually orthogonal states, then it is possible to distinguish with perfect probability in this special case.

As a prototypical example, consider the four Bell states

\[\begin{split}\begin{equation} \begin{aligned} | \psi_0 \rangle = \frac{| 00 \rangle + | 11 \rangle}{\sqrt{2}}, &\quad | \psi_1 \rangle = \frac{| 01 \rangle + | 10 \rangle}{\sqrt{2}}, \\ | \psi_2 \rangle = \frac{| 01 \rangle - | 10 \rangle}{\sqrt{2}}, &\quad | \psi_3 \rangle = \frac{| 00 \rangle - | 11 \rangle}{\sqrt{2}}. \end{aligned} \end{equation}\end{split}\]
 1from toqito.states import bell
 2
 3from qustop import Ensemble, OptDist, State
 4
 5dims = [2, 2]
 6ensemble = Ensemble(
 7    [
 8        State(bell(0), dims),
 9        State(bell(1), dims),
10        State(bell(2), dims),
11        State(bell(3), dims),
12    ]
13)
14
15# Verify that states in the ensemble are mutually orthogonal:
16print(f"Are states mutually orthogonal: {ensemble.is_mutually_orthogonal}")
17
18res = OptDist(ensemble, "pos", "min-error")
19
20# Mutually orthogonal states are optimally distinguishable--giving
21# an optimal value of one.
22res.solve()
23# 1.0000000000879223
24print(res.value)

If there are more than two states and those states are not mutually orthogonal, no closed-form equation is known to exist, so we resort to solving the SDP.

For instance, consider the following set of three non-mutually-orthogonal states

\[\begin{split}\begin{equation} \begin{aligned} | \phi_1 \rangle = \sqrt{\frac{3}{4}}| + \rangle + \sqrt{\frac{1}{4}} | - \rangle, &\quad | \phi_2 \rangle = \sqrt{\frac{1}{4}}| + \rangle + \sqrt{\frac{3}{4}} | - \rangle, \\ | \phi_3 \rangle = \sqrt{\frac{1}{2}}| + \rangle + \sqrt{\frac{1}{2}} | - \rangle. \end{aligned} \end{equation}\end{split}\]
 1import numpy as np
 2
 3from qustop import Ensemble, OptDist, State
 4
 5# Define single-qubit |+> and |-> basis states.
 6e_p, e_m = (
 7    1 / np.sqrt(2) * np.array([[1, 1]]).T,
 8    1 / np.sqrt(2) * np.array([[1, -1]]).T,
 9)
10
11dims = [2]
12ensemble = Ensemble(
13    [
14        State(np.sqrt(3 / 4) * e_p + np.sqrt(1 / 4) * e_m, dims),
15        State(np.sqrt(1 / 4) * e_p + np.sqrt(3 / 4) * e_m, dims),
16        State(np.sqrt(1 / 2) * e_p + np.sqrt(1 / 2) * e_m, dims),
17    ]
18)
19
20# Verify that ensemble consists of non-mutually-orthogonal states.:
21print(f"Is ensemble mutually orthogonal: {ensemble.is_mutually_orthogonal}")
22
23# For any set of more than two states that are non-mutually orthogonal,
24# no closed-form expression for optimal distinguishability is known to exist.
25# Therefore, we must resort to solving the SDP to determine what the optimal
26# probability is.
27res = OptDist(ensemble, "pos", "min-error")
28
29# 0.5000000000237005
30res.solve()
31print(res.value)

Unambiguous distinguishability via positive measurements

The optimal probability with which Bob can distinguish the state he is given unambiguously may be obtained by solving the following semidefinite program (SDP).

\[\begin{split}\begin{align*} \textbf{Primal:} \quad & \\ \text{maximize:} \quad & \sum_{i=0}^n p_i \langle M_i, \rho_i \rangle \\ \text{subject to:} \quad & \sum_{i=0}^{n+1} M_i = \mathbb{I}_{\mathcal{A} \otimes \mathcal{B}},\\ & \langle M_i \rho_j \rangle = 0 \quad \forall i \not= j = 1, \ldots, n \\ & M_1, \ldots, M_n \in \text{Pos}(\mathcal{A} \otimes \mathcal{B}). \end{align*}\end{split}\]

As an example, consider the set of three non-mutually-orthogonal states we considered earlier

\[\begin{split}\begin{equation} \begin{aligned} | \phi_1 \rangle = \sqrt{\frac{3}{4}}| + \rangle + \sqrt{\frac{1}{4}} | - \rangle, &\quad | \phi_2 \rangle = \sqrt{\frac{1}{4}}| + \rangle + \sqrt{\frac{3}{4}} | - \rangle, \\ | \phi_3 \rangle = \sqrt{\frac{1}{2}}| + \rangle + \sqrt{\frac{1}{2}} | - \rangle. \end{aligned} \end{equation}\end{split}\]

The probability to distinguish amongst these states unambiguously gives a value of zero, while the minimum-error case, as we saw, gave a value of \(3/4\).

 1import numpy as np
 2
 3from qustop import Ensemble, OptDist, State
 4
 5# Define single-qubit |+> and |-> basis states.
 6e_p, e_m = (
 7    1 / np.sqrt(2) * np.array([[1, 1]]).T,
 8    1 / np.sqrt(2) * np.array([[1, -1]]).T,
 9)
10
11dims = [2]
12ensemble = Ensemble(
13    [
14        State(np.sqrt(3 / 4) * e_p + np.sqrt(1 / 4) * e_m, dims),
15        State(np.sqrt(1 / 4) * e_p + np.sqrt(3 / 4) * e_m, dims),
16        State(np.sqrt(1 / 2) * e_p + np.sqrt(1 / 2) * e_m, dims),
17    ]
18)
19
20res = OptDist(ensemble, "pos", "unambiguous")
21
22# Probability of distinguishing unambiguously is zero.
23res.solve()
24print(res.value)

References

tWalgate00

Walgate, J., Short, A. J., Hardy, L., & Vedral, V “Local distinguishability of multipartite orthogonal quantum states.” Physical Review Letters 85.23 (2000): 4972.