Preprint
Article

This version is not peer-reviewed.

Spectral Gap Governs Eigenvalue Resolvability in Quantum Phase Estimation: Spectral Features Versus a Physical Baseline

Submitted:

03 October 2026

Posted:

06 October 2026

You are already at the latest version

Abstract
Can simple spectral properties of a quantum gate, computed classically from its eigenvalues, predict how well quantum phase estimation (QPE) performs on that gate? We study three spectral features, a normalised Spectral Coherence Metric (SCM), the spectral gap, and a circular phase spread, using ideal Qiskit Aer simulations of 1,756 two-qubit gates (1,000 Haar-random unitaries plus three controlled spectral classes) for m = 3, 4, 5 ancilla qubits and three independent random seeds. All prediction targets are measured from simulated QPE circuits. When QPE is run on single eigenstates, the spectral features have no predictive power for the estimation error (cross-validated R2 ≤ 0), because that error is fixed by the position of each eigenphase on the 2m-point measurement grid. When the target register is prepared in an equal superposition of eigenvectors, the spectral features do predict eigenvalue resolvability, the fraction of eigenphases that appear as separate peaks: for Haar-random gates with m = 4, a random forest reaches R2 = 0.633 ± 0.020, and the spectral gap dominates the feature importance (0.88). However, a parameter-light physical baseline that counts gaps larger than a multiple of the grid spacing 2π/2m matches the learned models in accuracy and exceeds them in balanced accuracy (0.78 versus at most 0.63). We conclude that spectral structure, through the spectral gap, governs resolvability in superposition-input QPE in the way expected from the standard resolution limit, and that machine learning adds little beyond this physical rule.
Keywords: 
;  ;  ;  ;  ;  

1. Introduction

Quantum phase estimation (QPE) estimates the eigenphases of a unitary operator and is a building block of many quantum algorithms [1,2,3]. With m ancilla (counting) qubits, QPE reads each eigenphase on a grid of 2 m points, so its intrinsic resolution is 2 π / 2 m . A natural question is whether simple spectral properties of a gate, computed classically from its eigenvalues, can predict how well QPE will perform on that gate without running the circuit.
Answering this question requires care. A useful prediction target must be measured from QPE itself, not computed from the same quantities used as inputs, otherwise any correlation holds by construction. The spectral features must also be defined so that they behave correctly for angles on a circle. In this work we therefore:
1.
define three spectral features with proper normalisation and circular statistics (Section 4);
2.
measure QPE performance directly from simulated circuits, for eigenstate inputs and for superposition inputs (Section 5Section 6);
3.
compare the learned models with a simple physical baseline, so that the contribution of machine learning can be judged fairly.
Our main findings are: (i) the spectral features do not predict QPE accuracy for eigenstate inputs; (ii) they do predict eigenvalue resolvability for superposition inputs, with the spectral gap as the dominant feature; and (iii) a gap-threshold rule derived from the QPE resolution limit performs as well as the learned models. The results are stable across three random seeds and three peak-detection thresholds.

3. Background

3.1. Spectral Decomposition

A gate on n qubits is a unitary U of dimension d = 2 n with spectral decomposition
U = ∑ k = 1 d e i θ k | ψ k 〉 〈 ψ k | , θ k ∈ [ 0 , 2 π ) ,
where { | ψ k 〉 } is an orthonormal eigenbasis. In this work n = 2 and d = 4 .

3.2. Quantum Phase Estimation

QPE works in five simple steps:
1.
start with all qubits in | 0 〉 ;
2.
prepare the target qubits in an eigenstate of U (or a superposition of eigenstates);
3.
apply a Hadamard gate H to every ancilla qubit, so each ancilla becomes an equal mix of | 0 〉 and | 1 〉 ;
4.
apply controlled powers U 2 j , so the phase θ moves onto the ancillas (phase kickback);
5.
apply the inverse quantum Fourier transform (IQFT), measure the ancillas, and read θ ≈ 2 π x ′ / N from the measured number x ′ .
The matrix of every gate and how it acts are given in Appendix A, and a complete worked example with numbers is given in Appendix B. A textbook treatment of the phase-estimation procedure is given in [3].
QPE uses m ancilla qubits and N = 2 m possible outcomes. After Hadamard gates on the ancillas and controlled powers U 2 j ( j = 0 , … , m − 1 ), an ancilla register that started with the target in eigenstate | ψ k 〉 holds
1 N ∑ x = 0 N − 1 e i x θ k | x 〉 ⊗ | ψ k 〉 .
The inverse quantum Fourier transform (IQFT) maps this state to the outcome distribution
P ( x ′ ∣ θ k ) = 1 N ∑ x = 0 N − 1 e i x θ k − 2 π x ′ / N 2 , x ′ = 0 , … , N − 1 .
If θ k = 2 π x 0 ′ / N for an integer x 0 ′ , all terms add in phase for x ′ = x 0 ′ and the outcome is certain; otherwise the probability spreads over neighbouring outcomes. Because QPE is linear, a target prepared in a superposition ∑ k c k | ψ k 〉 produces the mixture P ( x ′ ) = ∑ k | c k | 2 P ( x ′ ∣ θ k ) , so each eigenphase contributes its own peak. Two eigenphases closer than about one grid spacing 2 π / N produce overlapping peaks that cannot be separated.

