-
Notifications
You must be signed in to change notification settings - Fork 52
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
Hamming weight phasing with configurable number of ancilla #1450
base: main
Are you sure you want to change the base?
Conversation
…e, still debugging.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thanks for opening a PR! Please ping me or @tanujkhattar when this is ready for review or if you have any specific questions |
#print("shape after flatten: ", np.shape(x_parts)) | ||
for part in x: | ||
print("next elem: ", part) | ||
x = bb.join(x_parts, dtype=QUInt(self.bitsize.bit_length())) |
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.
try bb.join(np.array(x_parts), ...)
Elsewhere, we tried to be careful about accepting either lists or numpy arrays but seem to have missed this one.
#1470
…bloq(), added test_hamming_weight_phasing_with_configurable_ancilla().
@mpharrigan This should be in a functional state at least. There are a few TODO comments which indicate things I couldn't immediately tell how to do but aren't essential, so suggestions for those would be appreciated. I also have a few questions:
All feedback is welcome, especially on the tests as I do not have much experience with pytest. I expect to have to make quite a few modifications to this. |
#645: Added HammingWeightPhasingWithConfigurableAncilla and a temp test file, still debugging. TODO: add unit tests to hamming_weight_phasing_test.py
Currently having issues joining the slices of the phased register back together with
x = bb.join(x_parts, dtype=QUInt(self.bitsize.bit_length()))
at the end of build_composite_bloq() (line 272).