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

[mod_arithmetic] Organize modular addition #907

Merged
merged 24 commits into from
May 17, 2024

Conversation

mpharrigan
Copy link
Collaborator

  • new top-level module mod_arithmetic that will contain modular arithmetic.
  • Move things from factoring/ and addition/ to this module
  • Simplify naming: [C][Mod]Op[K]

More to come after this

@mpharrigan mpharrigan requested a review from tanujkhattar April 29, 2024 23:50
@mpharrigan mpharrigan requested a review from fdmalone May 6, 2024 21:57
@mpharrigan
Copy link
Collaborator Author

@tanujkhattar or @fdmalone can you ptal

Copy link
Collaborator

@fdmalone fdmalone left a comment

Choose a reason for hiding this comment

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

LGTM, mostly organization. Some small nits

return t_complexity(cirq.decompose_once(op))
return t_complexity(op)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was causing a failure if it encountered CRz. I don't understand why you'd want to decompose it again. Controlled.as_cirq_op (above) should do the trick

@mpharrigan mpharrigan enabled auto-merge (squash) May 17, 2024 19:09
@mpharrigan mpharrigan merged commit 05504ce into quantumlib:main May 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants