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

Improve magic rounding to work with all available encodings #7

Closed
garrison opened this issue May 5, 2022 · 0 comments · Fixed by #33
Closed

Improve magic rounding to work with all available encodings #7

garrison opened this issue May 5, 2022 · 0 comments · Fixed by #33
Labels
enhancement New feature or request rounding Related to QRAO rounding schemes

Comments

@garrison
Copy link
Member

garrison commented May 5, 2022

What is the expected enhancement?

As the README currently says:

The Magic Rounding scheme is currently only compatible with the (3,1,p) QRAC for encoding classical binary variables onto qubits. [...] We plan to make Magic Rounding compatible with additional encoding options in the future.

Let's improve magic rounding to work regardless of whether max_vars_per_qubit is 1, 2, or 3 (i.e., with all available encodings).

Once this is complete, we can also remove the _encoding attribute from the RoundingContext and enable the protected-access pylint check throughout the code base.

@garrison garrison added enhancement New feature or request rounding Related to QRAO rounding schemes labels May 5, 2022
This was referenced May 6, 2022
areeq-hasan added a commit to areeq-hasan/prototype-qrao that referenced this issue Jun 9, 2022
@garrison garrison linked a pull request Jun 9, 2022 that will close this issue
garrison added a commit that referenced this issue Jun 22, 2022
* Add support for (1,1,p) and (2,1,p) QRACs

Addresses #7 .

* remove unused import

* handle (2,1,p)-encoded single dvar

* Remove caveat from README that is fixed by this branch

* Update magic rounding tests to be for (2,1,p) and (1,1,1) QRACs

* simplify (1,1,p)-qrac magic basis choice

Co-authored-by: Jim Garrison <jim@garrison.cc>

* comment qrac decoding

Co-authored-by: Jim Garrison <jim@garrison.cc>

* protect vars_per_qubit

* improve comment for op_index

* inplace=False

Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <jim@garrison.cc>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request rounding Related to QRAO rounding schemes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant