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

better bit-wrangling abstraction using less boilerplate #367

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Sep 23, 2024

I have also checked that this does not introduce any JET errors. Hopefully, this is closes #113!

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.

Copy link
Member

@Krastanov Krastanov 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 wonderful!

There are quite a few more places where this is used though:

  • apply_noise.jl
  • pauli_operator.jl
  • project_trace_reset.jl
  • QuantumClifford.jl
  • symbolic_clifford.jl

Not all of them necessarily need to change, maybe what is done here is appropriate to only some for them.

While this is a big step towards fixing #113, I do not think it is sufficient to call it a fix. It is way less boilerplate, but it still has some amount of boilerplate. But we should merge it before worrying about improving it further -- this will already be pretty useful.

src/pauli_frames.jl Outdated Show resolved Hide resolved
src/pauli_frames.jl Show resolved Hide resolved
src/pauli_frames.jl Show resolved Hide resolved
@Fe-r-oz Fe-r-oz marked this pull request as draft September 26, 2024 21:24
@Fe-r-oz Fe-r-oz changed the title fix #113 - better bit-wrangling abstraction better bit-wrangling abstraction using less boilerplate Sep 28, 2024
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 28, 2024

Thank you for highlighting all the files. I have carefully made the changes at appropriate places. Please do cross check them again as these bit masks are used in the critical places. Since .xz is an unsighed vector for paulis and .xzs is unsighed matrix for stabs, using AbstractArray{<:Unsighed} helps cover these two cases. Although, UInt64 is used, but I have kept to Unsighed as in some places when Unsighed was used for type of Tₘ.

I think the PR is ready for review. Thank you.

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

Successfully merging this pull request may close these issues.

better bit-wrangling abstraction
2 participants