Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect value for quantum value for BCS game #810

Closed
vprusso opened this issue Sep 30, 2024 · 0 comments · Fixed by #811
Closed

Incorrect value for quantum value for BCS game #810

vprusso opened this issue Sep 30, 2024 · 0 comments · Fixed by #811
Assignees
Milestone

Comments

@vprusso
Copy link
Owner

vprusso commented Sep 30, 2024

It appears as if both the upper and lower bounds on the quantum value of a BCS-converted nonlocal game are yielding incorrect values.

For instance, this is the BCS definition of the CHSH game:

c_1 = np.zeros((2, 2))
c_2 = np.zeros((2, 2))

for v_1 in range(2):
    for v_2 in range(2):
        if v_1 ^ v_2 == 0:
            c_1[v_1, v_2] = 1
        else:
            c_2[v_1, v_2] = 1

chsh_bcs_game = NonlocalGame.from_bcs_game([c_1, c_2])

Running the classical value yields the correct value. However, the quantum bounds are not correct:

print(chsh_bcs_game.classical_value())
0.75
print(chsh_bcs_game.commuting_measurement_value_upper_bound())
0.25
print(chsh_bcs_game.quantum_value_lower_bound())
0.25

There also appears to be a deep copy problem here as well. The classical_value function should be making a deep copy of the predicate matrix.

@vprusso vprusso self-assigned this Sep 30, 2024
@purva-thakre purva-thakre added this to the v1.1.0 milestone Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants