state_opt.bell_inequality_max

Computes the upper bound for a given bipartite Bell inequality.

Functions

bell_inequality_max(joint_coe, a_coe, b_coe, a_val, b_val)

Return the upper bound for the maximum violation(Tsirelson Bound) for a given bipartite Bell inequality.

Module Contents

state_opt.bell_inequality_max.bell_inequality_max(joint_coe, a_coe, b_coe, a_val, b_val, solver_name='SCS')

Return the upper bound for the maximum violation(Tsirelson Bound) for a given bipartite Bell inequality.

This computes the upper bound for the maximum value of a given bipartite Bell inequality using an SDP. The method is from [2] and the implementation is based on [1]. This is useful for various tasks in device independent quantum information processing.

The function formulates the problem as a SDP problem in the following format for the \(W\)-state.

\[\begin{split}\begin{multline} \max \operatorname{tr}\!\Bigl( W \cdot \sum_{a,b,x,y} B^{xy}_{ab}\, M^x_a \otimes N^y_b \Bigr),\\[1ex] \text{s.t.} \quad \operatorname{tr}(W) = 1,\quad W \ge 0,\\[1ex] W^{T_P} \ge 0,\quad \text{for all bipartitions } P. \end{multline}\end{split}\]

Examples

Consider the I3322 Bell inequality from [3].

\[\begin{split}\begin{aligned} I_{3322} &= P(A_1 = B_1) + P(B_1 = A_2) + P(A_2 = B_2) + P(B_2 = A_3) \\ &\quad - P(A_1 = B_2) - P(A_2 = B_3) - P(A_3 = B_1) - P(A_3 = B_3) \\ &\le 2 \end{aligned}\end{split}\]

The individual and joint coefficents and measurement values are encoded as matrices. The upper bound can then be found in |toqito⟩ as follows.

import numpy as np
from toqito.state_opt import bell_inequality_max

joint_coe = np.array([
    [1, 1, -1],
    [1, 1, 1],
    [-1, 1, 0],
])
a_coe = np.array([0, -1, 0])
b_coe = np.array([-1, -2, 0])
a_val = np.array([0, 1])
b_val = np.array([0, 1])

result = bell_inequality_max(joint_coe, a_coe, b_coe, a_val, b_val)
print(f"Bell inequality maximum value: {result:.3f}")
Bell inequality maximum value: 0.250

References

[1]

Nathaniel Johnston. QETLAB: A MATLAB toolbox for quantum entanglement. URL: https://github.com/nathanieljohnston/QETLAB, doi:10.5281/zenodo.44637.

[2]

Miguel Navascues, Gonzalo de la Torre, and Tamas Vertesi. Characterization of quantum correlations with local dimension constraints and its device-independent applications. Physical Review X, Jan 2014. URL: http://dx.doi.org/10.1103/PhysRevX.4.011011, doi:10.1103/PhysRevX.4.011011.

[3]

Daniel Collins and Nicolas Gisin. A relevant two qubit bell inequality inequivalent to the chsh inequality. Journal of Physics A: Mathematical and General, 37(5):1775–1787, January 2004. URL: http://dx.doi.org/10.1088/0305-4470/37/5/021, doi:10.1088/0305-4470/37/5/021.

Raises:

ValueError – If a_val or b_val are not length 2.

Parameters:
  • joint_coe (numpy.ndarray) – The coefficents for terms containing both A and B.

  • a_coe (numpy.ndarray) – The coefficent for terms only containing A.

  • b_coe (numpy.ndarray) – The coefficent for terms only containing B.

  • a_val (numpy.ndarray) – The value of each measurement outcome for A.

  • b_val (numpy.ndarray) – The value of each measurement outcome for B.

  • solver_name (str) – The solver used.

Returns:

The upper bound for the maximum violation of the Bell inequality.

Return type:

float