question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for > 2 qubit quantum operations with known decompositions in IonQ device.

See original GitHub issue

Is your feature request related to a use case or problem? Please describe. IonQ device supports arbitrary 1 and 2 qubit gates and provides decompositions to hardware native gates. However, for gates with > 2 qubits, it simply raises an error: https://github.com/quantumlib/Cirq/blob/12530f1531e5da663a6b172b1967763e08819912/cirq-core/cirq/ionq/ionq_devices.py#L104

Elsewhere (for eg, in Google’s Sycamore device), we tend to fallback on the default decomposition strategy, if available, for such operations. https://github.com/quantumlib/Cirq/blob/12530f1531e5da663a6b172b1967763e08819912/cirq-google/cirq_google/optimizers/convert_to_sycamore_gates.py#L126

I wonder whether it’s a conscious choice to not rely on the default decompositions or it just got missed ?

Note that, so far, the default strategy to define composite operations in Cirq is to create a new gate with specified decompositions to simpler gates. Some examples of such gates are QuantumFourierTransformGate etc. Ignoring the default decompositions leads to not supporting such composite gates, which is bad? For eg:

num_qubits = 3
qubits = cirq.LineQubit.range(num_qubits)
cirq.Circuit(cirq.QuantumFourierTransformGate(num_qubits)(*qubits), device = cirq.ionq.IonQAPIDevice(qubits))

The above code works fine for num_qubits = 2 but fails for num_qubits > 2 with the following error:

ValueError: Operation {operation} not supported by IonQ API.

The error message should also be fixed as it’s not an f’string 😃

https://github.com/quantumlib/Cirq/blob/12530f1531e5da663a6b172b1967763e08819912/cirq-core/cirq/ionq/ionq_devices.py#L104

What is the urgency from your perspective for this issue? Is it blocking important work?

P3 - I’m not really blocked by it, it is an idea I’d like to discuss / suggestion based on principle

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dabaconcommented, May 13, 2022

Passing over to @Cynocracy please yell if you want help on any of these ionq issues.

0reactions
tanujkhattarcommented, Jun 13, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started With Native Gates - IonQ
In this guide: How to use The IonQ Hardware-Native Gate Specification via the IonQ Quantum Cloud. Time: 1-2 hours.
Read more >
Adding control to arbitrary unknown quantum operations
We have developed and demonstrated an architecture-independent technique that simplifies adding control qubits to arbitrary quantum operations—a ...
Read more >
Compiling quantum algorithms for architectures with multi ...
Here, we present a method tofind such a decomposition, where a small-scale ion trap quantum information processor is used as an example. We ......
Read more >
Adaptive Compilation of Multi-Level Quantum Operations - arXiv
quantum bits (qubits) and support a limited number of logical operations on these ... different but valid decompositions of any given quantum operation...
Read more >
Operations glossary - IBM Quantum
The SWAP gate swaps the states of two qubits. For more information about the SWAP gate, see SwapGate in the Qiskit Circuit Library....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found