-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make SingleQubitCompare
output registers directional
#6312
Make SingleQubitCompare
output registers directional
#6312
Conversation
@@ -222,7 +222,15 @@ class SingleQubitCompare(infra.GateWithRegisters): | |||
|
|||
@cached_property | |||
def signature(self) -> infra.Signature: | |||
return infra.Signature.build(a=1, b=1, less_than=1, greater_than=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should BiQubitsMixer be updated too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, but I'd recommend to open a separate issue in Qualtran. I haven't looked at the decomposition too closely, but I'm not sure if ancilla
doesn't register doesn't need to be part of the signature at all or whether it should be a directional register like the target of an And
gate.
Maybe @NoureldinYosri can clarify this on the separate issue and then we can send a PR to update it and it's usage. Also, it looks like we are not really using BiQubitsMixer(adjoint=True)
anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I'll bump my cirq version locally and see. This is good to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tanujkhattar @fdmalone it should be directional like And
Fixes quantumlib/Qualtran#388
cc @fdmalone