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

Remove unitary validation check when constructing GateWithRegisters.controlled() #887

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

tanujkhattar
Copy link
Collaborator

Fixes #885

For now, I've mainly copied the logic from cirq.ControlledGate to construct AbstractControlValues object from parameters num_controls, control_values and control_qid_shape but we should eventually get rid of these arguments or at least move this to a different place instead of on GateWithRegisters. For example - we could add a new GWROperation for cirq-style API and delegate to underlying gate's gwr.controlled(ctrl_spec). Right now, cirq.GateOperation().controlled_by() delegates to gwr.controlled but with the cirq-style API (num_control, control_values, control_qid_shape).

cc @anurudhp

@tanujkhattar tanujkhattar merged commit b3a134f into quantumlib:main Apr 23, 2024
6 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.

Controlled of Adjoint does not work with decompose_with_registers
2 participants