1
$\begingroup$

Using transpile with optimization_level = 3, which is the layout method used by default?

$\endgroup$
0
$\begingroup$

DenseLayout is used by default. You can see the code for the optimization level here and it is this line that sets the default to be the dense layout.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much. But in your opinion using as layout method noise_adaptive give best perfomances ? I'm tring to understand which layout method allows to have the best performances $\endgroup$ – Roberto May 11 at 11:26
  • $\begingroup$ If you are going to be running it on the hardware it might be worth trying NoiseAdaptive too, it may be better but the only way to know for sure it to experiment! :) if this answer answered your question would you mind marking it as accepted? $\endgroup$ – met927 May 11 at 11:31
  • $\begingroup$ Thanks again. Just another question: for what you know there is a way to check which layout is better whitout execute the jobs ? Maybe using simulations o something like that ? $\endgroup$ – Roberto May 11 at 13:40
  • $\begingroup$ You could try using a simulator with a NoiseModel corresponding to the device you eventually want to run the circuit on $\endgroup$ – met927 May 11 at 13:46
0
$\begingroup$

You can pass a layout_method=... arg to set this yourself. It currently accepts 'dense', 'noise_adaptive' and 'trivial'.

(There is a also an option for routing_method=... which accepts 'basic', 'stochastic' and 'lookahead'.)

The difference between the various levels (0,1,2,3) is then what parameters these passes run with. At higher level, they run with more time-consuming parameters which will probably yield better results. For example the number of trials is higher, or the lookahead window is larger.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks. I ask you the same question I asked to met927: for what you know there is a way to check which layout is better whitout execute the jobs ? Maybe using simulations o something like that ? $\endgroup$ – Roberto May 11 at 13:44
  • $\begingroup$ Yes you can simulate it using a noise model based on that device's parameters. There's a tutorial on that here: github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/… $\endgroup$ – Ali Javadi May 11 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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