Skip to content

Add native gates for IonQ #5313

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

Merged
merged 22 commits into from
May 6, 2022
Merged

Conversation

Cynocracy
Copy link
Contributor

When circuits are submit, autodetect if only native gates are included, in which case the lang selection changes to 'native'.

This also changes the default from 'json' to 'qis' (a newer alias of the same language).

For now, it is not possible to compile to the native gates, but in a future change, we are hoping to add a CompilationTargetGatset for our
native gates.

I'm stepping on my own feet a bit with #5127 but overall I'm pretty comfortable with the way autodetection of native-only works here. If a user tries to mix and match QIS and Native gates, they will get an error from the IonQ backend. In the future, I would like there to be two CompilationTargetGatesets for IonQ, the existing one and one that targets these new gates.

When circuits are submit, autodetect if only native gates are included, in which case the lang selection changes to 'native'.

This also changes the default from 'json' to 'qis' (a newer alias of the same language).

For now, it is not possible to compile to the native gates, but in a future change, we are hoping to add a CompilationTargetGatset for our
native gates.
Copy link
Contributor

@gmauricio gmauricio left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Cynocracy
Copy link
Contributor Author

Cynocracy commented Apr 30, 2022

Is there any big reason to worry about skipping serialization, maybe TFQ and other library interop for these gates?

@CirqBot CirqBot added the size: L 250< lines changed <1000 label Apr 30, 2022
@Cynocracy
Copy link
Contributor Author

Gonna do the json bits :) Am worried I'd be missing something otherwise

@ColemanCollins ColemanCollins merged commit fc9a204 into quantumlib:master May 6, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
* Add native gates for IonQ

When circuits are submit, autodetect if only native gates are included, in which case the lang selection changes to 'native'.

This also changes the default from 'json' to 'qis' (a newer alias of the same language).

For now, it is not possible to compile to the native gates, but in a future change, we are hoping to add a CompilationTargetGatset for our
native gates.

* fmt

* Lint happy

* Expose gates

* Satisfy mypy

* Fmt

* Hack around laziness re: json format

* Appease coverage

* fmt

* Support JSON

* Fmt and fix Repr

* huh?

* Confusing json :/

* Confusing json take 2

* Confusing json take 3\?

* Figure out the missing magic, implement

* Lang -> Gateset
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.

4 participants