Closed ryanhill1 closed 1 year ago
hello @ryanhill1 , interested in taking up this issue
@rum1887 sounds great!
@rum1887 Can i have a jibe at this too? I'm already made some progress... i figured that everyone could work on this, so i didn't ask to get assigned earlier. Could you assign it to me now?
@mmlouamri please comment so issue can be assigned to you to receive Unitary Hack project credit for #257
Thank you! It was a great learning experience 🙏!
Unitary Hack scope
Transpile an Amazon Braket circuit to a circuit composed of native gates for IonQ Harmony device.
Implement function similar to qiskit circuit transpiler for
braket.circuits.Circuit
type. For Unitary Hack submissions, successful implementation for IonQ Harmony device can close this issue and receive bounty! For further guidance and implementation tips, see below.Here are some further details that may help!
AwsDevice supported gates
Example of getting supported gate set for IonQ device:
qBraid DeviceLikeWrapper runtime
In this issue, we implement a function/method that is called after
_compat_run_input()
and beforeAwsDevice.run()
that checks that the Amazon Braket circuit being submitted is composed only of gates that are supported by the target device. For each wrapped AwsDevice, you can get the supported gate set as shown in the example code above.Implementation brainstorm
There are a number of approaches that can be taken. Integration with third-party packages is not off the table, but we also want to keep the number of transpilations between different packages to a minimum, if we can, because each time we do one we have the potential of losing information about the circuit, and converting back always runs the risk of popping up new unsupported gates. That being said, here are some options:
qiskit.compiler.transpiler
function. Amazon Braket only has ~38 different gates total, and because you know the supported gate sets of each of the devices ahead of time, you may be able to take some shortcuts by solving the most common mappings first, and leverage the qiskit implementation for edge cases.There are many approaches, so pick whichever feels most logical.