Control of quantum operations is a crucial yet expensive construct for quantum computation. Efficient implementations of controlled operations often avoid applying control to certain subcircuits, which can significantly reduce the number of gates and overall circuit depth. However, these methods are specialized and circuits frequently need to be implemented manually. This paper presents a generic method for finding "skippable" patterns without having to tailor implementations for each algorithm. We prove that finding the optimal operations to be skipped is generally NP-hard. Nevertheless, sub-optimal, polynomial approximation algorithms that find skippable subcircuits can lead to over $50\%$ improvement in circuit metrics for real-world applications.
Control of quantum operations is a crucial yet expensive construct for quantum computation. Efficient implementations of controlled operations often avoid applying control to certain subcircuits, which can significantly reduce the number of gates and overall circuit depth. However, these methods are specialized and circuits frequently need to be implemented manually. This paper presents a generic method for finding "skippable" patterns without having to tailor implementations for each algorithm. We prove that finding the optimal operations to be skipped is generally NP-hard. Nevertheless, sub-optimal, polynomial approximation algorithms that find skippable subcircuits can lead to over 50% improvement in circuit metrics for real-world applications.
Quantum computations are typically performed as a sequence of basic operations, called quantum gates. Different gate sequences, called quantum circuits, can implement the same overall quantum computation. Since every additional quantum gate takes time and introduces noise into the system, it is important to find the smallest possible quantum circuit that implements a given computation, especially for near-term quantum devices that can execute only a limited number of quantum gates before noise renders the computation useless. An important building block for many quantum circuit optimization techniques is pattern matching: given a large and small quantum circuit, we would like to find all maximal matches of the small circuit, called a pattern , in the large circuit, considering pairwise commutation of quantum gates. In this work, we present the first classical algorithm for pattern matching that provably finds all maximal matches and is efficient enough to be practical for circuit sizes typical for near-term devices. We demonstrate numerically 1 that combining our algorithm with known pattern-matching-based circuit optimization techniques reduces the gate count of a random quantum circuit by ∼ 30% and can further improve practically relevant quantum circuits that were already optimized with state-of-the-art techniques.
Recent advances in quantum architectures and computing have motivated the development of new optimizing compilers for quantum programs or circuits. Even though steady progress has been made, existing quantum optimization techniques remain asymptotically and practically inefficient and are unable to offer guarantees on the quality of the optimization. Because many global quantum circuit optimization problems belong to the complexity class QMA (the quantum analog of NP), it is not clear whether quality and efficiency guarantees can both be achieved. In this paper, we present optimization techniques for quantum programs that can offer both efficiency and quality guarantees. Rather than requiring global optimality, our approach relies on a form of local optimality that requires each and every segment of the circuit to be optimal. We show that the local optimality notion can be attained by a cut-and-meld circuit optimization algorithm. The idea behind the algorithm is to cut a circuit into subcircuits, optimize each subcircuit independently by using a specified "oracle" optimizer, and meld the subcircuits by optimizing across the cuts lazily as needed. We specify the algorithm and prove that it ensures local optimality. To prove efficiency, we show that, under some assumptions, the main optimization phase of the algorithm requires a linear number of calls to the oracle optimizer. We implement and evaluate the local-optimality approach to circuit optimization and compare with the state-of-the-art optimizers. The empirical results show that our cut-and-meld algorithm can outperform existing optimizers significantly, by more than an order of magnitude on average, while also slightly improving optimization quality. These results show that local optimality can be a relatively strong optimization criterion and can be attained efficiently.
Recent advances in quantum architectures and computing have motivated the development of new optimizing compilers for quantum programs or circuits. Even though steady progress has been made, existing quantum optimization techniques remain asymptotically and practically inefficient. Because many global quantum circuit optimization problems belong to the complexity class QMA (the quantum analog of NP) [51], it is not clear whether efficiency guarantees can be achieved. In this paper, we present an algorithm that achieves efficiency by aiming at a form of local optimality rather than global optimality. Our local-optimization algorithm cuts a circuit into subcircuits, optimizes each subcircuit with the specified oracle optimizer, and melds the subcircuits by optimizing across the cuts lazily as needed. To prove efficiency, we show that, under some assumptions, the main optimization phase of the algorithm requires a linear number of calls to the oracle optimizer. Our empirical results show that our local-optimization algorithm can outperform existing optimizers significantly, by more than an order of magnitude on average. Perhaps surprisingly, the algorithm achieves these improvements without noticeable degradation in optimization quality. These results show that local optimization can be effective for optimizing quantum circuits.
We present an implementation of multicontrolled () quantum gates that provides significant reductions of cost compared to state-of-the-art methods. The operator applied on the target qubit is a unitary, special unitary, or the Pauli X operator (multicontrolled Toffoli), and requires one clean ancilla, no ancilla, or one dirty ancilla, respectively. We generalize our methods for any number of target qubits, and provide further cost reductions if additional ancilla qubits are available. For each type of gate, we provide implementations for unrestricted (all-to-all) connectivity and for linear-nearest-neighbor (LNN) connectivity. All of the methods use a linear cost of gates from the Clifford+ T (fault-tolerant) set. In the context of LNN architecture, the cost and depth of our circuits scale linearly irrespective of the position of the qubits on which the gate is applied. Our methods directly improve the compilation process of many quantum algorithms, providing optimized circuits. Given the scale of our improvements, for example, the quadratic-to-linear controlled- count for LNN, they will naturally result in a large reduction of errors.
The Quantum Approximate Optimization Algorithm (QAOA) is one of the most promising candidates for achieving quantum advantage over classical computers. However, existing compilers lack specialized methods for optimizing QAOA circuits. There are circuit patterns inside the QAOA circuits, and current quantum hardware has specific qubit connectivity topologies. Therefore, we propose Coqa to optimize QAOA circuit compilation tailored to different types of quantum hardware. Our method integrates a linear nearest-neighbor (LNN) topology and efficiently map the patterns of QAOA circuits to the LNN topology by heuristically checking the interaction based on the weight of problem Hamiltonian. This approach allows us to reduce the number of SWAP gates during compilation, which directly impacts the circuit depth and overall fidelity of the quantum computation. By leveraging the inherent patterns in QAOA circuits, our approach achieves more efficient compilation compared to general-purpose compilers. With our proposed method, we are able to achieve an average of 30% reduction in gate count and a 39x acceleration in compilation time across our benchmarks.
Simple, precise, and robust control is demanded for qubit operations on large quantum information processors. However, existing routes to high-fidelity quantum control heavily rely on arbitrary waveform generators that are difficult to scale up. Here, we show that the arbitrary control of a quantum system can be achieved by simply turning the control fields on and off in a proper sequence. The switching instances can be designed using conventional quantum optimal control algorithms, while the required computational resources for matrix exponentials can be substantially reduced. We demonstrate the flexibility and robustness of the resulting control protocol, and illustrate it in the context of superconducting quantum circuits. We expect this proposal to be achievable with current semiconductor and superconductor technologies, which offers a significant step towards scalable quantum computing.