Note
Click here to download the full example code
Quantum state exclusion¶
In this tutorial, we are going to cover the problem of quantum state
exclusion. We are going to briefly describe the problem setting and then
describe how one may use |toqitoβ© to calculate the optimal probability
with which this problem can be solved for a number of different scenarios.
Quantum state exclusion is very closely related to the problem of quantum state distinguishability. It may be useful to consult the quantum state distinguishability tutorial on this topic.
Further information beyond the scope of this tutorial can be found in the text 1 as well as the course 2.
The state exclusion problem¶
The quantum state exclusion problem is phrased as follows.
1. Alice possesses an ensemble of \(n\) quantum states:
where \(p_i\) is the probability with which state \(\rho_i\) is selected from the ensemble. Alice picks \(\rho_i\) with probability \(p_i\) from her ensemble and sends \(\rho_i\) to Bob.
2. Bob receives \(\rho_i\). Both Alice and Bob are aware of how the ensemble is defined but he does not know what index \(i\) corresponding to the state \(\rho_i\) he receives from Alice is.
3. Bob wants to guess which of the states from the ensemble he was not given. In order to do so, he may measure \(\rho_i\) to guess the index \(i\) for which the state in the ensemble corresponds.
This setting is depicted in the following figure.
Figure: Quantum state distinguishability setting.
Note
The primary difference between the quantum state distinguishability scenario and the quantum state exclusion scenario is that in the former, Bob wants to guess which state he was given, and in the latter, Bob wants to guess which state he was not given.
Perfect state exclusion (antidistinguishability)¶
We say that if one is able to perfectly (without error) exclude all quantum states in a set, then the set of states is antidistinguishable.
Definition: Let \(n\) and \(d\) be integers. A collection of quantum states \(S = \{|\psi_1\rangle, \ldots, |\psi_{n}\rangle\} \subset \mathbb{C}^d\) are antidistinguishable if there exists a collection of positive operator value measurements \(\{M_1, \ldots, M_{n}\}\) such that \(\langle \psi_i | M_i | \psi_i \rangle = 0\) for all \(1 \leq i \leq n\).
Recall that a collection of POVMs are positive semidefinite operators \(\{M_i : 1 \leq i \leq n\} \subset \mathbb{C}^d\) that satisfy
Properties:
-
If \(S\) is distinguishable then it is antidistinguishable.
-
If \(n = 2\) then \(S\) is distinguishable if and only if \(S\) is antidistinguishable.
-
Distinguishing one state from a pair of states is equivalent to excluding one of the states from that pair.
-
If \(n \geq 3\) then there are antidistinguishable sets that are not distinguishable.
Example: Trine states¶
The so-called trine states are a set of three states, each of dimension two defined as
from toqito.states import trine
psi1, psi2, psi3 = trine()
print(f"|π_1> = {psi1.reshape(1, -1)[0]}")
print(f"|π_2> = {psi2.reshape(1, -1)[0]}")
print(f"|π_3> = {psi3.reshape(1, -1)[0]}")
Out:
The trine states are three states in two dimensions. So they can't be mutually orthogonal, but they are about "as close as you can get" for three states in two dimensions to be mutually orthogonal.

from toqito.state_props import is_mutually_orthogonal
from toqito.states import trine
print(f"Are states mutually orthogonal: {is_mutually_orthogonal(trine())}")
Out:
An interesting property of these states is that they are antidistinguishable but not distinguishable.
from toqito.state_props import is_antidistinguishable, is_distinguishable
from toqito.states import trine
print(f"Trine antidistinguishable: {is_antidistinguishable(trine())}")
print(f"Trine distinguishable: {is_distinguishable(trine())}")
Out:
Here are a set of measurements that we can verify which satisfy the antidistinguishability constraints. We will see a method that we can use to obtain these directly later.
import numpy as np
M1 = 2 / 3 * (np.identity(2) - psi1 @ psi1.conj().T)
M2 = 2 / 3 * (np.identity(2) - psi2 @ psi2.conj().T)
M3 = 2 / 3 * (np.identity(2) - psi3 @ psi3.conj().T)
In order for \(M_1\), \(M_2\), and \(M_3\) to constitute as valid POVMs, each of these matrices must be positive semidefinite and we must ensure that \(\sum_{i \in \{1,2,3\}} M_i = \mathbb{I}_2\).
from toqito.matrix_props import is_positive_semidefinite
print(f"M_1 + M_2 + M_3 is identity: {np.allclose(M1 + M2 + M3, np.identity(2))}")
print(f"Is M_1 PSD: {is_positive_semidefinite(M1)}")
print(f"Is M_2 PSD: {is_positive_semidefinite(M2)}")
print(f"Is M_3 PSD: {is_positive_semidefinite(M3)}")
Out:
Next, we must show that these measurements satisfy \(\langle \psi_i | M_i | \psi_i \rangle = 0\) for all \(i \in \{1,2,3\}\).
print(f"<π_1| M_1 |π_1>: {np.around((psi1.reshape(1, -1)[0] @ M1 @ psi1)[0], decimals=5)}")
print(f"<π_2| M_2 |π_2>: {np.around((psi2.reshape(1, -1)[0] @ M2 @ psi2)[0], decimals=5)}")
print(f"<π_3| M_3 |π_3>: {np.around((psi3.reshape(1, -1)[0] @ M3 @ psi3)[0], decimals=5)}")
Out:
Since we have exhibited a set of measurements \(\{M_i: i \in \{1,2,3\}\} \subset \text{Pos}(\mathbb{C^d})\) that satisfy
for all \(i\), we conclude that the trine states are antidistinguishable.
An SDP for antidistinguishability¶
Whether a collection of states \(\{|\psi_1 \rangle, |\psi_2\rangle, \ldots, |\psi_{n}\rangle \}\) are antidistinguishable or not can be determined by the following semidefinite program (SDP).
Consider again the trine states from the previous example. We can determine that they are antidistinguishable by way of the antidistinguishability SDP.
from toqito.state_opt import state_exclusion
from toqito.states import trine
opt_value, measurements = state_exclusion(trine(), probs=[1, 1, 1], primal_dual="dual")
print(f"Optimal SDP value: {np.around(opt_value, decimals=2)}")
Out:
The SDP not only gives us the optimal value, which is \(0\) in this case, indicating that the states are antidistinguishable, but we also get a set of optimal measurement operators. These should look familiar to the measurements we explicitly constructed earlier.
Antidistinguishability and (n-1)-incoherence¶
Antidistinguishability of a set of pure states is equivalent to a certain notion from the theory of quantum resources referred to as \(k\)-incoherence 3:
Definition: Let \(n\) and \(k\) be positive integers. Then \(X \in \text{Pos}(\mathbb{C} ^n)\) is called \(k\)-incoherent* if there exists a positive integer \(m\), a set \(S = \{|\psi_0\rangle, |\psi_1\rangle,\ldots, |\psi_{m-1}\rangle\} \subset \mathbb{C} ^n\) with the property that each \(|\psi_i\rangle\) has at most \(k\) non-zero entries, and real scalars \(c_0, c_1, \ldots, c_{m-1} \geq 0\) for which
It turns out that antidistinguishability is equivalent to \(k\)-incoherence in the \(k = n - 1\) case. Reproducing one of the results from 4, we have the following theorem.
Theorem: Let \(n \geq 2\) be an integer and let \(S = \{|\phi_0\rangle, |\phi_1\rangle, \ldots, |\phi_{n-1}\rangle\}\). Then \(S\) is antidistinguishable if and only if the Gram matrix \(G\) is \((n-1)\)-incoherent.
As an example, we can generate a random collection of quantum states, obtain the corresponding Gram matrix, and compute whether the set of states are antidistinguishable and \((n-1)\)-incoherent.
from toqito.matrix_ops import vectors_to_gram_matrix
from toqito.matrix_props import is_k_incoherent
from toqito.rand import random_states
from toqito.state_props import is_antidistinguishable
# mkdocs_gallery_thumbnail_path = 'figures/trine.png'
n, d = 3, 3
states = random_states(n, d)
gram = vectors_to_gram_matrix(states)
print(f"Is Antidistinguishable: {is_antidistinguishable(states)}")
print(f"Is (n-1)-incoherent: {is_k_incoherent(gram, n - 1)}")
# As can be seen, whether the random set of states are antidistinguishable or not aligns with whether they are
# $(n-1)$-incoherent or not as well.
Out:
Total running time of the script: ( 0 minutes 0.048 seconds)
Download Python source code: state_exclusion.py
Download Jupyter notebook: state_exclusion.ipynb
Gallery generated by mkdocs-gallery
-
Matthew F. Pusey, Jonathan Barrett, and Terry Rudolph. On the reality of the quantum state. Nature Physics, 8(6):475–478, May 2012. URL: http://dx.doi.org/10.1038/nphys2309, doi:10.1038/nphys2309. ↩
-
Somshubhro Bandyopadhyay, Rahul Jain, Jonathan Oppenheim, and Christopher Perry. Conclusive exclusion of quantum states. Physical Review A, Feb 2014. URL: http://dx.doi.org/10.1103/PhysRevA.89.022336, doi:10.1103/physreva.89.022336. ↩
-
Nathaniel Johnston, Shirin Moein, Rajesh Pereira, and Sarah Plosker. Absolutely k-incoherent quantum states and spectral inequalities for the factor width of a matrix. Physical Review A, 106(5):052417, 2022. ↩
-
Nathaniel Johnston, Vincent Russo, and Jamie Sikora. Tight bounds for antidistinguishability and circulant sets of pure quantum states. Quantum, 9:1622, 2025. ↩