Despite rapid advances in quantum computing technologies, the qubit connectivity limitation remains to be a critical challenge. Both near-term NISQ quantum computers and relatively long-term scalable quantum architectures do not offer full connectivity. As a result, quantum circuits may not be directly executed on quantum hardware, and a quantum compiler needs to perform qubit routing to make the circuit compatible with the device layout. During the qubit routing step, the compiler inserts SWAP gates and performs circuit transformations. Given the connectivity topology of the target hardware, there are typically multiple qubit routing candidates. The state-of-the-art compilers use a cost function to evaluate the number of SWAP gates for different routes and then select the one with the minimum number of SWAP gates. After qubit routing, the quantum compiler performs gate optimizations upon the circuit with the newly inserted SWAP gates. In this paper, we observe that the aforementioned qubit routing is not optimal, and qubit routing should \textit{not} be independent on subsequent gate optimizations. We find that with the consideration of gate optimizations, not all of the SWAP gates have the same basis-gate cost. These insights lead to the development of our qubit routing algorithm, NASSC (Not All Swaps have the Same Cost). NASSC is the first algorithm that considers the subsequent optimizations during the routing step. Our optimization-aware qubit routing leads to better routing decisions and benefits subsequent optimizations. We also propose a new optimization-aware decomposition for the inserted SWAP gates. Our experiments show that the routing overhead compiled with our routing algorithm is reduced by up to $69.30\%$ ($21.30\%$ on average) in the number of CNOT gates and up to $43.50\%$ ($7.61\%$ on average) in the circuit depth compared with the state-of-the-art scheme, SABRE.
翻译:尽管量子计算技术取得了快速进步,但qubit连通性限制仍是一个严峻的挑战。 无论是近期 NISQ 量子计算机还是相对长期可变量量量子结构,都无法提供完全连通性。 因此, 量子电路可能不会直接在量子硬件上执行, 量子汇编器需要执行qubit 路程, 以使电路与设备布局兼容。 在qubit 路程步骤中, 编程者插入 SWAP 门并进行电路转换。 鉴于目标硬件的连通性结构, 通常有多个qubit 路程选择者。 最新水平的编程编辑者使用成本函数来评估SWAP的大门数量, 然后选择SWA的最小数量。 量子编程编程编辑器在新插入的电路路程上进行优化。 我们观察到, 上述离子路路程不是最优的, 离子路程选择在后端端端端端端端的SWal- diral 。 我们发现, iralalalalalalal- dealal- deal- dealalshistal deal deal mail devel max the the the the the the shail devel shail destal devel shaild the sal devel shail de shail de shail de shail de de de de shaut the de de max deal devel deal deal deal devel max max dex shating the devel deal devel max max max max max max max max max max max max dal dexal deal deal deal sial de shasal shas dal de sial sial dal deal deal deal deal deal deal deal deal deal max shad shad sial de masal shasal de masal de mas de de masal masal de masal de de de de masal de de de de masal de