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

Create a Subtract bloq #924

Merged
merged 11 commits into from
May 15, 2024
Merged

Conversation

NoureldinYosri
Copy link
Contributor

@NoureldinYosri NoureldinYosri commented May 6, 2024

related to #235 since to do comparison in N Toffolis we need to be able to do subtraction

@NoureldinYosri NoureldinYosri changed the title [Draft] Create a Subtract bloq Create a Subtract bloq May 8, 2024
@NoureldinYosri NoureldinYosri marked this pull request as ready for review May 8, 2024 00:32
@mpharrigan
Copy link
Collaborator

I don't think the relative -> absolute is the correct fix for this particular issue

@mpharrigan
Copy link
Collaborator

Can you take a look at #933, revert the imports change, and resolve conflicts?

@NoureldinYosri
Copy link
Contributor Author

@mpharrigan done, ptal

@@ -409,7 +409,7 @@ class SimpleAddConstant(Bloq):
[Improved quantum circuits for elliptic curve discrete logarithms](https://arxiv.org/abs/2001.09580) Fig 2a
"""

bitsize: int
bitsize: Union[int, sympy.Expr]
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have a SymbolicInt in qualtran.symbolics.types now.

Args:
a_dtype: Quantum datatype used to represent the integer a.
b_dtype: Quantum datatype used to represent the integer b. Must be large
enough to hold the result in the output register of a + b, or else it simply
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: a - b

@NoureldinYosri NoureldinYosri enabled auto-merge (squash) May 15, 2024 22:51
@NoureldinYosri NoureldinYosri merged commit c10d386 into quantumlib:main May 15, 2024
7 checks passed
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.

None yet

3 participants