Search code examples
layoutmappingqiskit

How does DenseLayout in qiskit's transpiler work?


I'm looking for an explanation about the Dense Layout algorithm used by qiskit's transpiler.

I saw the source code, but still I don't understand what """Choose a Layout by finding the most connected subset of qubits""" means!

Is there a paper about this kind of mapping algorithm or other resource I can learn about it from?


Solution

  • It does a breadth first search for a connected subset starting at each qubit. The subset with the most connectivity is selected. Due to symmetry there are many subsets with same connectivity. However, it also looks at the noise in the device and picks the subset with the least amount of noise. Finally that set is run through a reverse cuthill mckee traversal to reorder the qubits in the set for a lower degree.

    There is no paper on it as I came up with it to solve a bug in earlier versions of the Qiskit swap mapper.