I have a quantum circuit in qiskit. Now I want to know is there any way that I can transform it to a braket circuit in AWS? I want to use error mitigation in AWS. I have the circuit in qiskit. But as error mitigation in AWS only accept braket circuit I have to somehow transform the qiskit circuit to braket circuit. How I can solve this problem?
-
$\begingroup$ I don't know anything about braket, sorry if it's not useful, but if it supports openQASM then you can transform the qiskit circuit into openQASM string and back to braket maybe? $\endgroup$– LenaCommented Jan 16, 2023 at 10:42
-
$\begingroup$ Ok. I will try to do that. $\endgroup$– INDRANIL MAITICommented Jan 16, 2023 at 11:27
-
$\begingroup$ There is a similar question with newer answers. How to Properly Run a Circuit with Qiskit on AWS Braket $\endgroup$– Chien Kai MaCommented Mar 26 at 8:59
2 Answers
I'm not sure if this actually solves your problem but Amazon Braket recently released a Qiskit provider that you can install by pip install qiskit-braket-provider
.
This tool let you to run your Qiskit QuantumCircuit
by using Braket Python SDK:
from qiskit import QuantumCircuit
from qiskit_braket_provider import BraketLocalBackend
circ = QuantumCircuit()
# build your Qiskit circuit here
# ...
local_simulator = BraketLocalBackend()
task = local_simulator.run(circ, shots=1000)
Take a look at this link for more details: Introducing the Qiskit provider for Amazon Braket.
You can transpile circuits from qiskit to braket using the qBraid SDK. For example:
from qbraid import circuit_wrapper
from qiskit import QuantumCircuit
qiskit_circuit = QuantumCircuit()
# ...
braket_circuit = circuit_wrapper(qiskit_circuit).transpile("braket")
See:
- qBraid SDK user guide: Circuit Wrapper, Transpiler
- qBraid SDK transpiler demo notebook (qiskit to braket in cells 12-14)
Note: Right now the qBraid SDK is only available on lab.qbraid.com, but will be open-sourced very soon!
-
-
$\begingroup$ Sounds good, let me know if you need any additional guidance with setup! $\endgroup$ Commented Jan 17, 2023 at 15:15