helper.npa_hierarchy¶
Generates the NPA constraints.
Attributes¶
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Generate the constraints specified by the NPA hierarchy up to a finite level [4]. |
Module Contents¶
- helper.npa_hierarchy.Symbol¶
- helper.npa_hierarchy._reduce(word)¶
- Parameters:
word (tuple[Symbol])
- Return type:
tuple[Symbol]
- helper.npa_hierarchy._parse(k)¶
- Parameters:
k (str)
- Return type:
tuple[int, set[tuple[int, int]]]
- helper.npa_hierarchy._gen_words(k, a_out, a_in, b_out, b_in)¶
- Parameters:
k (int | str)
a_out (int)
a_in (int)
b_out (int)
b_in (int)
- Return type:
list[tuple[Symbol]]
- helper.npa_hierarchy._is_zero(word)¶
- Parameters:
word (tuple[Symbol])
- Return type:
bool
- helper.npa_hierarchy._is_meas(word)¶
- Parameters:
word (tuple[Symbol])
- Return type:
bool
- helper.npa_hierarchy._is_meas_on_one_player(word)¶
- Parameters:
word (tuple[Symbol])
- Return type:
bool
- helper.npa_hierarchy._get_nonlocal_game_params(assemblage, referee_dim=1)¶
- Parameters:
assemblage (dict[tuple[int, int], cvxpy.Variable])
referee_dim (int)
- Return type:
tuple[int, int, int, int]
- helper.npa_hierarchy.npa_constraints(assemblage, k=1, referee_dim=1)¶
Generate the constraints specified by the NPA hierarchy up to a finite level [4].
You can determine the level of the hierarchy by a positive integer or a string of a form like “1+ab+aab”, which indicates that an intermediate level of the hierarchy should be used, where this example uses all products of 1 measurement, all products of one Alice and one Bob measurement, and all products of two Alice and one Bob measurement.
The commuting measurement assemblage operator must be given as a dictionary. The keys are tuples of Alice and Bob questions \(x, y\) and the values are cvxpy Variables which are matrices with entries:
\[K_{xy}\Big(i + a \cdot dim_R, j + b \cdot dim_R \Big) = \langle i| \text{Tr}_{\mathcal{H}} \Big( \big( I_R \otimes A_a^x B_b^y \big) \sigma \Big) |j \rangle\]References
[1] (1,2)Miguel Navascués, Stefano Pironio, and Antonio Acín. A convergent hierarchy of semidefinite programs characterizing the set of quantum correlations. New Journal of Physics, 10(7):073013, Jul 2008. URL: http://dx.doi.org/10.1088/1367-2630/10/7/073013, doi:10.1088/1367-2630/10/7/073013.
- Parameters:
assemblage (dict[tuple[int, int], cvxpy.Variable]) – The commuting measurement assemblage operator.
k (int | str) – The level of the NPA hierarchy to use (default=1).
referee_dim (int) – The dimension of the referee’s quantum system (default=1).
- Returns:
A list of cvxpy constraints.
- Return type:
list[cvxpy.constraints.constraint.Constraint]