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

Idiomatic addition circuit #983

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpharrigan
Copy link
Collaborator

This is a proof of principle, re: #957

image

There's really no problem working with 5,000+-bit bloqs (and their decomposition) if they're written with a bit of care.

It's an incredibly simplifying assumption that we can expect to be able to do one level of decomposition without blowing our runtime/performance budget

@mpharrigan
Copy link
Collaborator Author

(this bloq is a proof of principle I whipped up quickly. It would need to be integrated into the existing addition bloq. It's missing the first- and last-bit carry eliminations and the final cnots)

@fdmalone
Copy link
Collaborator

What's the issue with the existing adder? In my defense this is a holdover from very early cirq_ft so I'm totally on board with improving it

@mpharrigan
Copy link
Collaborator Author

Tanuj said decomposing a 5000 bit Add takes 2 minutes. For me, it just crashes my machine with a recursion depth exceeded

@mpharrigan
Copy link
Collaborator Author

The timing information is inaccurate in my original post. I need to time the whole cell. It's 1.03s (715ms without the binst graph part)

@mpharrigan mpharrigan marked this pull request as draft May 23, 2024 21:13
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.

2 participants