4. Spectral Features

4.1. Spectral Coherence Metric

For sorted eigenphases θ 1 ≤ … ≤ θ d , the circular gaps are Δ θ k = θ k + 1 − θ k for k < d and Δ θ d = θ 1 + 2 π − θ d . The gaps always sum to 2 π , so their mean is 2 π / d . Their variance is largest when all eigenphases coincide, giving gaps ( 0 , … , 0 , 2 π ) :
Var max = 1 d ( d − 1 ) 2 π d 2 + 2 π − 2 π d 2 = ( 2 π ) 2 ( d − 1 ) d 2 ,
which is 3 π 2 / 4 for d = 4 . We define the Spectral Coherence Metric as
SCM = 1 − Var ( Δ θ ) ( 2 π ) 2 ( d − 1 ) / d 2 ,
which lies in [ 0 , 1 ] , equals 1 for evenly spaced phases, and equals 0 when all phases coincide.

Note.

Here k is only an index that numbers the eigenphases and their gaps ( k = 1 , … , d ); it is not a measurement outcome. The maximum variance comes from the most uneven case, in which all four eigenphases sit at the same point (for example 0 , 0 , 0 , 0 ). The gaps between neighbours are then 0 , 0 , 0 , and the last gap goes once around the circle back to the first phase, 0 + 2 π − 0 = 2 π , so the gaps are ( 0 , 0 , 0 , 2 π ) . Their mean is 2 π / 4 = π / 2 , and
Var max = 3 ( 0 − π / 2 ) 2 + ( 2 π − π / 2 ) 2 4 = 3 π 2 / 4 + 9 π 2 / 4 4 = 12 π 2 / 4 4 = 3 π 2 4 ≈ 7.40 .
For example, CNOT has eigenphases 0 , 0 , 0 , π , gaps ( 0 , 0 , π , π ) , mean π / 2 , and variance 4 · ( π / 2 ) 2 / 4 = π 2 / 4 , so SCM = 1 − ( π 2 / 4 ) / ( 3 π 2 / 4 ) = 1 − 1 / 3 ≈ 0.667 .

4.2. Spectral Gap

The spectral gap is the smallest circular distance between two eigenphases, Δ min = min j ≠ k d ( θ j , θ k ) , with d ( α , β ) = min ( | α − β | , 2 π − | α − β | ) . For sorted phases this equals the smallest circular gap between neighbours. Gates with repeated eigenvalues, including CNOT, SWAP, iSWAP, SWAP , CZ, and the two-qubit QFT, have Δ min = 0 .

4.3. Phase Spread

The ordinary standard deviation is not suitable for angles: phases at 350 ∘ and 10 ∘ are 20 ∘ apart on the circle but 340 ∘ apart numerically. We therefore use the circular spread
σ θ = 2 ( 1 − R ) , R = 1 d ∑ k = 1 d e i θ k ,
which is 0 when all phases coincide and stays finite when R = 0 [21].

5. Methods

5.1. Gate Ensembles

For each random seed we generate 1,756 two-qubit gates:
  • 1,000 Haar-random unitaries [22];
  • 250 uniform-spectrum gates: evenly spaced eigenphases with a random offset and Gaussian jitter ( σ = 0.10 rad);
  • 250 clustered-spectrum gates: each eigenphase near one of two opposite centres c and c + π , with random c and Gaussian spread σ = 0.15 rad;
  • 250 large-gap gates: every circular gap at least half of the uniform gap 2 π / d , with the remaining spacing drawn from a Dirichlet distribution and a random offset;
  • the six standard gates CNOT, SWAP, iSWAP, SWAP , CZ, and QFT, used only as sanity checks and excluded from training.
For the three controlled classes the eigenvalues are placed in a Haar-random eigenbasis. The random offsets prevent the eigenphases from aligning with the QPE grid by construction.

5.2. Eigen-Decomposition and Features

Eigenvalues and eigenvectors.

An eigenvector | ψ k 〉 of a gate U is a state whose direction the gate does not change; the gate only multiplies it by a number, the eigenvalue λ k :
U | ψ k 〉 = λ k | ψ k 〉 , λ k = e i θ k .
Because U is unitary, every eigenvalue lies on the unit circle, so it is fully described by its angle, the eigenphase θ k = arg ( λ k ) , shifted into [ 0 , 2 π ) . For example, λ = 1 = e i · 0 gives θ = 0 , and λ = − 1 = e i π gives θ = π ( 180 ∘ ). A 4 × 4 gate has four eigenvalues and four eigenvectors.

Computing them.

We obtain eigenphases and orthonormal eigenvectors from the complex Schur decomposition U = Z T Z † . For a unitary U, T is diagonal with the eigenvalues λ k on its diagonal, and the columns of Z are the eigenvectors, which stay orthonormal even when eigenvalues repeat (as for CNOT or SWAP).

From eigenvalues to features.

The three features of Section 4 are computed from the eigenvalues in three steps, before any circuit is run:
1.
convert each eigenvalue λ k to its eigenphase θ k ;
2.
sort the eigenphases and compute the four circular gaps (the last gap goes around the circle back to the first phase);
3.
compute SCM from the variance of the gaps, the spectral gap Δ min as the smallest gap, and the circular spread σ θ from R = 1 4 ∑ k λ k , which can be read directly from the eigenvalues.

Example (CNOT).

CNOT has eigenvalues λ = 1 , 1 , 1 , − 1 , so its eigenphases are 0 ∘ , 0 ∘ , 0 ∘ , 180 ∘ . The gaps are 0 ∘ , 0 ∘ , 180 ∘ , and 0 ∘ + 360 ∘ − 180 ∘ = 180 ∘ , with mean 90 ∘ . Then:
  • gap variance = [ ( 0 − 90 ) 2 + ( 0 − 90 ) 2 + ( 180 − 90 ) 2 + ( 180 − 90 ) 2 ] / 4 = 8100 (in degrees squared); the maximum variance 3 π 2 / 4 is 24 , 300 in degrees squared, so SCM = 1 − 8100 / 24 , 300 = 1 − 0.333 = 0.667 ;
  • spectral gap = min ( 0 , 0 , 180 , 180 ) = 0 ;
  • R = | ( 1 + 1 + 1 − 1 ) / 4 | = 0.5 , so σ θ = 2 ( 1 − 0.5 ) = 1.0 .
These values match Table 1. The same three steps are applied to every gate in the study.

5.3. QPE Circuits and Simulation

The target register is prepared in the equal superposition | ϕ 〉 = 1 2 ∑ k = 1 4 | ψ k 〉 by a unitary whose first column is | ϕ 〉 . The ancillas receive Hadamard gates, followed by controlled U 2 j built as Z diag ( e i 2 j θ k ) Z † , the IQFT, and measurement of the ancillas. We use m ∈ { 3 , 4 , 5 } ancillas ( N = 8 , 16 , 32 ), 4,096 shots, and the ideal (noiseless) Qiskit Aer simulator [23]. The study is repeated for seeds 42, 43, and 44, each with newly generated gates and new measurement samples, giving 15,804 dataset rows in total.

5.4. Targets

All targets are computed from the measured outcome histogram P ( x ′ ) , never from the input features, so that no relation between inputs and targets holds by construction. We define:
  • Number of peaks  n pk : the number of circular local maxima with P ( x ′ ) ≥ 0.05 , capped at 4;
  • Resolvability  y res = n pk / 4 , the fraction of eigenphases that appear as separate peaks;
  • Phase error  y err : the mean, over the four eigenphases, of the circular distance from each eigenphase to the nearest peak position 2 π x ′ / N .
To test sensitivity to the peak threshold, y res is also computed with thresholds 0.03 and 0.08.

5.5. Physical Baseline

The resolution limit suggests a rule that needs no learning: neighbouring eigenphases form separate peaks when their gap exceeds a multiple of the grid spacing. Given the four sorted circular gaps Δ ( 1 ) ≤ … ≤ Δ ( 4 ) , the baseline predicts
n ^ pk = max 1 , { k : Δ ( k ) ≥ c · 2 π / N } ,
with the single constant c chosen from { 0.20 , 0.25 , … , 3.00 } to maximise accuracy on the training folds only. For regression, the baseline predicts n ^ pk / 4 . Note that the baseline uses all four gaps, whereas the learned models use only SCM, Δ min , and σ θ .

5.6. Learning and Evaluation

For regression of y res and y err we compare linear regression, a random forest [24] (200 trees, maximum depth 5), and gradient boosting (scikit-learn defaults) [25]. Because n pk takes only four values, we also treat it as a classification task with a majority-class predictor, multinomial logistic regression on standardised features, a random forest classifier, and a gradient boosting classifier. All models are evaluated by five-fold cross-validation (stratified for classification) on pooled out-of-fold predictions, separately for (a) Haar-random gates only and (b) all random gates. Results are reported as mean ± standard deviation over the three seeds. The Haar-only subset is our primary setting, because in the pooled subset part of the signal comes from distinguishing the gate classes themselves.

5.7. Preliminary Eigenstate-Input Experiment

Before the main study, we ran QPE separately on each eigenvector (rather than on a superposition) for 400 random gates (100 per class, seed 42) with m = 3 , 4,096 shots, and a depolarising plus readout noise model, and used the same three spectral features to predict the noisy success probability and the mean phase error.

6. Results

6.1. Eigenstate Inputs: Spectral Features Do Not Predict QPE Accuracy

For Haar-random gates with eigenstate inputs, the three spectral features gave negative cross-validated R 2 for both targets (success probability: − 0.25 random forest, − 0.11 linear; mean phase error: − 0.22 and − 0.10 ). The error for an eigenstate input is determined by the distance of each eigenphase to the nearest grid point 2 π x ′ / N (Eqaution (3)), which none of the spectral features describe. Adding this grid distance as a feature made the mean phase error exactly predictable by linear regression ( R 2 = 1.000 ), but only because, for an eigenstate input, the error essentially equals that distance multiplied by the grid spacing. We therefore focus on superposition inputs, where the spacing between eigenphases has a physical effect.

6.2. Sanity Check with Standard Gates

Table 1 lists the corrected features of the six standard gates. Each has repeated eigenvalues, so Δ min = 0 , and the number of detected peaks equals the number of distinct eigenvalues (two for CNOT, SWAP, SWAP , and CZ; three for iSWAP and QFT) at every m, as expected.

6.3. Class-Level Behaviour

Table 2 shows mean features and resolvability per class for m = 4 (seed 42). Clustered gates have a small spectral gap and resolve only about half of their eigenphases, while the uniform and large-gap classes are always fully resolved. Haar-random gates lie in between, which makes them the informative setting for prediction.

6.4. Regression of Resolvability

Table 3 reports cross-validated R 2 and mean absolute error (MAE) for Haar-random gates. For m = 4 the random forest reaches R 2 = 0.633 ± 0.020 , ahead of gradient boosting ( 0.592 ) and linear regression ( 0.477 ). The physical baseline has a lower R 2 ( 0.443 ) but the lowest MAE ( 0.025 ), because it predicts exact peak counts and is correct for most gates, while the regressors predict intermediate values. For m = 3 the baseline fails ( R 2 = − 0.045 ), since with only eight grid points the overlap of peaks depends on more than the gap sizes. When all random gates are pooled, R 2 rises to 0.935 (random forest), 0.930 (gradient boosting), 0.899 (baseline), and 0.861 (linear) for m = 4 , mostly because clustered gates are easy to separate from the other classes.
For m = 4 and Haar-random gates (seed 42), the random forest assigns importance 0.88 to Δ min , 0.07 to SCM, and 0.05 to σ θ . The Pearson correlations with y res are 0.68 for Δ min , 0.58 for SCM, and 0.30 for σ θ . As m increases from 3 to 5, almost all Haar-random gates become fully resolved (mean y res of 0.70, 0.95, and 0.99), so m = 4 gives the most informative spread of outcomes.

6.5. Classification of the Number of Peaks

Table 4 reports accuracy and balanced accuracy. Because most Haar-random gates are fully resolved at m = 4 , the majority-class predictor already reaches 0.795 accuracy, and all learned models reach about 0.90. Balanced accuracy, which weights the rare partly resolved cases equally, separates the methods: the physical baseline reaches 0.779, compared with 0.625 for logistic regression, 0.594 for gradient boosting, and 0.555 for the random forest. The learned models mostly predict the dominant class, whereas the gap rule identifies the partly resolved gates more reliably.

6.6. Phase Error

For superposition inputs, the spectral features predict the mean phase error only weakly: for Haar-random gates at m = 4 the cross-validated R 2 is 0.291 ± 0.037 for the random forest, 0.266 for gradient boosting, and 0.187 for linear regression. As with eigenstate inputs, the phase error is controlled mainly by where the eigenphases fall relative to the measurement grid.

6.7. Robustness

The main result is stable across seeds (random forest R 2 = 0.633 ± 0.020 for m = 4 ). Changing the peak threshold from 0.05 to 0.03 or 0.08 left the cross-validated results unchanged ( R 2 = 0.633 in all three cases), because the detected peaks are well separated from the threshold. In an earlier noisy run ( m = 3 , depolarising and 2% readout noise), the mean resolvability per class differed from the noiseless value by at most 0.008 (for example, 0.705 versus 0.707 for Haar-random gates), indicating that low noise does not change the conclusions.

7. Discussion

The results separate two properties of QPE that are easily conflated. Phase accuracy depends on the position of each eigenphase relative to the 2 m -point measurement grid and is not predicted by the spectral features. Eigenvalue resolvability, which matters when the input is a superposition of eigenstates, depends on how far apart the eigenphases are, and is predicted mainly by the spectral gap.
This second finding agrees with the standard QPE resolution limit: two eigenphases closer than about 2 π / 2 m produce overlapping peaks. A single-parameter rule based on this limit performs as well as the learned models in accuracy and better in balanced accuracy. The higher R 2 of the random forest mainly reflects that it predicts smooth intermediate values for uncertain cases, which reduces squared error but does not identify partly resolved gates more reliably. The value of machine learning in this setting is therefore limited; the learned models largely recover the known physics rather than revealing new structure. The SCM and phase spread add little information beyond the spectral gap once the gap is known.

