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

Add Cirq --> Braket IonQ Gate conversions #400

Open
ryanhill1 opened this issue Sep 9, 2023 · 4 comments
Open

Add Cirq --> Braket IonQ Gate conversions #400

ryanhill1 opened this issue Sep 9, 2023 · 4 comments
Labels
good first issue Good for newcomers transpiler 🚊 Circuit conversions across program types unitaryhack Dedicated issue for UF open-source hackathon

Comments

@ryanhill1
Copy link
Member

IonQ native gates include GPi, GPi2, and MS, see https://ionq.com/docs/getting-started-with-native-gates

We recently added support for converting IonQ gates from Braket $\rightarrow$ Cirq:

if cirq_ionq_ops and isinstance(gate, (braket_gates.GPi, braket_gates.GPi2)):
phi = gate.angle / (2 * np.pi)
gate_class = (
cirq_ionq_ops.GPIGate if isinstance(gate, braket_gates.GPi) else cirq_ionq_ops.GPI2Gate
)
return [gate_class(phi=phi).on(*qubits)]

and

if cirq_ionq_ops and isinstance(gate, braket_gates.MS):
return [
cirq_ionq_ops.MSGate(
phi0=gate.angle_1 / (2 * np.pi),
phi1=gate.angle_2 / (2 * np.pi),
theta=gate.angle_3 / (2 * np.pi),
).on(*qubits)
]

In this issue, we now want to add support for the equivalent conversion(s) linked above, but going from Cirq $\rightarrow$ Braket:

if cirq_ionq_ops and isinstance(
gate, (cirq_ionq_ops.GPIGate, cirq_ionq_ops.GPI2Gate, cirq_ionq_ops.MSGate)
):
raise NotImplementedError(
"Cirq to Amazon Braket IonQ gate conversions not yet supported."
)

@ryanhill1 ryanhill1 added good first issue Good for newcomers transpiler 🚊 Circuit conversions across program types labels Sep 9, 2023
@devilkiller-ag
Copy link

Hi @ryanhill1, Can I try this issue?

@ryanhill1
Copy link
Member Author

@devilkiller-ag Absolutely, go for it!

@ryanhill1
Copy link
Member Author

Relevant section is now here: (

raise NotImplementedError(
"Cirq to Amazon Braket IonQ gate conversions not yet supported."
)
)

@devilkiller-ag
Copy link

Thanks @ryanhill1 I will complete this soon.

@ryanhill1 ryanhill1 added the unitaryhack Dedicated issue for UF open-source hackathon label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers transpiler 🚊 Circuit conversions across program types unitaryhack Dedicated issue for UF open-source hackathon
Projects
None yet
Development

No branches or pull requests

2 participants