qiskit-braket-provider icon indicating copy to clipboard operation
qiskit-braket-provider copied to clipboard

Decompose circuits onto the native gate set of the backend

Open jcjaskula-aws opened this issue 1 year ago • 3 comments

What is the expected behavior?

One could leverage further the qiskit transpiler to compose circuits onto the native gate set of the backend. A possible user experience could look like

backend = AWSBraketProvider().get_backend("...")
circuit = QuantumCircuit(2)
circuit.x(0)
circuit.y(1)
circuit.rzz(1, 0, 1)
to_braket(circuit, backend, native=True)

jcjaskula-aws avatar Jan 23 '24 22:01 jcjaskula-aws

This is pretty straightforward if we only care about transpiling to the native gateset. However, this isn't enough to create a truly native circuit, since considering only the gateset can produce a circuit where 2q gates are applied to non-adjacent qubits. To accurately compile to a native circuit, we'll need to consider a Target.

speller26 avatar Feb 29 '24 02:02 speller26

Agreeing. This is primarily a follow-up of #91. Additionally, what we have for Aspen should work out of the box for other devices.

jcjaskula-aws avatar Feb 29 '24 20:02 jcjaskula-aws

There are actually two more things getting in the way of native transpilation:

  1. The service does not provide expose parameter ranges for native gates
  2. Target only allows us to specify unbounded parameter ranges (like RXGate(Parameter("theta"))) or single angles (like RXGate(np.pi)) for parametrized gates; it doesn't provide a way to specify parameter ranges

speller26 avatar Mar 01 '24 08:03 speller26