7.1. Limitations

The study has several limitations. All main results use ideal simulation; the noise check was limited to a simple depolarising and readout model. Only two-qubit gates were studied. The superposition input requires the eigenvectors to be known, so the setting is a diagnostic study rather than QPE on an unknown unitary. Resolvability depends on a peak-detection rule, although we found it insensitive to the threshold. Finally, y res takes only four values, which limits the attainable R 2 in regression.

7.2. Future work

Natural extensions are realistic noise models with amplitude damping and dephasing ( T 1 , T 2 ) and hardware calibration data, validation on quantum hardware, gates on three or more qubits, input states that are only approximately aligned with the eigenbasis, and an analytic expression for the probability that a given set of eigenphases is resolved at a given m, against which learned models could be compared directly.

8. Conclusions

With properly normalised spectral features and targets measured from simulated circuits, spectral features do not predict QPE accuracy for eigenstate inputs, but they do predict eigenvalue resolvability for superposition inputs ( R 2 = 0.633 ± 0.020 for Haar-random gates at m = 4 ), with the spectral gap as the dominant feature. A simple rule based on the QPE resolution limit performs as well as the learned models. The spectral gap therefore governs resolvability in QPE in the way expected from theory, and machine learning mainly recovers this known physics rather than adding new predictive structure.

Data Availability Statement

All results were produced with Qiskit, Qiskit Aer, and scikit-learn in Google Colab, using fixed random seeds (42, 43, 44). The simulation code, the dataset (15,804 rows), and the evaluation results are available at https://github.com/sameekshya1999/qpe-spectral-resolvability/blob/main/.

Appendix A. Gates Used in QPE, in Simple Form

This appendix lists every gate used in the QPE circuit, its matrix, and how it acts, with the arithmetic shown. Textbook introductions to qubits, single-qubit gates, tensor products, and controlled operations are given in [3]. We use the textbook qubit ordering; software such as Qiskit may list qubits in the reverse order, which does not change any result.

Appendix A.1. Qubits as Vectors

A single qubit is a vector of two numbers. The first number is the amplitude of | 0 〉 and the second is the amplitude of | 1 〉 :
| 0 〉 = 1 0 , | 1 〉 = 0 1 .
The probability of measuring an outcome is the squared size of its amplitude. Several qubits are combined with the tensor product ⊗, which multiplies every number of the first vector by the whole second vector. For example,
| 11 〉 = | 1 〉 ⊗ | 1 〉 = 0 1 ⊗ 0 1 = 0 · 0 0 · 1 1 · 0 1 · 1 = 0 0 0 1 ,
where the four positions stand for | 00 〉 , | 01 〉 , | 10 〉 , | 11 〉 . A register of n qubits is a vector of 2 n numbers.

Appendix A.2. Pauli-X Gate

The X gate flips a qubit:
X = 0 1 1 0 , X | 0 〉 = 0 · 1 + 1 · 0 1 · 1 + 0 · 0 = 0 1 = | 1 〉 , X | 1 〉 = | 0 〉 .
In textbook QPE with U = CP ( θ ) , two X gates turn the target | 00 〉 into the eigenstate | 11 〉 . In this study the target is instead prepared with the unitary W of Appendix A.4.

Appendix A.3. Hadamard Gate

The Hadamard gate creates an equal superposition:
H = 1 2 1 1 1 − 1 , H | 0 〉 = 1 2 1 · 1 + 1 · 0 1 · 1 + ( − 1 ) · 0 = 1 2 1 1 = | 0 〉 + | 1 〉 2 ,
and in the same way H | 1 〉 = ( | 0 〉 − | 1 〉 ) / 2 . After H, each outcome has probability ( 1 / 2 ) 2 = 1 / 2 . Applying H to all m ancillas gives every m-bit string x with equal weight:
H ⊗ m | 0 〉 ⊗ m = | 0 〉 + | 1 〉 2 ⊗ m = 1 N ∑ x = 0 N − 1 | x 〉 , N = 2 m .
For m = 3 , the factor is ( 1 / 2 ) 3 = 1 / 8 and the eight strings are 000 , 001 , … , 111 . Applying H again reverses this: H ( | 0 〉 + | 1 〉 ) / 2 = | 0 〉 and H ( | 0 〉 − | 1 〉 ) / 2 = | 1 〉 .

Appendix A.4. Target Preparation

Let Z be the matrix whose columns are the eigenvectors | ψ k 〉 of U. The superposition used in this study is
| ϕ 〉 = 1 2 ∑ k = 1 4 | ψ k 〉 .
It is prepared by any unitary W whose first column equals | ϕ 〉 , because then W | 00 〉 = W ( 1 , 0 , 0 , 0 ) T = | ϕ 〉 . Each eigenvector has weight ( 1 / 2 ) 2 = 1 / 4 .

