4
$\begingroup$

Say I have two basic circuits to run, call them qc1 and qc2 (as in this link: https://www.youtube.com/watch?v=xUt4YKQEUco&ab_channel=Qiskit). On QISKIT I can run them in the same job, to save overhead time, and also spend less time in the queue. Is there any way I can use a different number of shots per circuit? So for example I can run both circuits with the following code:

qc_list=[qc1,1c2]
job=execute(qc_list,Aer.get_backend('qasm_simulator'),shots=1000)

However, this runs both circuits with the same number of shots. I tried to run something like this to use a different number of shots for each circuit:

job=execute(qc_list,Aer.get_backend('qasm_simulator'),shots=[1000,2000])

But this returns an error saying that shots only takes integers as its argument. Does anyone know how to pass a list of shots alongside a list of circuits?

If not it is not a disaster, I can simply use the maximum number of shots and throw away some results, but this feels very wasteful, so I would rather not do this

$\endgroup$

1 Answer 1

6
$\begingroup$

It is not possible. As you can see here, if you send several circuits on the same job, then the job will execute by iterating over every circuit for each shot, i.e. the first shot will be done for every circuit, then the second shot, then the third, and so on.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.