Relaxed Peephole Optimization: A Novel Compiler Optimization for Quantum Circuits

12/14/2020
by   Ji Liu, et al.
0

In this paper, we propose a novel quantum compiler optimization, named relaxed peephole optimization (RPO) for quantum computers. RPO leverages the single-qubit state information that can be determined statically by the compiler. We define that a qubit is in a basis state when, at a given point in time, its state is either in the X-, Y-, or Z-basis. When basis qubits are used as inputs to quantum gates, there exist opportunities for strength reduction, which replaces quantum operations with equivalent but less expensive ones. Compared to the existing peephole optimization for quantum programs, the difference is that our proposed optimization does not require an identical unitary matrix, thereby named `relaxed' peephole optimization. We also extend our approach to optimize the quantum gates when some input qubits are in known pure states. Both optimizations, namely the Quantum Basis-state Optimization (QBO) and the Quantum Pure-state Optimization (QPO), are implemented in the IBM's Qiskit transpiler. Our experimental results show that our proposed optimization pass is fast and effective. The circuits optimized with our compiler optimizations obtain up to 18.0 and up to 8.2 aggressive optimization level in the Qiskit compiler. When running on real quantum computers, the success rates of 3-qubit quantum phase estimation algorithm improve by 2.30X due to the reduced gate counts.

READ FULL TEXT
research
05/21/2022

Not All SWAPs Have the Same Cost: A Case for Optimization-Aware Qubit Routing

Despite rapid advances in quantum computing technologies, the qubit conn...
research
12/04/2019

A Verified Optimizer for Quantum Circuits

We present VOQC, the first fully verified compiler for quantum circuits,...
research
09/06/2021

QSSA: An SSA-based IR for Quantum Computing

Quantum computing hardware has progressed rapidly. Simultaneously, there...
research
06/29/2023

TrojanNet: Detecting Trojans in Quantum Circuits using Machine Learning

Quantum computing holds tremendous potential for various applications, b...
research
09/24/2018

T-count Optimized Quantum Circuits for Bilinear Interpolation

Quantum circuits for basic image processing functions such as bilinear i...
research
09/18/2019

Quantum process tomography with unknown single-preparation input states

Quantum Process Tomography (QPT) methods aim at identifying, i.e. estima...
research
01/29/2019

ReQWIRE: Reasoning about Reversible Quantum Circuits

Common quantum algorithms make heavy use of ancillae: scratch qubits tha...

Please sign up or login with your details

Forgot password? Click here to reset