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: Is UPB (unextendible product basis) #33

Closed
vprusso opened this issue Jan 28, 2021 · 15 comments
Closed

Feature: Is UPB (unextendible product basis) #33

vprusso opened this issue Jan 28, 2021 · 15 comments
Assignees
Labels
Projects

Comments

@vprusso
Copy link
Owner

vprusso commented Jan 28, 2021

Given a collection of vectors, determine if the set constitutes an unextendible product basis (UPB).

According to arXiv:quant-ph/9808030:

An unextendible product basis (UPB) for a multipartite quantum system is an incomplete orthogonal product basis whose complementary subspace contains no product state.

In spirit, the functionality of being able to determine whether a collection of vectors form a UPB can be derived from the QETLAB package, specifically the function "IsUPB".

The functionality for this should be created in state_props/is_unextendible_product_basis.py with corresponding unit tests found in tests/test_state_props/test_is_unextendible_product_basis.py. Be sure to also update the docs in /docs/states.rst under "Properties of Quantum States" with toqito.state_props.is_unextendible_product_basis.py.

Please ensure proper credit is provided to QETLAB as serving as the inspiration for including this function.

@vprusso vprusso added this to To do in toqito via automation Jan 28, 2021
@vprusso vprusso changed the title Feature: IS UPB (unextendible product basis) Feature: Is UPB (unextendible product basis) Jan 29, 2021
@smtsjhr
Copy link

smtsjhr commented May 26, 2023

Hi @vprusso !

Here from UnitaryHack! Just showing some interest to work on this for now, and am hoping to commit after reviewing the issue more thoroughly this weekend. I still need to get installed and check out the QETLAB reference.

I am happy to collaborate with any others, and of course also totally cool if someone else wants to give this a go independently.

Regarding any potential discussions: is this thread here on GitHub okay, or is some other place preferred like Discord?

Cheers,

  • Sumit

@vprusso
Copy link
Owner Author

vprusso commented May 27, 2023

Hi Sumit,

That is awesome! Thank you for taking an interest in this issue and I'm sincerely looking forward to what you put together for this issue. Of course, do take advantage of the GitHub thread here for any questions, discussions, etc. I'm here to help and am very much looking forward to seeing this in toqito!

@smtsjhr
Copy link

smtsjhr commented May 30, 2023

Hey Vincent,

🚀
Just following up to say I think i have a working implementation of the main functionality! Consider me committed to making a PR for this issue eventually.. I still need to polish things up, write tests, and do the docs.


I will likely ask for some more clarification and guidance soon, including a potential suggestion to move a helper function I defined into an appropriate place like toqito/helpers or perhaps toqito/perms. And also if I should write separate unit tests for the helper function in addition to testing the main functionality.

👪
To any one else interested from UnitaryHack or not, I am still open to collaborate in whatever capacity. Bounty is all yours if we get it, I am just happy to contribute!

@vprusso
Copy link
Owner Author

vprusso commented May 30, 2023

Just following up to say I think i have a working implementation of the main functionality! Consider me committed to making a PR for this issue eventually.. I still need to polish things up, write tests, and do the docs.

Woo-hoo, that is fantastic--great job! Looking forward to seeing what you've put together!

I will likely ask for some more clarification and guidance soon, including a potential suggestion to move a helper function I defined into an appropriate place like toqito/helpers or perhaps toqito/perms. And also if I should write separate unit tests for the helper function in addition to testing the main functionality.

Please do not hesitate to send any/all questions my way--happy to help address them and give my two cents!

To any one else interested from UnitaryHack or not, I am still open to collaborate in whatever capacity. Bounty is all yours if we get it, I am just happy to contribute!

You're a real one, @smtsjhr. The feeling is mutual on my end that having your contribution here is a great privilege and pleasure!

Thanks again for the update. I've assigned you to the task of tracking so you can claim the bounty once it goes in if you wish. Also, please do reach out if I can provide any further input that you would find useful! Cheers!

@Newtech66
Copy link

@vprusso Just letting you know that I'm trying this issue independently as well.

@vprusso
Copy link
Owner Author

vprusso commented Jun 10, 2023

@vprusso Just letting you know that I'm trying this issue independently as well.

Sounds good! Thanks for the heads up, @Newtech66 !

You may want to coordinate with @smtsjhr as well if you both would be interested in collaborating on this, as I believe @smtsjhr mentioned that they had done some work already on this.

Cheers!

@smtsjhr
Copy link

smtsjhr commented Jun 10, 2023

Hi @vprusso and @Newtech66 !

Checking in to say I am still active on this issue. Essentially complete, just need to do docs, and maybe add a few more tests if needed!
I will try to make a formal PR today to share what I have, and get your input on some suggestions I have for refactoring.

@Newtech66 , happy to team up if you want ( I could also use a sanity check : ) I will add details on my PR where I think more work could be done if you are interested in chipping in there.

  • Sumit

@smtsjhr
Copy link

smtsjhr commented Jun 10, 2023

Check out my PR #175 (still work in progress)!

To whoever is willing, I wrote a lot there with details on my implementation and some questions/suggestions I have for improvement.

After some advice from @vprusso, it would be great to have you contribute in any way @Newtech66 ! Regardless, I will be curious and excited to see another implementation : )

Best,
Sumit

@Newtech66
Copy link

Thank you for your offer, but I wish to work on this alone.

@Newtech66
Copy link

@vprusso When can we expect a review? Unitary Hack will end in just over a day's time.

@nathanshammah
Copy link

@Newtech66 accepted PRs will be awarded even if they get accepted and merged after June 13th.

@vprusso
Copy link
Owner Author

vprusso commented Jun 14, 2023

Hi @Newtech66 and @smtsjhr,

First of all, thank you both so much for your contributions. I'm really impressed with the caliber of code from both merge requests.

Given the rules of the hackathon, I'm technically only allowed to provide the bounty to a single individual (or a set of collaborators if agreed upon beforehand). As both of these submissions were done independently, this leads to a slightly tricky situation.

However, since the quality of the work and effort on both sides was so high, and it was a real and sincere pleasure to have both @smtsjhr and @Newtech66 take the time to contribute to toqtio, I reached out to @natestemen to see if it would be possible to award the full bounty to both participants (and the offer was graciously accepted).

Here's my plan. In order for the bounty stuff to go down, I'll need to assign you both to the issue and then close the issue out. My plan is to take the best parts from both of these MRs and put them together (although this might take some time for me to do).

Let me know what you all think, and thank you both again for taking the time to participate in unitaryHack, and of course, to contributing this very nice feature to toqito!

@vprusso
Copy link
Owner Author

vprusso commented Jun 14, 2023

(Closing issue based on the reasoning from #33 (comment))

@vprusso vprusso closed this as completed Jun 14, 2023
toqito automation moved this from To do to Done Jun 14, 2023
@smtsjhr
Copy link

smtsjhr commented Jun 14, 2023

Great plan, @vprusso ! Consider me game for further discussion, review and contribution. I did peak at @Newtech66's submission a bit and was very impressed with some clever tricks and overall conciseness! I think there is good ways to merge valuable parts of our submissions as they differ enough but mostly conform to a similar design largely inspired by the QETLAB implementation.

Thanks so much Vinny and UnitaryFund for the opportunity to participate and contribute!

Cheers,
Sumit

@Newtech66
Copy link

Yes, it's a nice plan. @smtsjhr's PR is very thorough with documentation and testing (it's really great!) and splitting Pyramids and Shifts into their own classes is a good idea I also thought of. We can combine our work for the final implementation. Many thanks to everyone involved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
toqito
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants