Quantum circuit compilation with quantum computers

Davide Rattacaso,Daniel Jaschke,Marco Ballarin,Ilaria Siloi,Simone Montangero
2024-08-11
Abstract:Compilation optimizes quantum algorithms performances on real-world quantum computers. To date, it is performed via classical optimization strategies. We introduce a class of quantum algorithms to perform compilation via quantum computers, paving the way for a quantum advantage in compilation. We demonstrate the effectiveness of this approach via Quantum and Simulated Annealing-based compilation: we successfully compile a Trotterized Hamiltonian simulation with up to 64 qubits and 64 time-steps and a Quantum Fourier Transform with up to 40 qubits and 771 time steps. We show that, for a translationally invariant circuit, the compilation results in a fidelity gain that grows extensively in the size of the input circuit, outperforming any local or quasi-local compilation approach.
Quantum Physics
What problem does this paper attempt to address?
This paper aims to solve the problem of quantum circuit compilation, especially optimizing the performance of quantum algorithms on real - world quantum computers. Currently, the compilation of quantum circuits is mainly achieved through classical optimization strategies. However, this method has limitations when dealing with large - scale quantum circuits, because even simple compilation instances have been proven to be NP - complete problems and require approximate solutions. Therefore, this paper proposes a new method, that is, using the quantum computer itself to perform the compilation of quantum circuits, which brings potential quantum acceleration advantages to quantum compilation. Specifically, the authors introduce a class of quantum algorithms for compilation by quantum computers. They demonstrate the effectiveness of this method through methods such as quantum annealing (QA) and simulated annealing (SA). For example, they successfully compiled a Trotterized Hamiltonian simulation circuit with up to 64 qubits and 64 time steps, and a quantum Fourier transform circuit with up to 40 qubits and 771 time steps. For translation - invariant circuits, the compilation results show a significant fidelity gain in the size of the input circuit, outperforming any local or quasi - local compilation methods. By transforming the quantum circuit compilation problem into the ground - state search problem of the many - body non - fidelity Hamiltonian, the authors provide a new framework that can use different quantum algorithms (such as quantum annealing, optimal control, and quantum approximate optimization algorithm) to search for the ground state, thereby finding the optimal equivalent quantum circuit. This method not only improves the compilation efficiency but also provides a new perspective for studying quantum algorithms as many - body systems, and may reveal new phenomena in the quantum circuit space, such as phase transitions and topological features.