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

Feature: Fidelity of separability #141

Closed
vprusso opened this issue Mar 22, 2023 · 12 comments · Fixed by #165
Closed

Feature: Fidelity of separability #141

vprusso opened this issue Mar 22, 2023 · 12 comments · Fixed by #165
Assignees
Labels
feature request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vprusso
Copy link
Owner

vprusso commented Mar 22, 2023

The fidelity of separability (also known as the maximum separable fidelity [1, 2]) is an entanglement measure that can be approximated via semidefinite programs outlined in [3]. Ancillary files provided with [3] (here) implement SDPs that approximate the fidelity of separability.

This task would entail:

  1. Adding and generalizing the channel and density matrix SDPs from here and placing them into state_metrics/fidelity_of_separability.py.
  2. Adding corresponding unit tests in tests/test_state_metrics/test_fidelity_of_separability.py
  3. Updating docs in docs/states.rst under "Distance Metrics for Quantum States"

[1] Two-message quantum interactive proofs and the quantum separability problem
[2] Quantum interactive proofs and the complexity of separability testing
[3] Quantum Steering Algorithm for Estimating Fidelity of Separability

@purva-thakre
Copy link
Collaborator

As mentioned in a previous issue, I would like to work on this for the 2023 Unitary Hackathon.

@vprusso
Copy link
Owner Author

vprusso commented May 27, 2023

That's great, @purva-thakre ! I have assigned you the task. Looking forward to seeing what you put together here!

@purva-thakre
Copy link
Collaborator

@vprusso Are pure states supposed to be the only option for the input state to the SDP functions? Or should I also account for the possibility of mixed states as another option?

@vprusso
Copy link
Owner Author

vprusso commented May 29, 2023

Hi @purva-thakre.

Great question! Yes, the input to the SDP could either be a pure or mixed state. I think that should be a relatively straightforward feature to support, but of course, if I have a blindspot on that, do let me know if you see some pitfalls that perhaps I do not! And do not hesitate if any more questions pop up!

@purva-thakre
Copy link
Collaborator

@vprusso Thanks!

image

This might be a very minor question but what is the advantage of using request.getfixturevalue here instead of say manually defining the product state arrays directly for mark.parametrize? Saves the trouble of creating conftest.py.

@vprusso
Copy link
Owner Author

vprusso commented May 30, 2023

Hi @purva-thakre ,

Good question. I would say that the benefit of using conftest.py really comes into play if we had many test files where some subset of those test files required the definition of a product state to test against. Using conftest.py, we can consolidate the definition of "product state" to one central location instead of redefining it across all of the different test instances.

Granted, the location in which you are taking the screenshot is from a smaller set of code associated with a paper, so this benefit is not really present there and defining the product state inline would indeed save you from having to create a conftest.py.

Does that make sense?

@purva-thakre
Copy link
Collaborator

@vprusso What does verbosity=2 mean in picos.Problem(verbosity=2) ?

I tried to look at the documentation here but it wasn't that helpful in helping me understand =2.

There are a lot of options after verbose = options.verbosity > 0.

@vprusso
Copy link
Owner Author

vprusso commented May 31, 2023

Here is the page on the docs pertaining to the various verbosity levels:
https://picos-api.gitlab.io/picos/api/picos.modeling.options.html#option-verbosity

The PICOS docs can be a bit frustrating to parse through. Indeed, I've always had an issue with their integrated search (which seems pretty broken to me). I feel your pain :)

Hopefully, that's useful for you.

@purva-thakre
Copy link
Collaborator

purva-thakre commented Jun 1, 2023

@vprusso Thank you for being patient with all of my questions! Yes, search for PICOS docs was forever stuck in searching.

I have a very rudimentary understanding of the SDPs. I understand the benchmarks are for the prover to attempt to maximize their acceptance probability.

Is there any possibility for either of the functions to work for entangled states? I assume there might be some issues with K-extendibility. I think Ref 1 says something about this that entangled states are not k-extendible up to some k.

Edit: I think I might have misunderstood the result & tried to make things more complicated for myself. I found another paper that basically says entangled states are not k-extendible for k or k'.

image

@vprusso
Copy link
Owner Author

vprusso commented Jun 1, 2023

Hi @purva-thakre ,

Right, the idea is that the PPT-extendible hierarchy is guaranteed to eventually converge at some level k of the hierarchy if the state is separable. It's possible that you may need to compute arbitrarily high levels of the hierarchy in order to determine this, but in practice, the hierarchy is a fairly robust heuristic in quickly converging at relatively low levels of the hierarchy (in many cases in practice).

Of course, the downside is that the higher up you go in the hierarchy, the more difficult it is to compute. It might be helpful to take a look at the symmetric_extension_hierarch.y file in toqito:
https://github.com/vprusso/toqito/blob/master/toqito/state_opt/symmetric_extension_hierarchy.py

Does that help at all?

@purva-thakre
Copy link
Collaborator

@vprusso Hopefully, this is the last question for this issue.

Is there a template for sphinx-autodoc or a particular workflow I am supposed to follow to build the documentation locally? I can't find the template in the docs directory but it is referenced here.

I tried to build the documentation by using make html or make clean html & the autodocsummary for what I introduced is a lot different compared to the already existing functions.

what is expected
image

what I got
image

autodocsummary is also adding some files that I did not change.

image

@vprusso
Copy link
Owner Author

vprusso commented Jun 3, 2023

Hi @purva-thakre,

The typical workflow for building the docs of make clean -> make html in the docs/ folder should be all you need. The issue you are facing:

WARNING: [autosummary] failed to import toqito.state_metrics.fidelity_of_separability.
Possible hints:
* ImportError: 
* ModuleNotFoundError: No module named 'toqito.state_metrics.fidelity_of_separability'
* AttributeError: module 'toqito.state_metrics' has no attribute 'fidelity_of_separability'

Arises from the fact that the docs are looking for a function name fidelity_of_separability, but the file contains two functions with other names (specifically, state_ppt_extendible_fidelity and channel_ppt_extendible_fidelity).

My suggestion would be to create two files; one as state_metrics/fidelity_of_separability.py and channel_metrics/fidelity_of_separability.py. Then, inside these files, make sure that the names of the functions you are referring to have the name def fidelity_of_separability. This should solve the doc-building error that you are encountering now.

Logically, this seems to make sense to me, as these two functions are a bit different; one is concerned with the fidelity of states while the other is concerned with the fidelity of channels.

Does that make sense? Let me know if perhaps you're seeing something here that I might be missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants