6
$\begingroup$

I am trying to implement the following circuit enter image description here

and my code is

The above circuit has size 5 and depth 3. My question is, how can I run the circuit parallelly. I mean, the gate circuit.cx(qr[0], qr[1]) and gate circuit.cx(qr[2], qr[3]) will be run at the same time and the total running time is dominated by the depth.

I found a related question in Creating and running parallel circuits in Qiskit. However, in that question, the author tries to run several independent experiments rather than run the gates in a circuit parallelly.

$\endgroup$
1
  • $\begingroup$ The ability to run the gates in parallel is up to the device. There could be technical reasons as to why this could be bad, eg noise in simultaneous gates. That said, all IBM Quantum devices run in parallel when possible. $\endgroup$ Nov 1, 2019 at 10:30

1 Answer 1

6
$\begingroup$

Qiskit implements a transpiler which optimizes the circuits that you provide. This means it modifies the circuit so that it can be run on the backend and also optimizes it so that anything that can possibly be run in parallel is done so. To run with the maximum level of optimization you can run execute(circuit, optimization_level=3). There is more information about the transpiler here.

If you would like even finer control of when things are executed you can create a Pulse Schedule. There is more information about this here.

$\endgroup$
1

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.