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

Get quantum strategy / behavior from nonlocal upper / lower bound. #931

Open
dding7293 opened this issue Dec 26, 2024 · 1 comment
Open

Comments

@dding7293
Copy link

dding7293 commented Dec 26, 2024

Hi,

I was wondering how to obtain the actual quantum strategy (state plus measurements) computed by nonlocal_game.quantum_lower_bound and the correlation (probability distribution) computed by nonlocal_game.commuting_operator_upper_bound? I might have missed this in the documentation.

Thanks.

@vprusso
Copy link
Owner

vprusso commented Dec 26, 2024

Hi @dding7293 ,

Thank you for the question. Indeed, as it currently stands, there isn't a direct way to extract t he strategy (state plus measurements) for a nonlocal game. However, this information is accessible within the internals of the functions (but would just need to be explicitly returned).

For instance, in the case of the nonlocal_game.quantum_value_lower_bound, the measurements can be extracted by explicitly returning the alice_povms and bob_povms variables in the function. For instance, a similar approach to extract the strategy for the lower bound approach could be mimicked from the approach here. (although this is in MATLAB).

As for the commuting measurement approach, the strategy could be directly extracted from the npa variable.

Again, neither of these are returned explicitly to the user, and perhaps a sensible thing to do would be to allow the ability to obtain not just the value, but also give the user the ability to obtain the strategy as well. If you manage to tweak the code to extract, I would certainly welcome any PR that accomplishes this!

Let me know if you have any additional questions and thank you again for your question and interest in toqito!

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

No branches or pull requests

2 participants