Q-fid: Quantum Circuit Fidelity Improvement with LSTM Networks
Yikai Mao, Shaswot Shresthamali, Masaaki Kondo
TL;DR
Q-fid tackles the challenging problem of estimating quantum-circuit fidelity on NISQ devices amid fluctuating hardware noise and transpilation effects. It introduces an LSTM-based predictor that treats fidelity prediction as time-series forecasting on a text-based circuit representation, augmented by the discrete $R^2$ metric $d-R^2$ to quantify output fidelity. The approach is hardware-agnostic and capable of adapting to device drift without explicit calibration inputs, achieving an average RMSE of $0.0515$ and outperforming mapomatic by up to $24.7x$ in mean fidelity predictions. Practically, Q-fid enables better transpilation decisions and resource savings by prioritizing high-fidelity layouts and dynamically updating its model as hardware conditions change.
Abstract
The fidelity of quantum circuits (QC) is influenced by several factors, including hardware characteristics, calibration status, and the transpilation process, all of which impact their susceptibility to noise. However, existing methods struggle to estimate and compare the noise performance of different circuit layouts due to fluctuating error rates and the absence of a standardized fidelity metric. In this work, Q-fid is introduced, a Long Short-Term Memory (LSTM) based fidelity prediction system accompanied by a novel metric designed to quantify the fidelity of quantum circuits. Q-fid provides an intuitive way to predict the noise performance of Noisy Intermediate-Scale Quantum (NISQ) circuits. This approach frames fidelity prediction as a Time Series Forecasting problem to analyze the tokenized circuits, capturing the causal dependence of the gate sequences and their impact on overall fidelity. Additionally, the model is capable of dynamically adapting to changes in hardware characteristics, ensuring accurate fidelity predictions under varying conditions. Q-fid achieves a high prediction accuracy with an average RMSE of 0.0515, up to 24.7x more accurate than the Qiskit transpile tool mapomatic. By offering a reliable method for fidelity prediction, Q-fid empowers developers to optimize transpilation strategies, leading to more efficient and noise-resilient quantum circuit implementations.
