qiskit-community/qiskit-braket-provider

Qiskit's `execute` function doesn't pass `shots` value to the device

kshitijc opened this issue · 2 comments

Steps to reproduce the problem

aws_device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
sim = AWSBraketBackend(device=aws_device)
qc = QuantumCircuit(1)
qc.h(0)
execute(qc, sim, shots=10)

What is the current behavior?

The circuit is executed with shots = 0 (which is the Braket SDK default)

What is the expected behavior?

The circuit should execute with shots = 10 (what is specified in the execute function).

Note: You can work around this by doing the following:
sim.options.update_options(shots=10)

The deprecated function execute has been recently been removed from Qiskit. Instead, please use:

sim.run(qc, shots=10)

For more details, check out the documentation for running circuits on Braket devices.