Appendix A.5. The Gate Under Test, U

Each tested gate is a 4 × 4 unitary written through its eigenphases and eigenvectors,
U = Z diag e i θ 1 , e i θ 2 , e i θ 3 , e i θ 4 Z † , U | ψ k 〉 = e i θ k | ψ k 〉 .
For example, a uniform-spectrum gate with phases 0 ∘ , 90 ∘ , 180 ∘ , 270 ∘ and Z = I is
U = diag ( 1 , i , − 1 , − i ) ,
using e i θ = cos θ + i sin θ (for example e i 90 ∘ = 0 + i · 1 = i ). A random Z changes the matrix entries but not the four eigenphases. Repeating U multiplies the phases:
U 2 j = Z diag e i 2 j θ 1 , … , e i 2 j θ 4 Z † .

Appendix A.6. Controlled-U Gate and Phase Kickback

A controlled-U gate applies U to the target only when the control (ancilla) qubit is | 1 〉 :
C U = | 0 〉 〈 0 | ⊗ I + | 1 〉 〈 1 | ⊗ U = I 0 0 U ,
where each block is 4 × 4 . With the ancilla in ( | 0 〉 + | 1 〉 ) / 2 and the target in an eigenstate | ψ k 〉 :
C U | 0 〉 + | 1 〉 2 ⊗ | ψ k 〉 = | 0 〉 ⊗ | ψ k 〉 + | 1 〉 ⊗ U | ψ k 〉 2 = | 0 〉 ⊗ | ψ k 〉 + e i θ k | 1 〉 ⊗ | ψ k 〉 2 = | 0 〉 + e i θ k | 1 〉 2 ⊗ | ψ k 〉 .
The target is unchanged, and the phase e i θ k now sits on the ancilla. This is phase kickback. Ancilla j is connected to U 2 j , so it receives the phase 2 j θ k . Together, the ancilla string x collects the phase x θ k , because each ancilla that is 1 adds its own 2 j θ k :
1 N ∑ x = 0 N − 1 e i x θ k | x 〉 ⊗ | ψ k 〉 .
For example, x = 5 = 101 2 collects 4 θ k + θ k = 5 θ k .

Appendix A.7. Inverse Quantum Fourier Transform

The IQFT is the inverse of the quantum Fourier transform [3]. It acts on each ancilla string x as
IQFT | x 〉 = 1 N ∑ x ′ = 0 N − 1 e − 2 π i x x ′ / N | x ′ 〉 ,
so its matrix entries are ( IQFT ) x ′ x = e − 2 π i x x ′ / N / N . For one qubit ( N = 2 ) the entries are e 0 = 1 and e − i π = − 1 , so the IQFT is exactly the Hadamard gate. The minus sign turns each phase back: for the guess x ′ , term x is turned back by x · 2 π x ′ / N . Applying the IQFT to the state above and combining the two factors 1 / N gives
∑ x ′ = 0 N − 1 1 N ∑ x = 0 N − 1 e i x ( θ k − 2 π x ′ / N ) | x ′ 〉 ⊗ | ψ k 〉 ,
which leads to Equation (3). When θ k = 2 π x ′ / N , every term in the bracket equals e 0 = 1 , so the bracket equals N / N = 1 and the outcome x ′ is certain. For any other x ′ , the terms point in different directions on the circle and cancel.

Appendix A.8. Gates Inside a Circuit IQFT

On hardware, the IQFT is built from small gates: Hadamard gates, controlled-phase gates, and SWAP gates [3],
CP ( λ ) = diag ( 1 , 1 , 1 , e i λ ) , SWAP = 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 .
SWAP exchanges two qubits and puts the output bits in the right order. CP ( − π / 2 k ) removes part of a phase when the control qubit is | 1 〉 (since e − i π / 2 · i = − i · i = 1 , for example). H then turns a phase of 0 into | 0 〉 and a phase of π into | 1 〉 . For m ancillas this uses ⌊ m / 2 ⌋ SWAPs, m ( m − 1 ) / 2 controlled-phase gates, and m Hadamard gates. Their product equals the IQFT matrix above, so this paper uses the IQFT formula directly.

Appendix A.9. Measurement

Measuring the ancillas gives outcome x ′ with probability P ( x ′ ) = | amplitude of x ′ | 2 , and the estimate is θ ^ = 2 π x ′ / N . Repeating the circuit for 4,096 shots gives the histogram used to count peaks.

Appendix B. Worked Example

We follow QPE step by step for m = 3 ancillas ( N = 8 , grid spacing 360 ∘ / 8 = 45 ∘ ), a target eigenstate | ψ 〉 , and θ = 90 ∘ .

Step 1: start.

| Ψ 0 〉 = | 000 〉 ⊗ | ψ 〉 .

Step 2: Hadamard gates.

