Most quantum circuits require SWAP gate insertion to run on quantum hardware
with limited qubit connectivity. A promising SWAP gate insertion method for
blocks of commuting two-qubit gates is a predetermined swap strategy which
applies layers of SWAP gates simultaneously executable on the coupling map. A
good initial mapping for the swap strategy reduces the number of required swap
gates. However, even when a circuit consists of commuting gates, e.g., as in
the Quantum Approximate Optimization Algorithm (QAOA) or trotterized
simulations of Ising Hamiltonians, finding a good initial mapping is a hard
problem. We present a SAT-based approach to find good initial mappings for
circuits with commuting gates transpiled to the hardware with swap strategies.
Our method achieves a 65% reduction in gate count for random three-regular
graphs with 500 nodes. In addition, we present a heuristic approach that
combines the SAT formulation with a clustering algorithm to reduce large
problems to a manageable size. This approach reduces the number of swap layers
by 25% compared to both a trivial and random initial mapping for a random
three-regular graph with 1000 nodes. Good initial mappings will therefore
enable the study of quantum algorithms, such as QAOA and Ising Hamiltonian
simulation applied to sparse problems, on noisy quantum hardware with several
hundreds of qubits.Comment: 7 page