qiskit-community / qiskit-braket-provider

Qiskit-Braket provider to execute Qiskit programs on quantum computing hardware devices through Amazon Braket.
https://qiskit-community.github.io/qiskit-braket-provider/
Apache License 2.0
58 stars 45 forks source link

Extend `to_braket` to consider topology and the range of angles of native gates #176

Open yitchen-tim opened 4 months ago

yitchen-tim commented 4 months ago

Follow issue https://github.com/qiskit-community/qiskit-braket-provider/issues/138, the to_braket function converts the input QIskit circuit into a Braket circuit that contains the backend's native gates. However, such conversion does not consider the topology of the device yet. The range of angle is also not considered by the to_braket function. The output circuit of to_braket may currently contain angle not supported by the backend.

What is the expected behavior?

When apply the to_braket function to a QIskit circuit, shown as the code snippet below,

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

the output braket_circuit is a circuit in Braket Circuit class. The output Braket circuit should be equivalent to the input Qiskit circuit, but it only contains native gates of the device with the correct range of the angles. The two-qubit native gates apply only on the physical edge of the device.

Acceptance criteria