| Ψ 1 〉 = 1 8 ∑ x = 0 7 | x 〉 ⊗ | ψ 〉 , with each of the 8 strings having probability 1 / 8 .

Step 3: controlled powers.

Each string x gains e i x · 90 ∘ :
x 0 1 2 3 4 5 6 7
x · 90 ∘ 0 ∘ 90 ∘ 180 ∘ 270 ∘ 360 ∘ 450 ∘ 540 ∘ 630 ∘
e i x · 90 ∘ 1 i − 1 − i 1 i − 1 − i

Step 4: IQFT.

For each guess x ′ , each term is turned back by x · x ′ · 45 ∘ , so the remaining turn per step is 90 ∘ − x ′ · 45 ∘ . The amplitude is the sum of the eight terms divided by 8:
x ′ Turn per step Sum of 8 terms Probability
0 90 ∘ 1 + i − 1 − i + 1 + i − 1 − i = 0 0
1 45 ∘ 0 (one full turn) 0
2 0 ∘ 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 8 ( 8 / 8 ) 2 = 1
3 − 45 ∘ 0 0
4 − 90 ∘ 0 0
5 − 135 ∘ 0 0
6 − 180 ∘ 1 − 1 + 1 − 1 + … = 0 0
7 − 225 ∘ 0 0
So | Ψ 2 〉 = | 010 〉 ⊗ | ψ 〉 .

Step 5: measure.

Every shot gives 010, so x ′ = 2 and θ ^ = 360 ∘ × 2 / 8 = 90 ∘ , which is exact.

When θ is between grid points.

For θ = 27 ∘ , no guess cancels the turn exactly. The closest guess x ′ = 1 ( 45 ∘ ) leaves − 18 ∘ per step; the eight terms nearly line up, with total length sin ( 72 ∘ ) / sin ( 9 ∘ ) ≈ 6.08 , so P ( x ′ = 1 ) = ( 6.08 / 8 ) 2 ≈ 0.58 . The guess x ′ = 0 gives P ≈ 0.26 , and the remaining probability spreads over the other outcomes. This spread is why the phase error depends on where θ falls relative to the grid.

Superposition input.

If the target is the equal superposition of Appendix A.4, the histogram is the average of four such patterns, one per eigenphase, each with weight 1 / 4 . Two eigenphases closer than about one grid spacing produce overlapping patterns and appear as a single peak, which is what the resolvability target measures.

References

  1. Kitaev, A. Yu. Quantum measurements and the Abelian stabilizer problem. arXiv 1995, arXiv:quant. [Google Scholar]
  2. Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. Quantum algorithms revisited. Proc. R. Soc. Lond. A 1998, vol. 454, 339–354. [Google Scholar] [CrossRef]
  3. Nielsen, M. A.; Chuang, I. L. Quantum Computation and Quantum Information; Cambridge University Press, 2000. [Google Scholar]
  4. Shor, P. W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 1997, vol. 26(no. 5), 1484–1509. [Google Scholar] [CrossRef]
  5. Abrams, D. S.; Lloyd, S. Quantum algorithm providing exponential speed increase for finding eigenvalues and eigenvectors. Phys. Rev. Lett. 1999, vol. 83, 5162. [Google Scholar] [CrossRef]
  6. Aspuru-Guzik, A.; Dutoi, A. D.; Love, P. J.; Head-Gordon, M. Simulated quantum computation of molecular energies. Science 2005, vol. 309, 1704–1707. [Google Scholar] [CrossRef] [PubMed]
  7. Harrow, A. W.; Hassidim, A.; Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 2009, vol. 103, 150502. [Google Scholar] [CrossRef] [PubMed]
  8. Dobšíček, M.; Johansson, G.; Shumeiko, V.; Wendin, G. Arbitrary accuracy iterative quantum phase estimation algorithm using a single ancillary qubit: A two-qubit benchmark. Phys. Rev. A 2007, vol. 76, 030306(R). [Google Scholar] [CrossRef]
  9. Svore, K. M.; Hastings, M. B.; Freedman, M. Faster phase estimation. Quantum Inf. Comput. 2014, vol. 14(no. 3–4), 306–328. [Google Scholar] [CrossRef]
  10. Wiebe, N.; Granade, C. Efficient Bayesian phase estimation. Phys. Rev. Lett. 2016, vol. 117, 010503. [Google Scholar] [CrossRef] [PubMed]
  11. Kimmel, S.; Low, G. H.; Yoder, T. J. Robust calibration of a universal single-qubit gate set via robust phase estimation. Phys. Rev. A 2015, vol. 92, 062315. [Google Scholar] [CrossRef]
  12. Lin, L.; Tong, Y. Heisenberg-limited ground-state energy estimation for early fault-tolerant quantum computers. PRX Quantum 2022, vol. 3, 010318. [Google Scholar] [CrossRef]
  13. Knill, E.; et al. Randomized benchmarking of quantum gates. Phys. Rev. A 2008, vol. 77, 012307. [Google Scholar] [CrossRef]
  14. Magesan, E.; Gambetta, J. M.; Emerson, J. Scalable and robust randomized benchmarking of quantum processes. Phys. Rev. Lett. 2011, vol. 106, 180504. [Google Scholar] [CrossRef] [PubMed]
  15. Blume-Kohout, R.; et al. Demonstration of qubit operations below a rigorous fault tolerance threshold with gate set tomography. Nat. Commun. 2017, vol. 8, 14485. [Google Scholar] [CrossRef] [PubMed]
  16. Eisert, J.; et al. Quantum certification and benchmarking. Nat. Rev. Phys. 2020, vol. 2, 382–390. [Google Scholar] [CrossRef]
  17. Makhlin, Y. Nonlocal properties of two-qubit gates and mixed states, and the optimization of quantum computations. Quantum Inf. Process. 2002, vol. 1, 243–252. [Google Scholar] [CrossRef]
  18. Zhang, J.; Vala, J.; Sastry, S.; Whaley, K. B. Geometric theory of nonlocal two-qubit operations. Phys. Rev. A 2003, vol. 67, 042313. [Google Scholar] [CrossRef]
  19. Carleo, G.; et al. Machine learning and the physical sciences. Rev. Mod. Phys. 2019, vol. 91, 045002. [Google Scholar] [CrossRef]
  20. Torlai, G.; Mazzola, G.; Carrasquilla, J.; Troyer, M.; Melko, R.; Carleo, G. Neural-network quantum state tomography. Nat. Phys. 2018, vol. 14, 447–450. [Google Scholar] [CrossRef]
  21. Mardia, K. V.; Jupp, P. E. Directional Statistics; Wiley, 2000. [Google Scholar]
  22. Mezzadri, F. How to generate random matrices from the classical compact groups. Not. AMS 2007, vol. 54(no. 5), 592–604. [Google Scholar]
  23. Javadi-Abhari, A.; et al. Quantum computing with Qiskit. arXiv 2024, arXiv:2405.08810. [Google Scholar]
  24. Breiman, L. Random forests. Mach. Learn. 2001, vol. 45, 5–32. [Google Scholar] [CrossRef]
  25. Pedregosa, F.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, vol. 12, 2825–2830. [Google Scholar]
