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

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

Open
yitchen-tim opened this issue May 9, 2024 · 0 comments
Labels

Comments

@yitchen-tim
Copy link
Collaborator

yitchen-tim commented May 9, 2024

Follow issue #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

  • The output Braket circuit only use angles supported by the backend. Currently, the only backends that has such restriction in angles are Rigetti backends. As a native gate in Rigetti backends, the Rx can only accept +pi, -pi, +pi/2 and -pi/2.
  • There is a extensible way to specify angle restriction for a backend. For example, a new restriction can be added to a backend without complex change in the code.
  • The two-qubit native gates should respect the device topology.
@rmshaffer rmshaffer added the good first issue Good for newcomers label May 14, 2024
monika-sahay added a commit to monika-sahay/qiskit-braket-provider that referenced this issue Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants