Skip to content

Create controlled greater than bloq#1283

Merged
NoureldinYosri merged 8 commits into
quantumlib:mainfrom
NoureldinYosri:linear_comparators
Aug 16, 2024
Merged

Create controlled greater than bloq#1283
NoureldinYosri merged 8 commits into
quantumlib:mainfrom
NoureldinYosri:linear_comparators

Conversation

@NoureldinYosri
Copy link
Copy Markdown
Contributor

@NoureldinYosri NoureldinYosri commented Aug 13, 2024

A controlled version of greater than is needed in order to be able to create controlled mod addition gate.

In this PR I create CLinearDepthGreaterThan and fix some classical and QDType bugs in other bloqs

I also update OnEach to accept a target dtype ... that's because OnEach returns a register of type QAny which causes problems in classical simulation. this way we can expect maintain the dtype of the input register.


I updated #1278 so that it tracks all .controlled work

@NoureldinYosri NoureldinYosri marked this pull request as ready for review August 13, 2024 20:21
@fdmalone
Copy link
Copy Markdown
Collaborator

Incidentally fixes #1230

Comment thread qualtran/bloqs/arithmetic/comparison.py Outdated
Comment thread qualtran/bloqs/arithmetic/comparison.py
Comment thread qualtran/bloqs/arithmetic/comparison.py Outdated
Comment thread qualtran/bloqs/arithmetic/comparison.py
Comment thread qualtran/bloqs/arithmetic/comparison.py Outdated
Comment thread qualtran/bloqs/arithmetic/comparison.py
Comment thread qualtran/bloqs/arithmetic/comparison.py Outdated
Comment thread qualtran/bloqs/arithmetic/comparison.py Outdated
Copy link
Copy Markdown
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.

Some nits / questions.

@fdmalone
Copy link
Copy Markdown
Collaborator

Nice!

@NoureldinYosri NoureldinYosri enabled auto-merge (squash) August 16, 2024 01:36
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