Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add magic rounding support for (1,1,p) and (2,1,p) QRACs #33

Merged
merged 13 commits into from
Jun 22, 2022

Conversation

areeq-hasan
Copy link
Contributor

Summary

Details and comments

@areeq-hasan areeq-hasan marked this pull request as ready for review June 9, 2022 13:07
@garrison garrison linked an issue Jun 9, 2022 that may be closed by this pull request
@garrison garrison added rounding Related to QRAO rounding schemes needs: changelog Should be (but has not yet been) noted in the release notes labels Jun 9, 2022
Copy link
Member

@garrison garrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

My only additional comment is that I think vars_per_qubit should be changed to _vars_per_qubit everywhere within RoundingContext (it can remain as it is, however, in magic_rounding.py), both as an argument name in the constructor and in its name as assigned on the object. It really only exists to make our lives easier in test_magic_rounding.py and will be dropped as soon as we refactor to have adaptive QRACs. Since we don't plan to support this new API indefinitely, let's introduce it as protected instead of public (i.e., with the leading underscore). The only files that should need modified as part of this tweak are rounding_common.py and test_magic_rounding.py.

@garrison
Copy link
Member

I added tests in 2a9e176.

There's no explicit test of weighted sampling for (2,1,p) and (1,1,1) QRACs -- at least, not yet. I think that's the only thing missing (and I don't think I'd hold up merging to wait on it).

areeq-hasan and others added 5 commits June 20, 2022 16:58
@garrison garrison merged commit a87b629 into qiskit-community:main Jun 22, 2022
garrison added a commit that referenced this pull request Jun 22, 2022
@garrison garrison removed the needs: changelog Should be (but has not yet been) noted in the release notes label Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rounding Related to QRAO rounding schemes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve magic rounding to work with all available encodings
2 participants