Repository: vprusso/toqito
Pull request #1033: feature: common quantum overlap
Author: login: jajapuramshivasai
Created: 2025-03-17T17:33:30Z | Merged: 2025-03-19T19:03:01Z

## Description
Fixes #460 
# changes
[1] added and implemented common quantum overlap feature as common_quantum_overlap.py in state_props directory
[2] added relevant tests for common quantum overlap in state_props/tests directory
[3] modified __init__.py to include common_quantum_overlap


Linked issue #460: Feature: Common quantum overlap
The common quantum overlap is defined in terms of a set of quantum states antidistinguishability. 

It is not originally defined in this work ([arXiv:2401.17980](https://arxiv.org/abs/2401.17980)), but it is reproduced as a precursory definition:

![Screenshot 2024-02-03 at 11 14 30 AM](https://github.com/vprusso/toqito/assets/1562214/5626f5fb-c082-4e8f-acef-fe9ec37f3a9f)

Here, $A_Q^{[n]}$ is the antidistinguishability probability which can be computed in `toqito` as such:

```py
 states = [...]
 probs = [1] * len(states)
 opt_val, _ = state_exclusion(vectors=states, probs=probs, primal_dual="dual")
```

where `states` is a list of `np.array` objects provided as row vectors that define individual quantum states. The `opt_val` term in this case would be $A_Q^{[n]}$.

Therefore, we would want some function like the following:

```py
def common_quantum_overlap(states: list[np.ndarray]) -> float:
    n = len(states)
    probs = [1] * n
    opt_val, _ = state_exclusion(vectors=states, probs=probs, primal_dual="dual")
    return n * (1 - opt_val)
```

We would need to write an appropriate docstring with relevant references as well as tests. In the same paper ([arXiv:2401.17980](https://arxiv.org/abs/2401.17980)) there are examples that can be used as specific test cases. 
Linked issue comments: user: login: vprusso
created_at: 2025-03-03T13:46:26Z
body: Hi @jajapuramshivasai ,

There is currently no implementation of this feature. This would be a new feature. Could you provide more information about what you are referring to?
author_association: OWNER
user: login: jajapuramshivasai
created_at: 2025-03-03T13:58:24Z
body: sorry I was looking at  is_antidistinguishable, it was a misunderstanding. I'll be working on implementing this feature.thank you
author_association: CONTRIBUTOR

Diff:
diff --git a/docs/refs.bib b/docs/refs.bib
index e6d7f4ab8..05b7267f9 100644
--- a/docs/refs.bib
+++ b/docs/refs.bib
@@ -133,6 +133,19 @@ @article{Cabello_2002_NParticle
   url={https://arxiv.org/abs/quant-ph/0203119}
 }
 
+
+@misc{Campos_2024_Epistemic,
+author = {A. G. Campos and D. Schmid and L. Mamani and R. W. Spekkens and I. Sainz},
+title = {No epistemic model can explain anti-distinguishability of quantum mixed preparations},
+journal = {arXiv},
+year = {2024},
+volume = {2401.17980v2},
+url = {https://arxiv.org/abs/2401.17980},
+note = {Preprint},
+archivePrefix= {arXiv},
+primaryClass = {quant-ph}
+}
+
 @article{Cavalcanti_2015_Detection,
   title={Detection of entanglement in asymmetric quantum networks and multipartite quantum steering},
   volume={6},
@@ -271,6 +284,8 @@ @misc{Cariello_2013_Weak_irreducible
   primaryClass={quant-ph}
 }
 
+
+
 % Last name begins with D
 @article{DiVincenzo_2000_Evidence,
   title={Evidence for bound entangled states with negative partial transpose},
@@ -1452,3 +1467,5 @@ @article{Zhang_2008_Beyond_realignment
   doi = {10.1103/PhysRevA.77.060301},
   url = {https://link.aps.org/doi/10.1103/PhysRevA.77.060301}
 }
+
+
diff --git a/toqito/state_props/__init__.py b/toqito/state_props/__init__.py
index a20b2bdfd..57b17f90d 100644
--- a/toqito/state_props/__init__.py
+++ b/toqito/state_props/__init__.py
@@ -23,3 +23,4 @@
 from toqito.state_props.is_antidistinguishable import is_antidistinguishable
 from toqito.state_props.is_distinguishable import is_distinguishable
 from toqito.state_props.is_unextendible_product_basis import is_unextendible_product_basis
+from toqito.state_props.common_quantum_overlap import common_quantum_overlap
diff --git a/toqito/state_props/common_quantum_overlap.py b/toqito/state_props/common_quantum_overlap.py
new file mode 100644
index 000000000..a80773400
--- /dev/null
+++ b/toqito/state_props/common_quantum_overlap.py
@@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> round(common_quantum_overlap(bell_states),4)
+    0.0
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> round(common_quantum_overlap(states),4)
+    1.0
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> round(common_quantum_overlap(states),4)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2929
+
+    References
+    ==========
+    .. bibliography::
+        :filter: docname in docnames
+
+
+    :param states: A list of quantum states represented as numpy arrays. States can be
+                  pure states (represented as state vectors) or mixed states
+                  (represented as density matrices).
+    :return: The common quantum overlap value.
+
+    """
+    n = len(states)
+    opt_val, _ = state_exclusion(vectors=states, probs=[1] * n, primal_dual="dual")
+    return n * (1 - (1 - opt_val / n))
+
diff --git a/toqito/state_props/tests/test_common_quantum_overlap.py b/toqito/state_props/tests/test_common_quantum_overlap.py
new file mode 100644
index 000000000..cebcc7d6d
--- /dev/null
+++ b/toqito/state_props/tests/test_common_quantum_overlap.py
@@ -0,0 +1,46 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap",
+    [
+        (
+            # Bell states: They are perfectly antidistinguishable (ω_Q = 0)
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+        ),
+        (
+            # Maximally mixed states: For n = 3, the overlap is maximum (ω_Q = 1)
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+        ),
+        (
+            # Two pure states with inner product cos(theta) (theta = π/4)
+            # Expected overlap: ω_Q = 1 - √(1 - cos(π/4)²)
+            [np.array([1, 0]), np.array([np.cos(np.pi/4), np.sin(np.pi/4)])],
+            1 - np.sqrt(1 - np.cos(np.pi/4)**2),
+        ),
+        (
+            # Three pure states on a great circle of the Bloch sphere
+            # Equally spaced states (angles: 0, 2π/3, 4π/3) are perfectly antidistinguishable (ω_Q = 0)
+            [
+                np.array([1, 0]),
+                np.array([np.cos(2 * np.pi / 3), np.sin(2 * np.pi / 3)]),
+                np.array([np.cos(4 * np.pi / 3), np.sin(4 * np.pi / 3)])
+            ],
+            0,
+        ),
+    ]
+)
+
+def test_common_quantum_overlap_parametrized(states, expected_overlap):
+    """Test function works as expected for a valid input."""
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap)
+


Reviews:
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T17:35:24Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T17:36:28Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T17:36:50Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-17T17:42:19Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T18:14:33Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T18:42:36Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T18:42:52Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:06:06Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:14:46Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:41:47Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:42:07Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:42:33Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:42:58Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:44:09Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:44:23Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T19:45:28Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T20:07:42Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T20:35:31Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T20:53:46Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T20:57:40Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T20:59:02Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T22:55:50Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T04:12:08Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T11:38:45Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T14:12:26Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-18T15:06:36Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T15:13:19Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T15:21:55Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T15:23:24Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T15:53:33Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T17:30:18Z
user: login: vprusso
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-18T17:31:44Z
user: login: vprusso
body: Think this is good on my end. I'll wait for @purva-thakre 's approval as well
state: APPROVED
author_association: OWNER
submitted_at: 2025-03-18T17:39:03Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-19T16:33:35Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-19T16:36:37Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T17:07:27Z
user: login: purva-thakre
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-19T18:26:52Z
user: login: jajapuramshivasai
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T18:28:15Z
user: login: purva-thakre
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-19T19:02:53Z

Review comments:
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
+        
+    Examples
+    --------
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0
+    
+    >>> # For maximally mixed states in any dimension
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    >>> # For two pure states with known inner product
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+    
+    See Also
+    --------
+    antidistinguishability_probability, is_antidistinguishable
+    
+    References
+    ----------
+        
+    .. [1] A. G. Campos, D. Schmid, L. Mamani, R. W. Spekkens, I. Sainz.
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: You do not need to manually list the references. Please take a look at the contributing guide int he documentation. 

https://toqito.readthedocs.io/en/latest/contributing.html#references-in-docstrings
created_at: 2025-03-17T17:35:24Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: we have a different style for this. Please see the contributing guide in the documentation. 

Also, you don't need to list the type in this section if the parameter is type hinted on L6. 
created_at: 2025-03-17T17:36:28Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: use math mode. See contributing guide in the documentation
created_at: 2025-03-17T17:36:50Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
+        
+    Examples
+    --------
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0
+    
+    >>> # For maximally mixed states in any dimension
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    >>> # For two pure states with known inner product
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+    
+    See Also
+    --------
+    antidistinguishability_probability, is_antidistinguishable
+    
+    References
+    ----------
+        
+    .. [1] A. G. Campos, D. Schmid, L. Mamani, R. W. Spekkens, I. Sainz.
+        "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
+        arXiv:2401.17980v2 (2024)
+        
+    Note
+    -----
+    This function uses the antidistinguishability probability(A_q) as an intermediate step
+    in the calculation. The common quantum overlap is a key concept in the paper
+    "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
+    for studying the limitations of epistemic models in quantum mechanics.
+    """
+
+    n = len(states)
+    probs = [1] * n
+    opt_val, _ = state_exclusion(vectors=states, probs=probs, primal_dual="dual")
+    A_q = 1 - opt_val/n   #   1 - (1/n) < A_q < 1
+ 
+
+    omega_q = n * (1 - A_q)
+
+    return omega_q
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Simpler/consolidation:
```suggestion
    n = len(states)
    opt_val, _ = state_exclusion(vectors=states, probs=[1] * n, primal_dual="dual")
    return n * (1 - (1 - opt_val / n))
```
created_at: 2025-03-17T17:39:19Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
+        
+    Examples
+    --------
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0
+    
+    >>> # For maximally mixed states in any dimension
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    >>> # For two pure states with known inner product
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+    
+    See Also
+    --------
+    antidistinguishability_probability, is_antidistinguishable
+    
+    References
+    ----------
+        
+    .. [1] A. G. Campos, D. Schmid, L. Mamani, R. W. Spekkens, I. Sainz.
+        "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
+        arXiv:2401.17980v2 (2024)
+        
+    Note
+    -----
+    This function uses the antidistinguishability probability(A_q) as an intermediate step
+    in the calculation. The common quantum overlap is a key concept in the paper
+    "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Is there a reason that this line is quoted?
created_at: 2025-03-17T17:39:46Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
+        
+    Examples
+    --------
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0
+    
+    >>> # For maximally mixed states in any dimension
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    >>> # For two pure states with known inner product
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+    
+    See Also
+    --------
+    antidistinguishability_probability, is_antidistinguishable
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: `antidistinguishability_probability` is not a thing.
created_at: 2025-03-17T17:40:02Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,72 @@
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable so the common quantum overlap should be 0.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: I'd say remove the description, but replace the comment with what you wrote for the description. For instance:

```suggestion
            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
            [bell(0), bell(1), bell(2), bell(3)],
            0
```
created_at: 2025-03-17T17:41:59Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,83 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+    
+    The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
+    based on their antidistinguishability properties. It is related to the 
+    antidistinguishability probability A_Q[n] by the formula:
+    
+    ω_Q[n] = n(1 - A_Q[n])
+    
+    
+    For two pure states with inner product |⟨ψ|φ⟩| = p, the common quantum overlap is:
+    ω_Q = (1 - sqrt(1-|p|²))
+    
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+    
+    Parameters
+    ----------
+    states : list[np.ndarray]
+        A list of quantum states represented as numpy arrays. States can be pure states
+        (represented as state vectors) or mixed states (represented as density matrices).
+        
+    Returns
+    -------
+    float
+        The common quantum overlap value.
+        
+    Examples
+    --------
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0
+    
+    >>> # For maximally mixed states in any dimension
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    >>> # For two pure states with known inner product
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+    
+    See Also
+    --------
+    antidistinguishability_probability, is_antidistinguishable
+    
+    References
+    ----------
+        
+    .. [1] A. G. Campos, D. Schmid, L. Mamani, R. W. Spekkens, I. Sainz.
+        "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
+        arXiv:2401.17980v2 (2024)
+        
+    Note
+    -----
+    This function uses the antidistinguishability probability(A_q) as an intermediate step
+    in the calculation. The common quantum overlap is a key concept in the paper
+    "No epistemic model can explain anti-distinguishability of quantum mixed preparations"
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: sorry ,I earlier created antidistinguishability_probability function hence I felt to include this but as this no more the case I will remove it
created_at: 2025-03-17T18:14:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1452,3 +1452,13 @@ @article{Zhang_2008_Beyond_realignment
   doi = {10.1103/PhysRevA.77.060301},
   url = {https://link.aps.org/doi/10.1103/PhysRevA.77.060301}
 }
+
+
+@article{campos2024,
path: docs/refs.bib
user: login: purva-thakre
body: these are arranged alphabetically 
created_at: 2025-03-17T18:42:36Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,63 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+        The common quantum overlap ω_Q[n] quantifies the "overlap" between n quantum states
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: use inline math mode too
created_at: 2025-03-17T18:42:52Z
author_association: COLLABORATOR
diff_hunk: @@ -271,6 +271,16 @@ @misc{Cariello_2013_Weak_irreducible
   primaryClass={quant-ph}
 }
 
+
+@article{campos2024,
path: docs/refs.bib
user: login: purva-thakre
body: Could you move this to L134 after `Cabello_2002_NParticle`? And keep the naming style the same as the other references?
created_at: 2025-03-17T19:06:06Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,65 @@
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap \(\omega_Q[n]\) quantifies the "overlap" between \(n\) quantum states
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: ```suggestion
    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
```
created_at: 2025-03-17T19:14:46Z
author_association: COLLABORATOR
diff_hunk: @@ -133,6 +133,15 @@ @article{Cabello_2002_NParticle
   url={https://arxiv.org/abs/quant-ph/0203119}
 }
 
+
+@article{campos2024,
path: docs/refs.bib
user: login: purva-thakre
body: Change the `campos2024` to be consistent with the other references.
created_at: 2025-03-17T19:41:47Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: add inline mathmode here
created_at: 2025-03-17T19:42:07Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+    For two pure states with inner product \(|\langle\psi|\phi\rangle| = p\), the common quantum overlap is:
+    .. math::
+        \omega_Q = (1 - \sqrt{1-|p|^2})
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: you might need to insert a blankline for the equations to render correctly
created_at: 2025-03-17T19:42:33Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+    For two pure states with inner product \(|\langle\psi|\phi\rangle| = p\), the common quantum overlap is:
+    .. math::
+        \omega_Q = (1 - \sqrt{1-|p|^2})
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0    
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    For two pure states with known inner product:
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: what is the known inner product?
created_at: 2025-03-17T19:42:58Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,76 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations.
+
+    References:
+
+        - Bell states case: arXiv:2401.17980v2.
+        - Maximally mixed states: Corollary 1 in arXiv:2401.17980v2.
+    """
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value), (
+        f"Expected overlap {expected_value} for two states with inner product {inner_product}, but got {overlap}"
+    )
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: purva-thakre
body: only keep the np.isclose stuff. 

If you expect the test fail for some reason, add a separate test where you know it will fail
created_at: 2025-03-17T19:44:09Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,76 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations.
+
+    References:
+
+        - Bell states case: arXiv:2401.17980v2.
+        - Maximally mixed states: Corollary 1 in arXiv:2401.17980v2.
+    """
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value), (
+        f"Expected overlap {expected_value} for two states with inner product {inner_product}, but got {overlap}"
+    )
+
+
+def test_three_states_on_great_circle():
+    """Test for three pure states lying on a great circle of the Bloch sphere.
+
+    Equally spaced states on a great circle are perfectly antidistinguishable.
+    """
+    theta = 2 * np.pi / 3  # Equal angular separation on the great circle
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+    psi_2 = np.array([np.cos(2 * theta), np.sin(2 * theta)])
+
+    states = [psi_0, psi_1, psi_2]
+    overlap = common_quantum_overlap(states)
+
+    assert np.isclose(overlap, 0), (
+        f"Expected overlap 0 for three equally spaced states on a great circle, but got {overlap}"
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: purva-thakre
body: same as my other comment
created_at: 2025-03-17T19:44:23Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+    For two pure states with inner product \(|\langle\psi|\phi\rangle| = p\), the common quantum overlap is:
+    .. math::
+        \omega_Q = (1 - \sqrt{1-|p|^2})
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0    
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    For two pure states with known inner product:
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: yes, I am aware of that. But since you are showing this in an example. perhaps provide an equation for the states...?
created_at: 2025-03-17T19:45:28Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+    For two pure states with inner product \(|\langle\psi|\phi\rangle| = p\), the common quantum overlap is:
+    .. math::
+        \omega_Q = (1 - \sqrt{1-|p|^2})
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0    
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    For two pure states with known inner product:
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: I will add it
created_at: 2025-03-17T20:07:42Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,61 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    The common quantum overlap :math:`\(\omega_Q[n]\)` quantifies the "overlap" between :math:`\(n\)` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability \(A_Q[n]\) by the formula:
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+    For two pure states with inner product \(|\langle\psi|\phi\rangle| = p\), the common quantum overlap is:
+    .. math::
+        \omega_Q = (1 - \sqrt{1-|p|^2})
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    0.0    
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states)
+    1.0
+    
+    For two pure states with known inner product:
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: > yes, I am aware of that. But since you are showing this in an example. perhaps provide an equation for the states...?

hi should I add some thing like |0> and   cos (theta) |0> + sin(theta)|1> and show inner product?
created_at: 2025-03-17T20:35:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -134,12 +134,14 @@ @article{Cabello_2002_NParticle
 }
 
 
-@article{campos2024,
-    author = {A. G. Campos and D. Schmid and L. Mamani and R. W. Spekkens and I. Sainz},
-    title = {No epistemic model can explain anti-distinguishability of quantum mixed preparations},
-    journal = {arXiv},
-    year = {2024},
-    volume = {2401.17980v2}
+@misc{campos2024,
path: docs/refs.bib
user: login: purva-thakre
body: @jajapuramshivasai I was referring to the bib key when I said try to be consistent with the other references. 

Change `campos2024` to be similar to `Cavalcanti_2015_Detection`. Apologies for the confusion!
created_at: 2025-03-17T20:53:46Z
author_association: COLLABORATOR
diff_hunk: @@ -134,12 +134,14 @@ @article{Cabello_2002_NParticle
 }
 
 
-@article{campos2024,
-    author = {A. G. Campos and D. Schmid and L. Mamani and R. W. Spekkens and I. Sainz},
-    title = {No epistemic model can explain anti-distinguishability of quantum mixed preparations},
-    journal = {arXiv},
-    year = {2024},
-    volume = {2401.17980v2}
+@misc{campos2024,
path: docs/refs.bib
user: login: jajapuramshivasai
body: so some thing like this
@misc{Campos_2024_AntiDistinguishability,
  author       = {A. G. Campos and D. Schmid and L. Mamani and R. W. Spekkens and I. Sainz},
  title        = {No epistemic model can explain anti-distinguishability of quantum mixed preparations},
  journal      = {arXiv},
  year         = {2024},
  volume       = {2401.17980v2},
  url          = {https://arxiv.org/abs/2401.17980},
  note         = {Preprint},
  archivePrefix= {arXiv},
  primaryClass = {quant-ph}
}

created_at: 2025-03-17T20:57:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -134,12 +134,14 @@ @article{Cabello_2002_NParticle
 }
 
 
-@article{campos2024,
-    author = {A. G. Campos and D. Schmid and L. Mamani and R. W. Spekkens and I. Sainz},
-    title = {No epistemic model can explain anti-distinguishability of quantum mixed preparations},
-    journal = {arXiv},
-    year = {2024},
-    volume = {2401.17980v2}
+@misc{campos2024,
path: docs/refs.bib
user: login: purva-thakre
body: All I wanted changed was `campos2024` to `Campos_2024_AntiDistinguishability`. Sorry, I should have been more clear. 
created_at: 2025-03-17T20:59:02Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,72 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_AntiDistinguishability`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
+    0.9999999999999998
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos\theta` is given by:
+
+    .. math::
+    \omega_Q = 1 - \sqrt{1 - \cos^2\theta}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: docstring examples are formatted weirdly. https://toqito--1033.org.readthedocs.build/en/1033/autoapi/state_props/common_quantum_overlap/index.html

![image](https://github.com/user-attachments/assets/0ac99fc4-99b9-4831-b1fb-84455254dcdb)

See https://github.com/vprusso/toqito/pull/1026#issuecomment-2730950076 where I describe how you can check the build locally. 
created_at: 2025-03-17T22:55:50Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,72 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_AntiDistinguishability`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    For maximally mixed states in any dimension:
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
+    0.9999999999999998
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos\theta` is given by:
+
+    .. math::
+    \omega_Q = 1 - \sqrt{1 - \cos^2\theta}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: I have updated the doc string now it is properly formatted, please review it
created_at: 2025-03-18T04:12:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -133,6 +133,19 @@ @article{Cabello_2002_NParticle
   url={https://arxiv.org/abs/quant-ph/0203119}
 }
 
+
+@misc{Campos_2024_AntiDistinguishability,
path: docs/refs.bib
user: login: vprusso
body: The first word of the title key is the first noun in the title. In this case it would be "epistemic" so

```suggestion
@misc{Campos_2024_Epistemic,
```
created_at: 2025-03-18T11:33:40Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_AntiDistinguishability`.
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Make sure to also update this reference if you update the bibtext key above. 
created_at: 2025-03-18T11:34:14Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,66 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: Again, I would remove the description field here and just use the comment to describe the test.
created_at: 2025-03-18T11:35:37Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,66 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations."""
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value)
+
+
+def test_three_states_on_great_circle():
+    """Test for three pure states lying on a great circle of the Bloch sphere.
+
+    Equally spaced states on a great circle are perfectly antidistinguishable.
+    """
+    theta = 2 * np.pi / 3  # Equal angular separation on the great circle
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: I think these are just the trine states. You can define them like you do here, which is completely fine, or use them from `toqito.states.trine`. Either way. 
created_at: 2025-03-18T11:36:52Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,66 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations."""
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value)
+
+
+def test_three_states_on_great_circle():
+    """Test for three pure states lying on a great circle of the Bloch sphere.
+
+    Equally spaced states on a great circle are perfectly antidistinguishable.
+    """
+    theta = 2 * np.pi / 3  # Equal angular separation on the great circle
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: I don't see why these tests couldn't also be put into the parameterized test in this file? It seems like they could be included there as well. 
created_at: 2025-03-18T11:38:29Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    
+    For maximally mixed states in any dimension:
+    
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Instead of having a comment indicating the `d` is the dimension, just make it clear from the variable name. We also don't need the "#expected 1.0" comment. We know what the expected value should be based on the output. 
```suggestion
    >>> dim = 2
    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
    >>> common_quantum_overlap(states)
```
created_at: 2025-03-18T14:08:07Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: ```suggestion
    >>> common_quantum_overlap(bell_states)
    3.3910869667863608e-09
```
created_at: 2025-03-18T14:08:17Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    
+    For maximally mixed states in any dimension:
+    
+    >>> import numpy as np
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Doesn't this example also require the import of `common_quantum_overlap`?
created_at: 2025-03-18T14:08:43Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    
+    For maximally mixed states in any dimension:
+    
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
+    0.9999999999999998
+    
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos\theta` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos^2 \theta}
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Since "cos" is a function, we should denote it as such. This applies elsewhere to other comments that use `cos`.

```suggestion
    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:

    .. math::
        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
```
created_at: 2025-03-18T14:09:47Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    
+    For maximally mixed states in any dimension:
+    
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
+    0.9999999999999998
+    
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos\theta` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos^2 \theta}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: The "in Hilbert space" part of this doesn't make much sense without specifying more about the space itself. Perhaps you can just remove that:
```suggestion
    where :math:`\theta` represents the angle between the two states.
```
created_at: 2025-03-18T14:11:04Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,46 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap",
+    [
+        (
+            # Bell states: They are perfectly antidistinguishable (ω_Q = 0)
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+        ),
+        (
+            # Maximally mixed states: For n = 3, the overlap is maximum (ω_Q = 1)
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+        ),
+        (
+            # Two pure states with inner product cos(theta) (theta = π/4)
+            # Expected overlap: ω_Q = 1 - √(1 - cos(π/4)²)
+            [np.array([1, 0]), np.array([np.cos(np.pi/4), np.sin(np.pi/4)])],
+            1 - np.sqrt(1 - np.cos(np.pi/4)**2),
+        ),
+        (
+            # Three pure states on a great circle of the Bloch sphere
+            # Equally spaced states (angles: 0, 2π/3, 4π/3) are perfectly antidistinguishable (ω_Q = 0)
+            [
+                np.array([1, 0]),
+                np.array([np.cos(2 * np.pi / 3), np.sin(2 * np.pi / 3)]),
+                np.array([np.cos(4 * np.pi / 3), np.sin(4 * np.pi / 3)])
+            ],
+            0,
+        ),
+    ]
+)
+
+def test_common_quantum_overlap_parametrized(states, expected_overlap):
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap)
+
+
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: [nit] : Extra space
```suggestion
```
created_at: 2025-03-18T14:12:03Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,76 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states) #expected 0.0
+    3.3910869667863608e-09
+    
+    For maximally mixed states in any dimension:
+    
+    >>> import numpy as np
+    >>> d = 2  # dimension
+    >>> states = [np.eye(d)/d, np.eye(d)/d, np.eye(d)/d]
+    >>> common_quantum_overlap(states) #expected 1.0
+    0.9999999999999998
+    
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos\theta` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos^2 \theta}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+    
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.2928932188134524
+
+    References
+    ==========
+    .. bibliography::
+        :filter: docname in docnames
+
+
+    :param states: A list of quantum states represented as numpy arrays. States can be
+                  pure states (represented as state vectors) or mixed states
+                  (represented as density matrices).
+    :return: The common quantum overlap value.
+
+    """
+    n = len(states)
+    opt_val, _ = state_exclusion(vectors=states, probs=[1] * n, primal_dual="dual")
+    return n * (1 - (1 - opt_val / n))
+
+
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: [nit] Extra space
```suggestion
```
created_at: 2025-03-18T14:12:18Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: @vprusso Is there a reason why this value is not approximated to `0.0` by the function?
created_at: 2025-03-18T15:06:36Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: Likely the value from the SDP solver which doesn't give (nor should we expect it to give) exactly zero. This value as it is in the output is expected and just fine I think. 
created_at: 2025-03-18T15:13:19Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: should I add any approximation if so upto what precision
created_at: 2025-03-18T15:21:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: @jajapuramshivasai as you have it here is completely fine. 
created_at: 2025-03-18T15:23:24Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
path: toqito/state_props/common_quantum_overlap.py
user: login: vprusso
body: For this thread, yes, I'll mark as resolved. 
created_at: 2025-03-18T15:53:33Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,66 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations."""
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value)
+
+
+def test_three_states_on_great_circle():
+    """Test for three pure states lying on a great circle of the Bloch sphere.
+
+    Equally spaced states on a great circle are perfectly antidistinguishable.
+    """
+    theta = 2 * np.pi / 3  # Equal angular separation on the great circle
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: jajapuramshivasai
body: should I update the code to use trine states or is it fine as it is ? 
created_at: 2025-03-18T17:30:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+"""Unit tests for the common_quantum_overlap function."""
+
+import numpy as np
+import pytest
+
+from toqito.state_props import common_quantum_overlap
+from toqito.states import bell
+
+
+@pytest.mark.parametrize(
+    "states, expected_overlap, description",
+    [
+        (
+            # Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.
+            [bell(0), bell(1), bell(2), bell(3)],
+            0,
+            "Bell states are perfectly antidistinguishable (ω_Q = 0) as per arXiv:2401.17980v2.",
+        ),
+        (
+            # For n maximally mixed preparations (here n=3) the overlap is maximum (ω_Q = 1).
+            [np.eye(2) / 2, np.eye(2) / 2, np.eye(2) / 2],
+            1,
+            "Maximally mixed states have maximum overlap (ω_Q = 1) as per Corollary 1 in arXiv:2401.17980v2.",
+        ),
+    ],
+)
+def test_common_quantum_overlap_parametrized(states, expected_overlap, description):
+    """Test common quantum overlap for various sets of state preparations."""
+    overlap = common_quantum_overlap(states)
+    assert np.isclose(overlap, expected_overlap), description
+
+
+def test_two_states_known_overlap():
+    """Test with two pure states having a known inner product.
+
+    For two pure states with inner product p, the quantum overlap is given by:
+        ω_Q = 1 - √(1 - |p|²)
+    """
+    theta = np.pi / 4  # Define an angle so that inner_product = cos(theta)
+    inner_product = np.cos(theta)
+
+    psi_0 = np.array([1, 0])
+    psi_1 = np.array([np.cos(theta), np.sin(theta)])
+
+    states = [psi_0, psi_1]
+    overlap = common_quantum_overlap(states)
+
+    expected_value = 1 - np.sqrt(1 - inner_product**2)
+    assert np.isclose(overlap, expected_value)
+
+
+def test_three_states_on_great_circle():
+    """Test for three pure states lying on a great circle of the Bloch sphere.
+
+    Equally spaced states on a great circle are perfectly antidistinguishable.
+    """
+    theta = 2 * np.pi / 3  # Equal angular separation on the great circle
path: toqito/state_props/tests/test_common_quantum_overlap.py
user: login: vprusso
body: It's fine as is.
created_at: 2025-03-18T17:31:44Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> common_quantum_overlap(states)
+    0.9999999999999998
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.29289321883356534
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: @jajapuramshivasai Looks like there are 2 doctest failures. You might want to round the expected value up through `np.around` so that doctest checks the rounded up value. 

![image](https://github.com/user-attachments/assets/249dd976-2594-4da9-ac30-c4f36c83baf3)

https://github.com/vprusso/toqito/actions/runs/13926936639/job/39052644600?pr=1033#step:5:3208
created_at: 2025-03-19T16:33:35Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> common_quantum_overlap(states)
+    0.9999999999999998
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.29289321883356534
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: An example

https://github.com/vprusso/toqito/blob/0b5c4e3cd9cbd4aa725aa6c58a77aff3c85d0045/toqito/state_props/purity.py#L44
created_at: 2025-03-19T16:36:37Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> common_quantum_overlap(states)
+    0.9999999999999998
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.29289321883356534
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: > An example
> 
> https://github.com/vprusso/toqito/blob/0b5c4e3cd9cbd4aa725aa6c58a77aff3c85d0045/toqito/state_props/purity.py#L44

is it okay to use round instead of np.around because the output would be much cleaner that way 
created_at: 2025-03-19T17:07:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> common_quantum_overlap(states)
+    0.9999999999999998
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.29289321883356534
path: toqito/state_props/common_quantum_overlap.py
user: login: purva-thakre
body: Hi @jajapuramshivasai, I meant for you to round up the value in the example. Not the function output. Which is why I provided the example to you. 
created_at: 2025-03-19T18:26:52Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,78 @@
+"""Computes the common quantum overlap quantum states."""
+
+import numpy as np
+
+from toqito.state_opt.state_exclusion import state_exclusion
+
+
+def common_quantum_overlap(states: list[np.ndarray]) -> float:
+    r"""Calculate the common quantum overlap of a collection of quantum states.
+
+    For more information, see :cite:`Campos_2024_Epistemic`.
+
+    The common quantum overlap :math:`\omega_Q[n]` quantifies the "overlap" between :math:`n` quantum states
+    based on their antidistinguishability properties. It is related to the
+    antidistinguishability probability :math:`A_Q[n]` by the formula:
+
+    .. math::
+        \omega_Q[n] = n(1 - A_Q[n])
+
+    For two pure states with inner product :math:`|\langle\psi|\phi\rangle| = p`, the common quantum overlap is:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - p^2}
+
+    The common quantum overlap is a key concept in analyzing epistemic models of quantum
+    mechanics and understanding quantum state preparation contextuality.
+
+    Examples
+    ==========
+    Consider the Bell states:
+
+    >>> from toqito.states import bell
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> bell_states = [bell(0), bell(1), bell(2), bell(3)]
+    >>> common_quantum_overlap(bell_states)
+    3.3910869667863608e-09
+
+    For maximally mixed states in any dimension:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> dim = 2
+    >>> states = [np.eye(dim) / dim, np.eye(dim) / dim, np.eye(dim) / dim]
+    >>> common_quantum_overlap(states)
+    0.9999999999999998
+
+    The common quantum overlap :math:`\omega_Q` for two pure states
+    with inner product :math:`|\langle \psi | \phi \rangle| = \cos(\theta)` is given by:
+
+    .. math::
+        \omega_Q = 1 - \sqrt{1 - \cos(\theta)^2}
+
+    where :math:`\theta` represents the angle between the two states in Hilbert space.
+    For two pure states with a known inner product:
+
+    >>> import numpy as np
+    >>> from toqito.state_props import common_quantum_overlap
+    >>> theta = np.pi/4
+    >>> states = [np.array([1, 0]), np.array([np.cos(theta), np.sin(theta)])]
+    >>> common_quantum_overlap(states)  # Should approximate (1-sqrt(1-cos²(π/4)))
+    0.29289321883356534
path: toqito/state_props/common_quantum_overlap.py
user: login: jajapuramshivasai
body: > Hi @jajapuramshivasai, I meant for you to round up the value in the example. Not the function output. Which is why I provided the example to you.

please check the updated version where I have rounded off the output in example and sorry for the confusion ,thank you
created_at: 2025-03-19T18:28:15Z
author_association: CONTRIBUTOR

PR comments:
user: login: codecov[bot]
created_at: 2025-03-17T17:44:17Z
body: ## [Codecov](https://app.codecov.io/gh/vprusso/toqito/pull/1033?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vincent+Russo) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 97.9%. Comparing base [(`3cde097`)](https://app.codecov.io/gh/vprusso/toqito/commit/3cde09783369fabd0bac6af24a48428d1378833d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vincent+Russo) to head [(`3c1e45a`)](https://app.codecov.io/gh/vprusso/toqito/commit/3c1e45a4d457c34616e3872e997127f28021b1a3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vincent+Russo).
> Report is 352 commits behind head on master.

<details><summary>Additional details and impacted files</summary>


```diff
@@          Coverage Diff           @@
##           master   #1033   +/-   ##
======================================
  Coverage    97.9%   97.9%           
======================================
  Files         169     173    +4     
  Lines        3321    3357   +36     
  Branches      727     734    +7     
======================================
+ Hits         3253    3289   +36     
  Misses         44      44           
  Partials       24      24           
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/vprusso/toqito/pull/1033?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vincent+Russo).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vincent+Russo).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE
user: login: jajapuramshivasai
created_at: 2025-03-17T18:39:48Z
body: I have done required modification according to contributing guidelines please review it
author_association: CONTRIBUTOR
user: login: purva-thakre
created_at: 2025-03-17T18:46:30Z
body: There are build failures too https://github.com/vprusso/toqito/actions/runs/13907132760/job/38913465304?pr=1033#step:3:654
author_association: COLLABORATOR
user: login: jajapuramshivasai
created_at: 2025-03-17T19:39:04Z
body: hi I have moved ref to l134 and removed over indentations please review it
author_association: CONTRIBUTOR
user: login: jajapuramshivasai
created_at: 2025-03-17T20:53:32Z
body: everything should be fixed by now please review it
author_association: CONTRIBUTOR
user: login: jajapuramshivasai
created_at: 2025-03-17T21:38:32Z
body: hopefully it should be resolved by now .please review it , thanks for your patience

author_association: CONTRIBUTOR
user: login: vprusso
created_at: 2025-03-17T22:05:04Z
body: @Shivansh20128 

seems like there is still a docs failure
https://github.com/vprusso/toqito/actions/runs/13910385352/job/38923406911?pr=1033#step:5:3208

You likely need to check equality not with `==` but with `np.isclose`. Does that make sense?
author_association: OWNER
user: login: jajapuramshivasai
created_at: 2025-03-17T22:29:33Z
body: It appears that doctests require an exact string match by default. Therefore, I have updated the docstring to include the exact expected value as a comment and actual value as output. Everything should work perfectly now.thank you
author_association: CONTRIBUTOR
user: login: jajapuramshivasai
created_at: 2025-03-18T04:38:42Z
body: now docs are properly formatted , please review it
author_association: CONTRIBUTOR
user: login: vprusso
created_at: 2025-03-18T11:32:18Z
body: > now docs are properly formatted , please review it

 Hi @jajapuramshivasai please use the "re-request" review mechanism on this page when requesting a review (otherwise we might not see it)
<img width="345" alt="Screenshot 2025-03-18 at 7 31 34 AM" src="https://github.com/user-attachments/assets/329dab04-d3e6-49e2-9eff-b2c6f8a02084" />

author_association: OWNER
user: login: jajapuramshivasai
created_at: 2025-03-18T17:23:11Z
body: it seems everything is done let me know if there are any additional requirements or updates needed. If everything looks good, kindly proceed with closing the issue. thank you
author_association: CONTRIBUTOR
user: login: vprusso
created_at: 2025-03-18T17:24:33Z
body: @jajapuramshivasai seems like there are still outstanding comments/suggestions to be addressed. 
author_association: OWNER
user: login: jajapuramshivasai
created_at: 2025-03-18T17:33:38Z
body: > @jajapuramshivasai seems like there are still outstanding comments/suggestions to be addressed.

Could you clarify which comments are still outstanding? I want to make sure I address everything properly.

author_association: CONTRIBUTOR