Table 1. Spectral features of standard gates and number of QPE peaks (superposition input).
Table 1. Spectral features of standard gates and number of QPE peaks (superposition input).
Gate SCM Δ min σ θ n pk
CNOT 0.667 0 1.000 2
SWAP 0.667 0 1.000 2
iSWAP 0.833 0 1.000 3
SWAP 0.500 0 0.647 2
CZ 0.667 0 1.000 2
QFT 0.833 0 1.137 3
Table 2. Mean spectral features and resolvability per gate class ( m = 4 , seed 42).
Table 2. Mean spectral features and resolvability per gate class ( m = 4 , seed 42).
Class SCM Δ min (rad) σ θ y res
Clustered 0.639 0.075 1.002 0.469
Haar 0.944 0.849 1.246 0.946
Large gap 0.952 0.996 1.235 1.000
Uniform 0.997 1.404 1.382 1.000
Table 3. Regression of resolvability y res , Haar-random gates, five-fold cross-validation, mean ± s.d. over three seeds.
Table 3. Regression of resolvability y res , Haar-random gates, five-fold cross-validation, mean ± s.d. over three seeds.
m Model R 2 MAE
3 Random forest 0.412 ± 0.047 0.088
Gradient boosting 0.399 ± 0.048 0.088
Linear 0.306 ± 0.019 0.090
Baseline − 0.045 ± 0.070 0.085
4 Random forest 0 . 633 ± 0 . 020 0.029
Gradient boosting 0.592 ± 0.044 0.032
Linear 0.477 ± 0.010 0.060
Baseline 0.443 ± 0.065 0.025
5 Random forest 0.630 ± 0.068 0.005
Gradient boosting 0.461 ± 0.125 0.005
Linear 0.151 ± 0.043 0.020
Baseline 0.491 ± 0.136 0.004
Table 4. Classification of the number of peaks, Haar-random gates, mean over three seeds (accuracy / balanced accuracy).
Table 4. Classification of the number of peaks, Haar-random gates, mean over three seeds (accuracy / balanced accuracy).
Model m = 3 m = 4 m = 5
Majority class 0.627 / 0.250 0.795 / 0.333 0.969 / 0.500
Logistic regression 0.743 / 0.462 0.904 / 0.625 0.986 / 0.789
Random forest 0.722 / 0.424 0.897 / 0.555 0.986 / 0.845
Gradient boosting 0.723 / 0.455 0.890 / 0.594 0.983 / 0.855
Baseline (gap rule) 0.670 / 0.573 0.899 / 0.779 0.987 / 0.845
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.