Skip to content

Add IonQTargetGateset and use it for circuit compilations. - #5479

Merged
CirqBot merged 3 commits into
masterfrom
ionq_target_gateset
Jun 13, 2022
Merged

CirqBot merged 3 commits into
masterfrom
ionq_target_gateset

Conversation

@tanujkhattar

Copy link
Copy Markdown
Collaborator

Fixes #5129 #4901 #4153
Replaces #5127

  • Adds support for compiling > 2q operations to ionq's target gateset
  • Does not do the "merge 2q operations to a connected component" optimization, to preserve existing behavior. We can add another preprocess_transformer if we want to do the optimization.
  • Deprecates cirq_ionq.decompose_to_device in favour of using cirq.optimize_for_target_gateset(circuit, gateset=cirq_ionq.IonQTargetGateset) for compiling circuits.

cc @Cynocracy @dabacon

@CirqBot CirqBot added the size: L 250< lines changed <1000 label Jun 10, 2022
@Cynocracy

Cynocracy commented Jun 10, 2022

Copy link
Copy Markdown
Contributor

Thanks for picking this up! LGTM, but I don't think I can approve for some reason

@dabacon dabacon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two small comments, but LGTM

Comment thread cirq-ionq/cirq_ionq/ionq_gateset.py
Comment thread cirq-ionq/cirq_ionq/ionq_gateset.py Outdated
@tanujkhattar tanujkhattar added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 13, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 13, 2022
@CirqBot
CirqBot merged commit 3360198 into master Jun 13, 2022
@CirqBot CirqBot removed the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 13, 2022
@CirqBot
CirqBot deleted the ionq_target_gateset branch June 13, 2022 12:10
@CirqBot CirqBot removed the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 13, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
…b#5479)

Fixes quantumlib#5129 quantumlib#4901 quantumlib#4153
Replaces quantumlib#5127

* Adds support for compiling > 2q operations to ionq's target gateset
* Does not do the "merge 2q operations to a connected component" optimization, to preserve existing behavior. We can add another `preprocess_transformer` if we want to do the optimization. 
* Deprecates `cirq_ionq.decompose_to_device`  in favour of using `cirq.optimize_for_target_gateset(circuit, gateset=cirq_ionq.IonQTargetGateset)` for compiling circuits. 

cc @Cynocracy @dabacon
mhucka added a commit to mhucka/Cirq that referenced this pull request Mar 28, 2025
Removed mention of `decompose_operation`.

Issue quantumlib#5497 talks about updating the IonQ documentation to describe
the use of transformers for compilation introduced in quantumlib#5479. This
commit does not address that.
github-merge-queue Bot pushed a commit that referenced this pull request Mar 31, 2025
* Fix #5497

Removed mention of `decompose_operation`.

Issue #5497 talks about updating the IonQ documentation to describe
the use of transformers for compilation introduced in #5479. This
commit does not address that.

* Fix example of circuit transformation for IonQ-native gates

Replace and test the outdated example code (cirq.Circuit does not take
a `device` argument anymore).

---------

Co-authored-by: Pavol Juhas <juhas@google.com>
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…uantumlib#7198)

* Fix quantumlib#5497

Removed mention of `decompose_operation`.

Issue quantumlib#5497 talks about updating the IonQ documentation to describe
the use of transformers for compilation introduced in quantumlib#5479. This
commit does not address that.

* Fix example of circuit transformation for IonQ-native gates

Replace and test the outdated example code (cirq.Circuit does not take
a `device` argument anymore).

---------

Co-authored-by: Pavol Juhas <juhas@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: L 250< lines changed <1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IONQ] Vendor Transformer adoption

4 participants