Source-linked AI summary
QuEst: Graph Transformer for Quantum Circuit Reliability Estimation
Hanrui Wang, Pengyu Liu, Jinglei Cheng, Zhiding Liang, Jiaqi Gu, Zirui Li, Yongshan Ding, Weiwen Jiang, Yiyu Shi, Xuehai Qian, David Z. Pan, Frederic T. Chong, Song Han
TL;DR
Noisy circuit reliability is costly to estimate, while prior prediction methods may not account for circuit structure or noisy backends. The paper uses a graph transformer trained on circuit data to estimate fidelity under noise. Across random and algorithm circuits, it reports low prediction error and over 200× speedup over circuit simulators.
Problem
Estimating noisy-circuit fidelity matters for reliability assessment, but simulation costs grow exponentially with qubit number and prior prediction approaches may ignore circuit structure or noisy backends.
Source: §1 · p. 2Method
The authors collect circuit outcomes from noisy simulators and real machines, encode circuits as graphs with gate and noise features, and train a graph transformer to estimate fidelity.
Source: §1 · p. 2Results
0.04 RMSE and over 0.95 R2 scores, with 200× speedup over circuit simulators, are reported across evaluations on about 5,000 circuits.
Source: §1 · p. 2Takeaways & Limitations
The dataset and models are integrated into TorchQuantum for research on machine learning for quantum-system problems.
Source: §6 · p. 9Randomized benchmarking typically assumes gate-independent errors and requires the benchmarked gate set to have group structure.
Source: §2.4 · p. 3
Abstract
from arXiv · showhide
Among different quantum algorithms, PQC for QML show promises on near-term devices. To facilitate the QML and PQC research, a recent python library called TorchQuantum has been released. It can construct, simulate, and train PQC for machine learning tasks with high speed and convenient debugging supports. Besides quantum for ML, we want to raise the community's attention on the reversed direction: ML for quantum. Specifically, the TorchQuantum library also supports using data-driven ML models to solve problems in quantum system research, such as predicting the impact of quantum noise on circuit fidelity and improving the quantum circuit compilation efficiency. This paper presents a case study of the ML for quantum part. Since estimating the noise impact on circuit reliability is an essential step toward understanding and mitigating noise, we propose to leverage classical ML to predict noise impact on circuit fidelity. Inspired by the natural graph representation of quantum circuits, we propose to leverage a graph transformer model to predict the noisy circuit fidelity. We firstly collect a large dataset with a variety of quantum circuits and obtain their fidelity on noisy simulators and real machines. Then we embed each circuit into a graph with gate and noise properties as node features, and adopt a graph transformer to predict the fidelity. Evaluated on 5 thousand random and algorithm circuits, the graph transformer predictor can provide accurate fidelity estimation with RMSE error 0.04 and outperform a simple neural network-based model by 0.02 on average. It can achieve 0.99 and 0.95 R$^2$ scores for random and algorithm circuits, respectively. Compared with circuit simulators, the predictor has over 200X speedup for estimating the fidelity.
1 Introduction
Noisy NISQ devices make circuit reliability estimation important, while circuit simulation can be prohibitively costly. The paper presents a graph-transformer approach, supported by a circuit dataset, to estimate fidelity under noise.
1 Introduction
- NISQ-stage qubits and gates have significant error, around 10^-3, which is described as a bottleneck to quantum advantages.PQC flexibility in circuit architecture and parameters offers space for noise mitigation and optimization.Source: §1 · pp. 1–2
- PST, measured by executing a circuit followed by its inverse, serves as a fidelity proxy and is strongly correlated with fidelity for random circuits.The figure reports a Spearman correlation of 0.993.Source: Figure 2 · p. 2, §1 · p. 2
- The work addresses ML for quantum-system research, complementing the better-studied use of quantum circuits for machine learning.TorchQuantum supports PQC construction, simulation, and training, as well as noise-mitigation techniques.Source: §1 · p. 2
- A graph transformer estimates noisy circuit fidelity from circuit graphs whose nodes encode gate, qubit, and noise features.Attention updates node features using graph neighbors, then fully connected layers regress PST.Source: §1 · p. 2
- 0.04 RMSE, over 0.95 R2 scores, and 200× speedup over circuit simulators are reported across evaluations on about 5,000 simulator and real-machine circuits.The dataset contains 20K simulation samples and 25K real-machine samples.Source: §1 · p. 2
2 Related Work
Related work covers quantum states and measurements, noise sources and mitigation, fidelity-estimation approaches, randomized benchmarking, and transformer models. It identifies limitations in prior prediction approaches and in randomized benchmarking assumptions.
2.1 Quantum Basics
- A qubit can occupy a superposition of basis states, and quantum gates manipulate qubit states while measurements probabilistically yield readouts.An n-qubit system can describe a linear combination of 2^n basis states.Source: §2.1 · pp. 2–3
2.2 Quantum Errors
- Quantum errors arise from qubit-environment interactions, control errors, and environmental interference; decoherence and gate-operation errors motivate characterization, calibration, and mitigation.Noise-mitigation approaches include noise-aware circuits and incorporating gate-error characteristics [29] [50].Source: §2.2 · p. 3
2.3 Fidelity Estimation and Prediction
- Prior fidelity-prediction methods include polynomial fitting and shallow neural networks, while some compilation methods use simple equations; these approaches are described as inaccurate and as ignoring circuit structure or noisy backends.The cited work treats the noisy backend as a black box.Source: §2.3 · p. 3
2.4 Randomized Benchmarking
- Randomized benchmarking estimates fidelity for selected gates or circuits and characterizes noise, but typically assumes gate-independent errors and requires a group-structured benchmarked gate set.These assumptions and requirements are stated as limitations of randomized benchmarking.Source: §2.4 · p. 3
2.5 Transformers
- Graph transformers update node features through attention, using a center node's query and neighboring nodes' keys and values.The passage also notes variants targeting feature extraction, attention complexity, and hardware latency.Source: §2.5 · p. 3
3 Circuit Fidelity Dataset
PST is used as a proxy for circuit fidelity, and its strong correlation with fidelity supports that choice. The dataset combines random and algorithm circuits measured on noisy simulators and real machines.
3 Circuit Fidelity Dataset
- The dataset-generation scheme provides researchers with training and evaluation data for fidelity prediction, a problem without an off-the-shelf dataset.The paper presents the scheme as a starting point for relevant researchers.Source: §3 · p. 3
3.1 Metrics
- 0.993 Spearman correlation between PST and fidelity across 1,400 simulator circuits supports PST as an accurate fidelity proxy.PST counts the proportion of all-zero outcomes after concatenating each circuit with its inverse.Source: §3.1 · p. 3
3.2 Dataset Generation
- Random circuits are generated from RZ, SX, X, and CNOT gates, then concatenated with their inverse before PST is measured.The inverse reverses gate order and replaces each gate with its inverse; a barrier prevents gate cancellation.Source: §3.2 · p. 4, Figure 3 · p. 4
3.3 Dataset Properties
- The datasets span circuit sizes and backend noise levels, with about 25,000 real-machine samples and 10,000 noisy-simulator samples for random circuits.They also include 30 circuits from common quantum algorithms; PST varies with gate count, CNOT count, circuit depth, and noise level.Source: §3.3 · p. 5
4 Predictor
The predictor represents circuits as graphs with gate and device-noise features, then uses graph attention and regression to estimate PST. Its random-circuit estimates achieve R2 above 0.95 in the reported scatter plots.
4.1 Graph Construction
- A directed acyclic graph represents each qubit, gate, or measurement as a node, with edges encoding the time-dependent order of gates.The graph connectivity can be encoded as an adjacency matrix and converted from circuits with TorchQuantum.Source: §4.1 · p. 5
4 Predictor
- R2 exceeds 0.95 for transformer PST estimates on randomly generated circuits across noisy simulators and five real machines.Figure 7 compares predicted PST with ground truth.Source: Figure 7 · p. 6
4.2 Node Features
- Each node’s 24-element feature vector encodes gate type, target qubit, backend calibration values, and node index, with a maximum of 10 qubits.Calibration features include T1 and T2 times, gate error rate, and readout error rates.Source: §4.2 · p. 6
4.3 Graph Transformer
- Graph-transformer attention uses shared Query, Key, and Value weights to aggregate neighboring-node features, followed by residual connection and layer normalization.Attention scores are normalized with softmax before weighting neighboring Value vectors.Source: §4.3 · p. 6
- After multiple layers, global average pooling and circuit-level features feed a three-layer regressor that predicts PST; the stated complexity is polynomial in qubit number.Global features include circuit depth, width, and counts of RZ, X, SX, and CNOT gates.Source: §4.3 · p. 7
5 Evaluation
The evaluation tests graph-transformer fidelity prediction on noisy simulators and real machines, compares it with a simple neural network, and analyzes feature, model-size, shot-count, and runtime choices.
5.1 Evaluation Methodology
- The evaluation trains two-layer, single-head graph transformers for 500 epochs and selects the best validation model; datasets use 70/20/10 training, validation, and test splits.The default model uses 24-dimensional node features and Adam with MSE loss; datasets cover random and algorithm circuits on noisy simulators and five IBM backends.Source: §5.1 · p. 7
5.2 Experimental Results
- Random-circuit prediction reaches R2 0.991 on simulators and above 0.95 on real machines; 30 algorithms reach R2 0.9985, while IBM Hanoi converges slower with around 0.05 final RMSE.The algorithm results use one common model for 30 circuits; separate models are trained for each backend setting on random circuits.Source: §5.2 · p. 7, Figure 8 · p. 8, Figure 9 · p. 8
5.3 Analysis
- Removing Qubit Index degrades accuracy across all three backends, and removing Gate Type also substantially harms accuracy; some removals improve real-machine results.The authors suggest qubit location and node type explain the first two effects, while real-backend noise fluctuations may explain improvements from some removals.Source: Table 2 · p. 7, §5.3 · pp. 7–8
- Adding global circuit features reduces test RMSE with negligible computational overhead, including an around 0.003 reduction on IBM Geneva.The features are concatenated with pooled node features.Source: §5.3 · p. 7
5.2 Experimental Results
- 0.02 lower average RMSE than the simple NN; on algorithm circuits the gap reaches 0.05, with R2 of 0.9985 versus 0.9110.The comparison uses test-set RMSE on random circuits across six benchmarks and on 30 algorithm circuits on noisy simulators.Source: §5.2 · p. 7, Figure 10 · p. 8
5.3 Analysis
- One layer slightly outperforms other depths on noisy simulators and IBM Hanoi, while three layers are best on IBM Geneva; two layers are used as a trade-off.The authors report that model size does not greatly affect accuracy overall.Source: Table 3 · p. 8, §5.3 · p. 8
- Increasing the number of shots improves ground-truth PST precision but does not guarantee better model accuracy.The ground-truth PST approaches the true PST as shots approach infinity.Source: Table 4 · p. 8, §5.3 · p. 8
- The predictor runs 200× faster than classical simulators at batch size 1 and 1.7K× faster at batch size 10 for PST estimation.Runtime averages were measured on an Nvidia 3090 GPU using 1,000 sampled random circuits.Source: Table 5 · p. 8, §5.3 · p. 8
6 Conclusion
The conclusion presents a graph-transformer case study for estimating noisy circuit fidelity in TorchQuantum. It frames circuit graphs as a way to predict fidelity with polynomial complexity instead of the exponential cost of full simulation.
6 Conclusion
- The paper presents this work as a case study of machine learning for quantum problems in TorchQuantum.The authors state that the datasets and models may accelerate research in ML and Quantum.Source: §6 · pp. 8–9
- The graph transformer processes circuit graphs with node feature vectors to predict fidelity under quantum noise.The study collects random and algorithm circuits and measures fidelity on simulators and real machines.Source: §6 · p. 9
- The proposed predictor evaluates fidelity with polynomial complexity, in contrast to the exponential cost of performing whole circuit simulations.The datasets and models are integrated into TorchQuantum.Source: §6 · p. 9
Related papers
This paper cites
- Attention Is All You Need2017
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
- Neural Machine Translation by Jointly Learning to Align and Translate2014
- Predicting Many Properties of a Quantum System from Very Few Measurements2020
- Trapped-Ion Quantum Computing: Progress and Challenges2019