-
Notifications
You must be signed in to change notification settings - Fork 44
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
Refactor Hamming weight phasing to use QVR #1245
Conversation
b88230d
to
5a66b97
Compare
5a66b97
to
8543542
Compare
def via_phase_gradient(cls, bitsize: int, exponent: float = 1, eps: SymbolicFloat = 1e-10): | ||
r"""Factory method for `HammingWeightPhasing` using a phase gradient state. | ||
|
||
In this variant of Hamming Weight Phasing, instead of directly synthesizing $O(\log_2 (\texttt{bitsize}))$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you copied this, but can you hard-wrap the text to <100 columns. vim is gq
; pycharm is "edit -> fill paragraph"
apply the phasing via addition. | ||
|
||
References: | ||
1. [Compilation of Fault-Tolerant Quantum Heuristics for Combinatorial Optimization] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you copied this, but remove 1.
from the list of references. We don't number them.
phase_grad : Phase gradient THRU register of size `O(log2(1/eps))`, to be used to | ||
apply the phasing via addition. | ||
|
||
References: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider moving the reference to the class docstring
@@ -66,6 +69,7 @@ class HammingWeightPhasing(GateWithRegisters): | |||
|
|||
Registers: | |||
x: A `THRU` register of `bitsize` qubits. | |||
extra_registers: Any additional registers used by the `QvrInterface` phase oracle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document the new phase_oracle
arg and reference the new factory method in the class docstring somewhere
@tanujkhattar original author of these bloqs: are you good with the merger? |
@tanujkhattar @anurudhp what's the status of this? |
This has deviated too much from main, closing it for now. We can make a new refactor PR if needed |
fixes #1218