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

Deprecate device.decompose_operation in cirq_ionq. #4925

Merged

Conversation

MichaelBroughton
Copy link
Collaborator

Yet more of #4744 .

@CirqBot CirqBot added the size: M 50< lines changed <250 label Feb 1, 2022
Copy link
Collaborator

@dabacon dabacon left a comment

Choose a reason for hiding this comment

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

LGTM

if operation in _VALID_GATES:
return operation
assert cirq.has_unitary(operation), (
f'Operation {operation} that is not available on the IonQ API nor does it have a '
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove "that"

from cirq import _compat


_VALID_GATES = cirq.Gateset(
Copy link
Collaborator

Choose a reason for hiding this comment

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

adding to the import time I see :)

@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Feb 2, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Feb 2, 2022
@CirqBot CirqBot merged commit 610b0d4 into quantumlib:master Feb 2, 2022
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Feb 2, 2022
@tanujkhattar
Copy link
Collaborator

The original decompose_operation implementation was a sub-routine used to convert the constructed circuit to the native target gateset. The newly added decompose_to_device is a method that just converts individual operations.

We should ideally create a new cirq transformer (aka optimizer) for converting circuits to the ionq native gatesets and use that as a recommendation to replace the deprecated decompose_operation.

This is tracked in #4901

@MichaelBroughton
Copy link
Collaborator Author

Right, although I don't think you or I should work on implementing this. Ideally someone from ionq will come along and do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants