betaFeedback

WorksPhysics and Astronomy

Turning Quantum Compiler Configuration Selection Upside Down: A Top-Down Paradigm

Abstract

Selecting an effective quantum compiler configuration requires coordinated decisions over both hardware targets and compiler settings, with the ultimate goal of improving circuit execution fidelity. Existing SOTA approaches typically decompose this problem into two sequential stages: a device is chosen first, after which compiler options are tuned on that device through RL-based search. This bottom-up strategy can be fundamentally limited by its initial device decision, since a poorly matched backend may constrain the best fidelity achievable regardless of how effectively later compiler options are optimized. In contrast to classical compiler tuning, where the search space is often prohibitively large, the configuration space of quantum compilers remains manageable enough to support exhaustive search. Consequently, rather than repeatedly searching from candidate configurations, one can derive reusable configuration knowledge from offline oracle results and apply it directly to new circuits. In this paper, we introduce a top-down configuration-selection paradigm and build QuOPTBench, an exhaustively searched benchmark containing oracle configurations for 268 quantum circuits. We first study whether LLMs can directly infer suitable configurations and evaluate ten representative LLMs. The results reveal that vanilla LLMs remain far from the oracle. We then employ an LLM to extract transferable rules from sampled circuits governing configuration selection. Using these rules together with predictors trained on the enumerated configuration data of the sampled circuits, we design QuTOP, a rule-guided ML framework that performs fast configuration selection without iterative online search. Across our evaluation, the distilled rules consistently strengthen LLM-based selection, while QuTOP provides the strongest overall balance between solution quality and selection latency among the baselines.

Introduction

Quantum computing has rapidly advanced with the development of both quantum hardware and software [5, 22, 32, 46]. Unlike compilation for classical programs, quantum compilation must account for noisy and error-prone quantum hardware. Therefore, the quality of a compiled circuit on a target device is commonly measured by execution fidelity [28], which reflects the combined effects of compilation and hardware characteristics, such as topology and gate errors.

As illustrated in Figure 1a, quantum compilation involves two closely coupled decisions. The first is device selection. Since different quantum devices have distinct gate error rates and connectivity topology, selecting a suitable device for each circuit is critical to maximizing execution fidelity, analogous to routing requests to appropriate LLMs [16]. The second is option selection, which determines how the circuit is compiled for the selected device through stages including layout, routing, translation, etc. Importantly, first-stage device decision defines the hardware constraints and error characteristics for all subsequent compilation stages.

Workflow and motivation for quantum compiler configuration selection

Figure 1. Workflow and motivation for quantum compiler configuration selection.

Taking the widely used IBM Qiskit compiler [26] as an example, users can configure optimization levels from O0O_0 to O3O_3, as well as methods including layout, routing, etc. Although O3O_3 applies the most complex optimization flow, neither O3O_3 nor any method is universally optimal across circuits.

Figure 1b illustrates the impact of both device and option selection. Under a fixed O3O_3 configuration, the ising_n10 circuit achieves substantially different execution fidelities (measured by Hellinger fidelity [27]) across devices; on a fixed device, varying the optimization level from O0O_0 to O3O_3 also leads to clear differences, with O1O_1 achieving about 0.20 fidelity compared with only 0.12 for O3O_3. This shows that neither a fixed device nor the O3O_3 option is consistently optimal.

This observation is further supported by our later evaluation, where we exhaustively enumerate the considered devices and compiler options for 268 circuits. Under our compilation settings, 213 cases (79.5%) have at least one capacity-feasible device whose best achievable fidelity (measured by estimated fidelity [49, 50]) across all option combinations is still lower than the default O3O_3 configuration fidelity on another feasible device. This result shows that an unfavorable device choice can impose a fidelity ceiling that subsequent option selection cannot overcome.

Therefore, we formulate the joint selection of suitable devices and compiler options for quantum circuits as quantum compiler configuration selection. In classical compilers, a similar problem is compiler auto-tuning, which has been addressed using heuristic search [6, 17, 24, 44, 64, 65], reinforcement learning (RL) [9, 12, 37, 45], and more recently LLMs [11, 43, 48]. Heuristic and RL-based methods typically start from candidate configurations and iteratively improve them using predefined rules or performance feedback, even though a trained RL agent can perform direct inference. We refer to this as a bottom-up search paradigm, whose selection knowledge is acquired by iteratively evaluating candidate configurations and learning from feedback. In contrast, LLMs can directly reason about suitable configurations, resembling a direct selection process.

Candidate Configurations →\rightarrow Evaluation →\rightarrow Better Configuration

Bottom-Up Search

Additionally, classical compiler auto-tuning typically assumes a fixed target platform and may involve extremely large flag or pass spaces, e.g., up to 126 flags (21262^{126} search space) in a recent GCC auto-tuning study [47]. Quantum compiler configuration differs in two important aspects. First, the target device is itself a selection dimension. The state-of-the-art (SOTA) method [50] adopts a two-stage workflow, using an ML model for device selection and an RL model for compiler option tuning. While this modular design facilitates new-device integration, a suboptimal device choice can impose a fidelity ceiling that subsequent option tuning cannot overcome.

Second, quantum compiler configuration has a bounded discrete search space in widely used compilers such as Qiskit [26]. In our setting, each circuit has only 960 device-option configurations, making exhaustive offline enumeration feasible for obtaining empirical oracles. This enables an oracle-guided top-down selection paradigm, where selection rules extracted from these oracle configurations directly guide configuration selection without bottom-up search.

Oracle Configurations →\rightarrow Rules →\rightarrow Direct Selection

Top-Down Selection

In this paper, we systematically investigate the proposed top-down selection paradigm using the Qiskit compiler. We first construct QuOptBench, the first oracle-guided benchmark for Qiskit compiler configuration selection, covering 268 circuits with empirical oracle configurations. We then evaluate ten LLMs as a natural realization of direct selection. Results show that vanilla LLMs remain substantially below the oracle, largely due to their preference for overly aggressive configurations, such as higher optimization levels and more complex layout and routing methods.

Motivated by this finding, we instead use a strong reasoning model, Claude-Opus-5 [8], to analyze oracle decisions on 68 carefully categorized and sampled circuits and distill 13 transferable device- and option-selection rules. Based on these rules, we develop QCompass, a lightweight rule-guided ML framework for selecting configurations for new circuits. Experimental results show that the distilled rules consistently improve LLM-based selection, while QCompass achieves higher fidelity with a favorable trade-off between configuration quality and inference overhead.

The main contributions of this work are summarized as follows:

  • We construct QuOptBench, the first exhaustive benchmark for the Qiskit quantum compiler configuration selection containing 268 circuits with empirical oracle configurations.

  • We investigate ten LLMs as a natural realization of direct quantum compiler configuration selection. Our empirical study shows that general-purpose LLM reasoning alone cannot reliably reproduce oracle-quality configurations.

  • We develop an oracle-guided rule-distillation workflow that contrasts O3O_3 configurations with exhaustive-search oracles, explains their differences using circuit and device characteristics, and consolidates recurring patterns into transferable device- and option-selection rules.

  • We design QCompass, a lightweight rule-guided learning and inference approach that applies the distilled rules to new circuits, shifting quantum compiler optimization from repeated bottom-up search to efficient top-down selection.

  • We conduct comprehensive evaluations of QCompass, including comparisons with bottom-up search methods, nearest-neighbor retrieval, and direct LLM-based selection, as well as generalization to additional circuits and devices.

QuOptBench: An Oracle Benchmark for Quantum Compiler Configuration Selection

Task Description

The task of QuOptBench is to jointly select a device and compiler-option combination for each circuit. Following prior work [49, 50], the selection is based on circuit- and device-level features. Circuit features cover seven metrics: qubit count, depth, program communication, critical depth, entanglement ratio, parallelism, and liveness. Device features characterize hardware capacity, noise, and connectivity, including qubit count, two-qubit and readout errors, T1/T2T_1/T_2, average degree, and edge density. Together, these features provide the information needed for configuration selection.

Construction Process

Foundation Benchmarks

Table 1 summarizes the open-source benchmarks included in QuOptBench, including QASMBench [30] and VeriQBench [7]. These benchmarks cover representative quantum algorithms, variational circuits, and random circuits across diverse application scenarios. All circuits are represented in Open-QASM 2.0 [10], providing a unified format for benchmark construction and compiler option evaluation.

Search Space

Table 2 presents the search space and candidate values for Qiskit Compiler V2.4.1 (latest version when this work began) used for constructing QuOptBench. We select four fake backends with different qubit sizes, choosing the device with the lowest average gate error rate in each qubit-size category. For example, FakeBrisbane is selected as the 127-qubit device because it has the lowest average gate error rate among the 127-qubit candidates.

For options, besides the options in Table 2, Qiskit V2.4.1 also provides approximation_degree ([0, 1]), scheduling_method (None, alap, or asap), and integer-valued seed_transpiler. Since approximation_degree<1<1 enables approximate synthesis that may alter circuit semantics to reduce synthesis cost, we fix it to 1.0. We set scheduling_method to None to focus on structural compilation choices and seed_transpiler to 42 for reproducibility. For the four options in Table 2, we include all available candidate values while excluding default choices, as they ultimately resolve to explicit methods already covered by our search space. For example, under O3O_3, the default layout and routing methods both resolve to sabre. Overall, each circuit has 960 candidate device-option configurations, enabling exhaustive enumeration to construct the empirical oracle in QuOptBench.

Evaluation Metric

Since directly simulating each compiled circuit to obtain its execution fidelity would incur prohibitive time and memory costs, we adopt estimated fidelity, a widely used proxy metric in prior quantum compiler configuration selection and pass tuning studies [23, 49, 50, 63]. The original estimated fidelity ForgF_{\mathrm{org}} in Eq. (1) is computed by multiplying the expected fidelities of all gates and measurement operations in the compiled circuit according to the hardware error information of the target device. In ForgF_{\mathrm{org}}, F(gi)F(g_i) denotes the expected execution fidelity of gate gig_i on its mapped qubit(s), FRO(qj)F_{\mathrm{RO}}(q_j) denotes the expected readout fidelity of qubit qjq_j, and ∣G∣|G| and mm denote the numbers of gates and measurements in the compiled circuit, respectively. When the device calibration data provides an error rate, we convert it to fidelity as 1−1- error rate.

Forg=∏i=1∣G∣F(gi)∏j=1mFRO(qj),Feff=exp⁡(ln⁡ForgNinput)=Forg1/Ninput(1)F_{\mathrm{org}} = \prod_{i=1}^{|G|} F(g_i) \prod_{j=1}^{m} F_{\mathrm{RO}}(q_j), \qquad F_{\mathrm{eff}} = \exp\left(\frac{\ln F_{\mathrm{org}}}{N_{\mathrm{input}}}\right) = F_{\mathrm{org}}^{1/N_{\mathrm{input}}} \tag*{(1)}

However, because ForgF_{\mathrm{org}} is multiplicative, circuits with more operations (gates) naturally obtain smaller values, causing cross-circuit aggregation to be biased by circuit size. Following prior work [53], we normalize ForgF_{\mathrm{org}} by the number of non-barrier input operations and define the resulting effective estimated fidelity as FeffF_{\mathrm{eff}}. Since all configurations of the same circuit share the same NinputN_{\mathrm{input}}, this monotonic transformation preserves their relative ordering and thus does not change the oracle configuration, while reducing the influence of circuit size.

Brute-Force Search Process

During the search, we enumerate all 960 device-option combinations for each circuit with a fixed seed of 42 for reproducibility. We set a 600-second timeout for each compilation to balance search cost and fidelity exploration; only five of the 268 circuits exceed this limit under the default O3O_3 configuration, indicating that it may filter out unusually expensive cases. Finally, we select the configuration with the highest FeffF_{\mathrm{eff}} (defined in Eq. (1)) as the oracle, using shorter compilation time as the tie-breaker.

After 8,345.40 CPU-hours of brute-force search, we obtain oracle configurations for all 268 circuits. Parallelizing the search with 20 workers reduces the total wall-clock time to approximately 618 hours. The time cost is inflated by a small number of extremely slow circuit-configuration pairs, such as very large circuits on FakeBrisbane or configurations using the lookahead option.

The brute-force results confirm that exhaustive configuration selection is feasible for offline oracle construction but too costly for per-circuit optimization. The resulting oracle configurations provide a reference for all 268 circuits in QuOptBench, enabling evaluation against both standard configurations and the best configuration identified over the complete search space.

Level Partition

Finally, to distinguish the optimization difficulty of cases in QuOptBench, we partition the 268 cases into different levels. We first introduce a straightforward baseline, Device-Aware O3 (O3DAO_3^{\mathrm{DA}}), which selects the capacity-feasible device with the lowest average gate error and applies the default O3O_3 configuration (sabre for layout and routing and translator for translation). O3DAO_3^{\mathrm{DA}} reflects a natural strategy of selecting a device with better hardware quality together with a high optimization level, since the estimated fidelity [23, 49, 50, 63] in Eq. (1) is computed from gate errors. We then quantify each circuit’s optimization headroom by the oracle’s relative FeffF_{\mathrm{eff}} improvement over O3DAO_{3}^{DA} and divide the 268 circuits into three levels: 104 circuits with less than 1% improvement as Level 1, 88 with 1–10% as Level 2, and 76 with more than 10% as Level 3, representing increasing optimization headroom.

SpaceCandidate Values
BackendFakeGuadalupeV2 (16 qubits), FakeAuckland (27 qubits), FakeBrooklynV2 (65 qubits), FakeBrisbane (127 qubits)
Optimization level0, 1, 2, 3
Layoutdense, sabre, trivial
Routingbasic, lookahead, sabre, none
Translationsynthesis, translator, ibm_backend, ibm_dynamic_circuits, ibm_fractional

Table 2. Search space designed in QuOptBench. The full space contains 960 configurations for each circuit.

We further characterize circuit complexity across the three levels. Level 2 contains relatively lighter circuits, averaging 21.8 qubits and circuit depth of 106.7, compared with 36.7 and 31,801 for Level 1, 24.5 and 39,982 for Level 3. The large average circuit depth in Levels 1 and 3 are mainly caused by a few circuits with extremely large circuit depth.

Optimal Configuration Distribution

We further analyze the oracle configuration distribution in Figure 2. FakeAuckland and FakeBrisbane account for 47% and 37% of device choices, while O2O_2 and O3O_3 account for 31% and 37% of optimization levels. Notably, 16% of oracle configurations use O0O_0, mainly for single-qubit-dominated circuits where stronger optimization brings little fidelity benefit and the shorter compilation time makes O0O_0 preferable. The sabre option is used in more than half of the cases for both layout and routing, while translation choices are more diverse. Overall, no single configuration dominates, motivating circuit-specific configuration selection.

Figure 2. The optimal configuration distribution.

The Unique Value of QuOptBench

QuOptBench is the first quantum compiler configuration selection benchmark that provides empirical oracle configurations for each circuit. These oracles make QuOptBench a reusable reference for future research, enabling methods to measure both improvements over standard configurations (e.g., O3DAO_{3}^{DA}) and the remaining gap to the oracle, while supporting analyses of circuit-specific device and option choices. Although constructing the oracles is computationally expensive, this cost is incurred only once, enabling reproducible evaluation without repeating exhaustive search.

An Initial Attempt at Direct Selection with LLMs

Having established QuOptBench, we next investigate LLM-based configuration selection. Unlike bottom-up methods that iteratively search the configuration space, LLMs offer a natural alternative by directly predicting configurations, as explored in [43, 48]. We therefore evaluate ten LLMs on QuOptBench to characterize their effectiveness.

Evaluation Settings

Benchmark and Evaluation Metrics. We evaluate LLMs on QuOptBench using the FeffF_{\mathrm{eff}} improvement over O3DAO_{3}^{DA} (defined in Sec. 2.2) as the primary metric, with compilation time as an efficiency metric. We measure improvement using the headroom-normalized gain, Imp⁡(M)=FeffM−FeffDA−O31−FeffDA−O3×100%\operatorname{Imp}(M)=\frac{F_{\mathrm{eff}}^{M}-F_{\mathrm{eff}}^{DA-O_{3}}}{1-F_{\mathrm{eff}}^{DA-O_{3}}}\times100\%, where the denominator represents the remaining fidelity headroom of O3DAO_{3}^{DA}. Positive and negative values indicate improvement and degradation, respectively. We compute the gain per circuit and report the average within each level; oracle improvement is calculated analogously. We also report Better/Equal/Worse (denoted as "B/E/W") O3DAO_{3}^{DA} as the numbers of cases where the selected configuration achieves higher, equal, or lower FeffF_{\mathrm{eff}} than O3DAO_{3}^{DA}. In addition, we report pp-values from paired Wilcoxon signed-rank tests [59] for both the selected configurations and the oracle against O3DAO_{3}^{DA}. The tests are performed on per-circuit paired FeffF_{\mathrm{eff}} values; pairs with zero differences are excluded from the signed-rank calculation following the Wilcoxon convention. We consider cases with p<0.05p < 0.05 statistically significant.

LLMs. We evaluate ten LLMs, including five open-source and five closed-source: GPT-5-mini [39], GPT-5.5 [41], DeepSeek-V3.2-FP4 [14], DeepSeek-V4-Flash [15], Gemini-3.1-Flash-Lite [19], Gemini-3.5-Flash [20], Qwen3.5-27B [51], Qwen3.5-397B-A17B [51], GLM-5 [62], and Seed-2.0-Lite [3].

Prompt Setting. The prompt provides the circuit features, device features, and candidate option space, asks the LLM to maximize

FeffF_{\mathrm{eff}} (Eq. (1)) with compilation time as a tie-breaker, and strictly requires the output configuration in the JSON format.

Implementation Details. We perform inference for all LLMs using the Python APIs provided by OpenRouter [42]. For all models, we set the maximum output length to 1,024 tokens, the temperature to 0.0, the seed to 42, and use the default reasoning setting. All experiments are conducted on a server equipped with a 64-core Intel Xeon Gold CPU running Ubuntu 24.04.3 LTS.

Evaluation Results

As shown in Table 3, we report the average FeffF_{\mathrm{eff}} improvement over O3DAO^{DA}_{3} and compilation time of ten LLMs on QuOptBench, together with the oracle. Vanilla LLMs generally underperform O3DAO^{DA}_{3} across all three levels and remain far from the oracle, showing that general-purpose LLM reasoning alone is ineffective for Qiskit configuration selection. However, Level 2 shows noticeably shorter compilation time than Levels 1 and 3; as discussed in Sec. 2.2.5, this mainly reflects its generally shallower circuits, while a few extremely large circuits inflate the mean times of Levels 1 and 3. Paired significance tests further show that all LLM–O3DAO_{3}^{DA} differences are statistically significant (p<0.05p < 0.05). We further analyze the causes of this performance gap in the next subsection.

SourceLLMB/E/W O3DAO^{DA}_{3}LLM vs. O3DAO^{DA}_{3}pLLMp_{\mathrm{LLM}}Oracle vs. O3DAO^{DA}_{3}pOraclep_{\mathrm{Oracle}}O3DAO^{DA}_{3} (s)LLM (s)Oracle (s)
Effective Estimated Fidelity (FeffF_{\mathrm{eff}} in Eq. (1))Compilation Time
Level 1: 104 Cases
Closed-sourceSeed-2.0-Lite2/17/85−43.89%< 0.00123.28
Gemini-3.1-Flash1/34/69−5.23%< 0.00119.62
Gemini-3.5-Flash1/34/69−4.30%< 0.0010.03%0.0039.8913.721.50
GPT-5-Mini1/35/68−4.80%< 0.00115.80
GPT-5.51/83/20−3.38%< 0.00113.97
Open-sourceDeepSeek-3.20/54/50−3.37%< 0.00115.80
DeepSeek-V4-Flash1/36/67−7.06%< 0.00116.68
GLM-51/34/69−8.38%< 0.0010.03%0.0039.8920.831.50
Qwen3.5-27B1/36/67−4.27%< 0.00116.68
Qwen3.5-397B-A17B1/36/67−12.88%< 0.00116.68
Level 2: 88 Cases
Closed-sourceSeed-2.0-Lite7/1/80−42.90%< 0.0010.12
Gemini-3.1-Flash6/7/75−3.96%< 0.0010.11
Gemini-3.5-Flash5/8/75−2.87%< 0.0015.83%< 0.0010.090.100.13
GPT-5-Mini7/8/73−2.83%< 0.0010.11
GPT-5.52/72/14−3.16%< 0.0010.10
Open-sourceDeepSeek-3.23/32/53−3.26%< 0.0016.92
DeepSeek-V4-Flash7/6/75−4.08%< 0.0010.11
GLM-58/5/75−4.06%< 0.0015.83%< 0.0010.090.110.13
Qwen3.5-27B6/7/75−3.24%< 0.0010.10
Qwen3.5-397B-A17B9/6/73−3.15%< 0.0010.11
Level 3: 76 Cases
Closed-sourceSeed-2.0-Lite14/18/44−19.12%< 0.0018.83
Gemini-3.1-Flash2/40/34−0.59%< 0.0018.61
Gemini-3.5-Flash2/40/34−0.59%< 0.00131.68%< 0.0018.618.601.06
GPT-5-Mini2/41/33−0.59%< 0.0018.60
GPT-5.54/67/50.04%0.0328.61
Open-sourceDeepSeek-3.21/53/22−0.31%< 0.0018.61
DeepSeek-V4-Flash3/36/37−0.90%< 0.0018.60
GLM-53/36/37−3.92%< 0.00131.68%< 0.0018.618.601.06
Qwen3.5-27B2/40/34−0.59%< 0.0018.60
Qwen3.5-397B-A17B3/40/33−0.58%< 0.0018.60

Table 3. LLM-based direct configuration selection performance across three levels in QuOptBench.

Analysis

LLM-Selected Configuration Distribution

We further analyze GPT-5.5, the best-performing LLM on average in Table 3, and compare its predicted device-option distribution with the oracle in Figure 2. We quantitatively analyze all LLMs in the next subsection.

As shown in Figure 3, GPT-5.5 selects FakeAuckland about 20% more often and FakeBrisbane about 20% less often. It also favors more aggressive compiler options, including O3O_3, sabre for layout and routing, and synthesis for translation. We refer to this tendency as configuration aggressiveness, i.e., a preference for more complex and transformation-intensive compilation strategies. However, the oracle distribution shows that less aggressive choices, such as O2O_2, dense layout, and basic routing, can also achieve higher fidelity and shorter compilation time. This suggests that vanilla LLMs over-rely on conventionally "strong" settings rather than adapting to circuit- and device-specific characteristics.

Figure 3. GPT-5.5-selected configurations.

Configuration Aggressiveness Metric

To better characterize the aggressiveness of different configurations, we introduce an aggressiveness metric. As shown in Table 4, we assign an aggressiveness score to each candidate device and compiler-option value. For devices, aggressiveness captures the tendency to select a stronger or larger hardware target rather than compilation intensity itself. We consider three hardware characteristics: qubit capacity, topology connectivity, and gate error. A device with more qubits, higher connectivity, and lower gate error represents a stronger hardware choice and is therefore assigned a higher aggressiveness score. For compiler options, we assign scores according to the complexity and transformation intensity of each option, as detailed in § 3.3.1.

Device DimensionsCompiler-Option Dimensions
DeviceQubit SizeTopologyGate ErrorOptimization LevelLayoutRoutingTranslation
Scorerank↑(QdQ_d)rank↑(TdT_d)rank↓(EdE_d)
FakeGuadalupeV2011O0: 0trivial: 0none: 0translator: 0
FakeAuckland123O1: 1dense: 1basic: 1ibm_backend: 1
FakeBrooklynV2232O2: 2sabre: 2lookahead: 2ibm_dynamic: 1
FakeBrisbane300O3: 3sabre: 3ibm_fractional: 1
synthesis: 2

Table 4. Aggressiveness scores assigned to device features and compiler-option values.

Agg⁡(o)=round⁡(sq(odev)+st(odev)+sg(odev)3+sopt(oopt)+slay(olay)+srout(orout)+strans(otrans))(2)\operatorname{Agg}(o) = \operatorname{round}\left(\frac{s_{\mathrm{q}}(o_{\mathrm{dev}}) + s_{\mathrm{t}}(o_{\mathrm{dev}}) + s_{\mathrm{g}}(o_{\mathrm{dev}})}{3} + s_{\mathrm{opt}}(o_{\mathrm{opt}}) + s_{\mathrm{lay}}(o_{\mathrm{lay}}) + s_{\mathrm{rout}}(o_{\mathrm{rout}}) + s_{\mathrm{trans}}(o_{\mathrm{trans}})\right) \tag*{(2)}

The overall aggressiveness score of a configuration oo is calculated using Eq. (2), where the three device-related scores are averaged so that device contributes as one component. A larger Agg⁡(o)\operatorname{Agg}(o) indicates a more aggressive selected quantum compiler configuration.

We further compare each LLM-selected configuration with its oracle counterpart using the ΔAggressiveness\Delta_{\mathrm{Aggressiveness}}, defined as the LLM aggressiveness score minus the oracle score. A positive value indicates that the LLM selects a more aggressive configuration, while a negative value indicates that the oracle is more aggressive. As shown in Figure 4, the pink regions corresponding to ΔAggressiveness>0\Delta_{\mathrm{Aggressiveness}} > 0 dominate across all ten LLMs, confirming a clear over-aggressiveness bias: vanilla LLMs tend to favor more aggressive quantum compiler configurations than the oracle.

Figure 4. The ΔAggressiveness\Delta_{\mathrm{Aggressiveness}} metric distribution across all ten LLMs.

Oracle-Guided Rule Distillation for Top-Down Configuration Selection

In § 3, vanilla LLMs fail to achieve effective direct configuration selection. This suggests that effective direct selection requires explicit knowledge of how configuration choices relate to circuit and device characteristics. We therefore design a four-step rule-distillation workflow to extract transferable configuration-selection rules from oracle decisions, as shown in Figure 5.

Figure 5. The quantum compiler configuration selection rule distillation workflow.

Sample Collection and Classification

Initially, we collect all 268 cases from QuOptBench, using both O3DAO_{3}^{DA} and the oracle configurations as comparison references. To distill comprehensive and generalizable rules, the sampled cases should cover diverse differences between these two configurations. Therefore, before sampling, we classify all cases according to their effective estimated fidelity, compilation-time, and aggressiveness score gaps, ensuring that the selected samples represent diverse optimization scenarios.

We first define the gaps in effective estimated fidelity (ΔFeff\Delta F_{\mathrm{eff}}), compilation time (ΔT\Delta T), and configuration aggressiveness (ΔAgg\Delta\mathrm{Agg}) in Eq. (3).

ΔFeff=FeffOracle−FeffO3DA,\Delta F_{\mathrm{eff}} = F_{\mathrm{eff}}^{\mathrm{Oracle}} - F_{\mathrm{eff}}^{O_{3}^{DA}},
ΔT=TO3DA/TOracle,\Delta T = T_{O_{3}^{DA}} / T_{\mathrm{Oracle}},
ΔAgg=AggO3DA−AggOracle.(3)\Delta\mathrm{Agg} = \mathrm{Agg}_{O_{3}^{DA}} - \mathrm{Agg}_{\mathrm{Oracle}}. \tag*{(3)}

These metrics characterize the differences between the oracle and O3DAO_{3}^{DA} from three complementary perspectives: compilation quality, compilation cost, and configuration aggressiveness. A higher FeffF_{\mathrm{eff}} indicates better effective estimated fidelity, a lower compilation time indicates lower compilation overhead, and the aggressiveness score reflects the extent to which a configuration adopts more aggressive compilation strategies. Here, FeffOracleF_{\mathrm{eff}}^{\mathrm{Oracle}} and FeffO3DAF_{\mathrm{eff}}^{O_{3}^{DA}} denote the effective estimated fidelities of the oracle and O3DAO_{3}^{DA} configurations, respectively; TOracleT_{\mathrm{Oracle}} and TO3DAT_{O_{3}^{DA}} denote their compilation time overhead; and AggOracle\mathrm{Agg}_{\mathrm{Oracle}} and AggO3DA\mathrm{Agg}_{O_{3}^{DA}} denote their aggressiveness scores computed using Eq. (2). Accordingly, ΔFeff≥0\Delta F_{\mathrm{eff}} \ge0 always holds; ΔT>1\Delta T > 1 indicates that O3DAO_{3}^{DA} requires longer compilation time; and ΔAgg>0\Delta\mathrm{Agg} > 0 indicates that O3DAO_{3}^{DA} is more aggressive than the oracle.

Next, we define the classification rules in Table 5. Based on Eq. (3), we set the thresholds to τFeff=0.01\tau_{F_{\mathrm{eff}}} = 0.01 for effective estimated fidelity, τT=1.5\tau_T = 1.5 for compilation-time ratio, and τAgg=2\tau_{\mathrm{Agg}} = 2 for aggressiveness gap. These values are chosen empirically: a fidelity gap above 0.01 indicates noticeable quality difference, a time ratio above 1.5 indicates clear compilation overhead, and an aggressiveness gap above 2 reflects a substantial difference in configuration aggressiveness.

CategoryRuleDescription
Fidelity-loss / O3DAO^{DA}_{3}-more-aggressiveΔFeff>τFeff∧ΔAgg>τAgg\Delta F_{eff} > \tau_{Feff} \land\Delta Agg > \tau_{Agg}Fidelity loss when O3DAO^{DA}_{3} is more aggressive than the oracle
Fidelity-loss / Oracle-more-aggressiveΔFeff>τFeff∧ΔAgg<−τAgg\Delta F_{eff} > \tau_{Feff} \land\Delta Agg < -\tau_{Agg}Fidelity loss when the oracle is more aggressive than O3DAO^{DA}_{3}
Fidelity-loss / Similar-aggressivenessΔFeff>τFeff∧−τAgg≤ΔAgg≤τAgg\Delta F_{eff} > \tau_{Feff} \land-\tau_{Agg} \le\Delta Agg \le\tau_{Agg}Fidelity loss with similar aggressiveness scores
Time-overhead / O3DAO^{DA}_{3}-more-aggressiveΔFeff≤τFeff∧ΔT>τT∧ΔAgg>τAgg\Delta F_{eff} \le\tau_{Feff} \land\Delta T > \tau_T \land\Delta Agg > \tau_{Agg}Time overhead when O3DAO^{DA}_{3} is more aggressive than the oracle
Time-overhead / Oracle-more-aggressiveΔFeff≤τFeff∧ΔT>τT∧ΔAgg<−τAgg\Delta F_{eff} \le\tau_{Feff} \land\Delta T > \tau_T \land\Delta Agg < -\tau_{Agg}Time overhead when the oracle is more aggressive than O3DAO^{DA}_{3}
Time-overhead / Similar-aggressivenessΔFeff≤τFeff∧ΔT>τT∧−τAgg≤ΔAgg≤τAgg\Delta F_{eff} \le\tau_{Feff} \land\Delta T > \tau_T \land-\tau_{Agg} \le\Delta Agg \le\tau_{Agg}Time overhead with similar aggressiveness scores
Near-optimalΔFeff≤τFeff∧ΔT≤τT\Delta F_{eff} \le\tau_{Feff} \land\Delta T \le\tau_TClose to the oracle in both fidelity and compilation time

Table 5. Gap-based sample classification rules for rule distillation. We set the fidelity-gap threshold τFeff=0.01\tau_{Feff}=0.01, the time-overhead threshold τT=1.5\tau_T=1.5, and the aggressiveness score threshold τAgg=2\tau_{Agg}=2.

We then divide the cases into seven categories based on fidelity loss, compilation-time overhead, and aggressiveness differences. For both fidelity-loss cases and cases with similar fidelity but substantial time overhead, we distinguish whether O3DAO^{DA}_{3} is more aggressive, less aggressive, or similar to the oracle; the remaining cases are classified as near-optimal. This classification rule follows our fidelity-first, compilation-time-second evaluation priority, as used in the construction process of QuOptBench (Sec. 2.2.4).

Among the seven categories in Table 5, only four contain cases in QuOptBench. We then randomly sample 25% of the cases from each non-empty category, yielding 68 cases, while reserving the remaining 200 exclusively for evaluation to reduce overfitting. Among the sampled cases, 52.94% are Fidelity_loss/O3DAO^{DA}_{3} more aggressive, 27.94% are Near-optimal, 11.76% are Time-overhead/O3DAO^{DA}_{3} more aggressive, and 7.35% are Fidelity_loss/Oracle more aggressive. Overall, 64.71% of the sampled cases have O3DAO^{DA}_{3} more aggressive than the oracle, suggesting that over-aggressive compilation is a major source of suboptimality. Meanwhile, the 27.94% Near-optimal cases show that O3DAO^{DA}_{3} remains effective for a substantial subset of circuits. The other three categories are empty in QuOptBench: no cases exhibit similar aggressiveness with substantial fidelity loss or time overhead, and no Time-overhead/Oracle-more-aggressive cases are observed.

Rule Generation and Distillation

For each sampled case, we provide Claude-Opus-5 [8] with the O3DAO^{DA}_{3} and oracle configurations, circuit features, and device features. We ask Claude to analyze why the oracle is preferable, which fidelity or compilation-time differences are caused by O3DAO^{DA}_{3}, and which circuit feature, device, or option are most relevant. Based on this analysis, Claude-Opus-5 extracts one case-level rule with explicit applicability conditions, specifying under what circuit and device features a particular device or compiler option should be preferred. Through this process, we obtain 68 case-level rules.

We use Claude-Opus-5 because it was the latest Claude model with strong reasoning capability when we conducted rule extraction. We further evaluate the impact of the distilling LLM through an ablation study with two alternative LLMs in Sec. 6.6.

Finally, we provide all case-level rules to Claude-Opus-5 and ask it to consolidate recurring patterns into a compact rule set, while also identifying the supporting cases for each distilled rule. We then manually inspect the distilled rules to verify that each rule is consistent with the circuit and device features of its supporting

ends_mid=1 cases, remove redundant or overly case-specific statements, and check the overall consistency of the rule set. The final rule set is shown in Table 6.

Figure 6. The workflow of QCompass.

Distilled rules in Table 6 reveal three common patterns. First, device selection depends on circuit width and communication: low-occupancy circuits can benefit from wider devices, while high-communication circuits favor better connectivity and lower two-qubit error. Second, aggressive compilation is not universally beneficial; simple, serial, or near-full-device circuits often prefer lower optimization levels, whereas O3O_3 is mainly useful when sufficient optimization opportunity exists. Third, translation should match circuit structure: near-native circuits generally favor lightweight non-synthesis translation, while synthesis is more useful for unsupported or higher-arity operations. Overall, these patterns show that effective configuration selection requires circuit- and device-specific adaptation rather than a fixed aggressive strategy.

QCompass: A Rule-Guided ML Framework for Top-Down Configuration Selection

The distilled rules in Sec. 4 provide transferable knowledge for top-down quantum compiler configuration selection. A straightforward way to apply these rules is to include them in LLM prompts. However, LLM-based selection introduces substantial inference overhead, as LLM reasoning can take up to 82.46 seconds for a single circuit in our evaluation in Table 3.

Such latency limits the practicality of using LLMs directly as online configuration selectors. To provide a fast realization of the distilled top-down rules, we develop QCompass, a lightweight rule-guided ML framework for configuration selection. Instead of asking an LLM to reason over all candidate configurations at inference time, QCompass uses lightweight predictive models to estimate the optimization opportunity and score the candidate configurations, while the distilled rules constrain candidate generation. The predicted scores are then used to efficiently select the most promising configuration as the final output.

As shown in Fig. 6, QCompass consists of two phases: predictive model training and rule-guided inference. During training, we train four lightweight ML models to predict complementary signals, including circuit-level optimization opportunity, configuration-level fidelity gain, compilation-time overhead, and timeout risk. During inference, these predictions are first used to estimate each circuit’s optimization headroom over O3DAO_3^{DA} and assign it to an appropriate selection policy. QCompass then combines the selected policy with the distilled rules to generate candidate configurations and scores all candidates using a unified objective. The highest scored configuration is finally selected. We provide the full algorithm of QCompass in Algorithm 1.

Predictive Model Training

Algorithm 1 A Rule-Guided ML Framework for Top-Down Configuration Selection

Input: Training dataset Dtrain\mathcal{D}_{\mathrm{train}}, test set Dtest\mathcal{D}_{\mathrm{test}}, candidate devices B\mathcal{B}, option space O\mathcal{O}, distilled rules R\mathcal{R}, three gate thresholds τsafe,τseek,τrisk\tau_{\mathrm{safe}},\tau_{\mathrm{seek}},\tau_{\mathrm{risk}}, and two scoring weights λr,λt\lambda_r,\lambda_t.

Output: Selected device-option configuration ac∗a_c^* for each c∈Dtestc \in\mathcal{D}_{\mathrm{test}}.

// Phase I: Predictive Model Training
1  D_opp ← ∅;                         // Circuit-Level: Circuit features → Maximum fidelity
                                       improvement over O_3^DA
2  D_cfg ← ∅;                         // Cfg-Level: (circuit features, device, option) → fidelity
                                       gain, timeout, and time cost
3  foreach c ∈ D_train
4      B_c ← FilterFeasibleDevices(B, c);    A_c ← B_c × O;    // Construct all
                                                           feasible options
5      a^DA_{O_3} ← GetO3Cfg(c);   (f_{O_3}^{DA}, t_{O_3}^{DA}) ← Observe(c, a^DA_{O_3}); // Use
                                                                                   O_3^DA as the reference configuration
6      foreach a = (b,o) ∈ A_c do
7          (f_a,t_a,r_a) ← Observe(c,a);     // r_a = 1 if compilation times out,
                                             // and 0 otherwise
8          δf_a ← Fidelity_Gain(f_a,f^DA_{O_3});
           δt_a ← Time_Delta(t_a,t^DA_{O_3})
9          D_cfg ← D_cfg ∪ {(Concat(c,b,o),δf_a,r_a,δt_a)};    // Store
                                                               candidate-level training samples
10         o_c ← max_{a∈A_c} δf_a;    // Define case-level optimization opportunity as
                                     // the best achievable gain
11         D_opp ← D_opp ∪ {(Concat(c,b^DA_{O_3},o^DA_{O_3}),o_c)}; // Store one
                                                                  // opportunity-training sample for circuit c

// Train models to predict the circuit-level maximum fidelity gain over
   O_3^DA (M_opp), and configuration-level gain (M_gain), timeout risk
   (M_risk), and compilation-time cost (M_time)
12 M_opp ← Train(D_opp);    M_gain ← Train(D_cfg,δf);
   M_risk ← Train(D_cfg,r);    M_time ← Train(D_cfg,δt)

// Phase II: Rule-Guided Inference
13 foreach c ∈ D_test do
14     B_c ← FilterFeasibleDevices(B,c);    a^DA_{O_3} ← GetO3Cfg(c);
        x^DA_{O_3} ← Concat(c,b^DA_{O_3},o^DA_{O_3})
15     ô_c ← M_opp(x^DA_{O_3});    r̂^DA_{O_3} ← M_risk(x^DA_{O_3});    // Predict
        optimization opportunity and timeout risk of O_3^DA
16     if r̂^DA_{O_3} ≥ τ_risk then
17         p_c ← SEEK if ô_c ≥ τ_seek, otherwise SAFE
18     else
19         p_c ← KEEP if ô_c < τ_safe;    SAFE if τ_safe ≤ ô_c < τ_seek;    SEEK otherwise

// Rule-guided candidate generation: rules determine how to modify
   O_3^DA
20     C_c ← {a^DA_{O_3}}
21     if p_c ≠ KEEP then
22         foreach b ∈ B_c do
23             O^R_{c,b} ← ApplyRules(c,b,O,R);    // Keep option values
                                                   // supported by matched rules
24             if p_c = SAFE then
25                 O'_{c,b} ← LocalSearch_{50%}(O^R_{c,b},o^DA_{O_3}); // Allow changes
                                                                        // to at most 50% of option dimensions
26             else
27                 O'_{c,b} ← O^R_{c,b};    // Allow device switch and all
                                            // rule-supported option changes
28             C_c ← C_c ∪ {(b,o) | o ∈ O'_{c,b}}

// Candidate scoring
29     foreach a = (b,o) ∈ C_c do
30         x_a ← Concat(c,b,o);    ĝ_a ← M_gain(x_a);    r̂_a ← M_risk(x_a);
            t̂_a ← M_time(x_a)
31         s_a ← ĝ_a − λ_r r̂_a − λ_t t̂_a; // Fidelity is primary; timeout risk and
                                            // compilation time are penalties
32     a_c^* ← arg max_{a∈C_c} s_a; // Select the device-option configuration with
                                     // the highest score
33 return {a_c^* | c ∈ D_test}
IndexSpecific Rules
R1For 2–11-qubit circuits with backend occupancy Occ⁡(c,b)=Nq(c)/Nq(b)≤0.4\operatorname{Occ}(c,b)=N_q(c)/N_q(b)\le0.4, favor wider feasible backends with higher mean T1/T2T_1/T_2 and layout=dense. At higher occupancy, prefer backends closer to the circuit width.
R2For 11–39-qubit circuits with occupancy ≤0.35\le0.35, low communication (program_communication ≤0.15\le0.15), and parallelism ≤0.15\le0.15, favor wider backends with higher mean T1/T2T_1/T_2 and use O2–O3 with SABRE layout/routing. We regard program_communication ≥0.5\ge0.5 as high communication; in such cases, prioritize backend connectivity, measured by avg_degree and edge_density.
R3For 2–8-qubit circuits with entanglement_ratio ≤0.25\le0.25 and parallelism ≤0.15\le0.15, prefer O0–O1, trivial/dense layout, basic routing, and non-synthesis translation. Here, non-synthesis translation refers to translator, ibm_backend, ibm_dynamic_circuits, or ibm_fractional, as applicable.
R4For shallow 1–8-qubit circuits with num_2q_gates=0 and num_multi_qubit_gates=0, use O0–O1 with layout=dense; routing is unnecessary, and aggressive SABRE-based mapping provides little benefit.
R5For near-native circuits, i.e., circuits without > 2-qubit composite blocks whose source operations are already supported or directly lowered to the backend basis, prefer O2–O3 with SABRE layout/routing and non-synthesis translation. Use synthesis when unsupported or composite multi-qubit operations require substantial decomposition.
R6For circuits dominated by higher-arity operations, where N_{>2q}=\text{num_multi_qubit_gates}-\text{num_2q_gates} exceeds num_2q_gates, prefer O1–O2 with SABRE routing and a structure-matched non-synthesis translation method. Use O3/synthesis only when substantial optimization opportunity is predicted.
R7For circuits with ≥55\ge55 qubits and occupancy >0.4>0.4, prefer O0–O2 with trivial/dense layout and SABRE routing. Retain O3/synthesis when the circuit contains unsupported parameterized or controlled operations that require substantial synthesis.
R8For extremely deep and high-communication circuits (depth ≥105\ge10^5, parallelism ≤0.05\le0.05), prefer O0–O2, dense layout, SABRE routing, and non-synthesis translation. Avoid heavy optimization when the circuit is already near the backend basis.
R9For ≥30\ge30-qubit, low-communication circuits on sparse backends, prefer O0–O2, SABRE layout/routing, and non-synthesis translation when near-native; use O3/synthesis for substantial non-native or redundant structure.
R10For circuits containing reset or conditional-control operations, prefer ibm_dynamic_circuits; otherwise prefer translator or ibm_backend over generic synthesis when the gate set is already near-native.
R11For near-full-device, serial entangling circuits with occupancy >0.9>0.9, entanglement_ratio ≥0.8\ge0.8, critical_depth ≥0.8\ge0.8, and parallelism ≤0.05\le0.05, prefer basic/SABRE routing with non-synthesis translation.
R12For high-communication circuits, prioritize feasible backends with higher connectivity and lower two-qubit error, together with SABRE routing. At low occupancy, use dense layout; use synthesis only for non-native operations.
R13For 5–16-qubit circuits with occupancy ≤0.4\le0.4, program_communication ≤0.4\le0.4, and parallelism ≤0.15\le0.15, prefer O0–O2 while retaining SABRE layout/routing. Escalate to O3 only when the predicted optimization opportunity is sufficiently large.

Table 6. Distilled rules for quantum compiler configuration selection.

Predictive Model Training

We use the 68 rule-distillation cases as the model-development set Dtrain\mathcal{D}_{\mathrm{train}}, with an 80%/20% split within each category in Table 5 for model training and validation (54/14 cases). Since we record the outcomes of all enumerated configurations when constructing QuOptBench, these cases provide complete performance labels over the entire configuration space. The remaining 200 cases are reserved as the test set Dtest\mathcal{D}_{\mathrm{test}} for evaluation.

For each training circuit cc in Dtrain\mathcal{D}_{\mathrm{train}}, we filter infeasible devices and construct all feasible configurations Fc=Bc×O\mathcal{F}_c=\mathcal{B}_c\times\mathcal{O} (line 4 in Algorithm 1), using O3DAO^{DA}_3 as the reference (line 5). For each configuration, we compute its fidelity gain and compilation-time overhead relative to O3DAO^{DA}_3, and record whether the compilation times out. We then build a circuit-level opportunity dataset Dopp\mathcal{D}_{\mathrm{opp}} (lines 6–11), where the optimization opportunity oco_c represents the maximum achievable fidelity gain over O3DAO^{DA}_3. The motivation for measuring optimization opportunity comes from the three levels identified in QuOptBench: for some circuits, O3DAO^{DA}_3 is already close to the oracle, while others still have substantial fidelity headroom. Therefore, oco_c estimates whether searching beyond O3DAO^{DA}_3 is worthwhile and how aggressively the configuration space should be explored. The second is a configuration-level dataset Dcfg\mathcal{D}_{\mathrm{cfg}}, which maps circuit, device, and option to the observed fidelity gain, timeout risk, and compilation-time overhead of each candidate configuration. The timeout risk captures a configuration’s likelihood of compilation timeout, particularly for large circuits.

We train four Extremely Randomized Trees (Extra Trees) [18] models (line 12): MoppM_{\mathrm{opp}}, MgainM_{\mathrm{gain}}, MriskM_{\mathrm{risk}}, and MtimeM_{\mathrm{time}}, predicting optimization opportunity, fidelity gain, risk, and compilation-time overhead, respectively. Circuit features, devices, and options are vectorized as model inputs. Each model uses 250 trees, a minimum leaf size of 2, and seed 42. We choose Extra Trees because it efficiently captures non-linear interactions in structured tabular features while providing much lower inference overhead than neural or LLM-based predictors.

Rule-Guided Inference

Policy Prediction

As shown in Table 3, the optimization opportunity over O3DAO^{DA}_3 varies substantially across circuits, motivating an adaptive policy rather than a uniform modification scope. Near-optimal cases should preserve O3DAO^{DA}_3 to avoid unnecessary modifications, whereas circuits with larger optimization opportunities require broader configuration changes. Accordingly, we introduce three policy modes with different modification scopes.

For a new circuit cc, QCompass predicts its optimization opportunity o^c\hat{o}_c over O3DAO^{DA}_3 using MoppM_{\mathrm{opp}} and its timeout risk r^O3\hat{r}_{O_3} using MriskM_{\mathrm{risk}} (lines 13–15). Based on these predictions, the policy gate assigns one of three modes: KEEP retains O3DAO^{DA}_3 when little improvement is predicted; SAFE allows constraint modifications to device and options for moderate headroom; and SEEK enables broader device and option changes when substantial improvement is predicted. As shown in lines 16–19 of Algorithm 1, the gate is controlled by τsafe\tau_{\mathrm{safe}}, τseek\tau_{\mathrm{seek}}, and τrisk\tau_{\mathrm{risk}}, avoiding unnecessary modification for near-optimal cases while expanding the candidate scope for cases with larger predicted headroom.

Rule-Guided Candidate Generation

For circuits assigned to SAFE or SEEK, QCompass uses the distilled rules in Table 6 to generate all rule-supported candidate configurations (lines 20–28), which are then passed to the subsequent scoring stage for selection. For each capacity-feasible device bb, QCompass matches the circuit and device features against the applicability conditions of the rules and retains only the option values supported by the matched rules, forming a rule-guided option space Oc,bRO^{\mathcal{R}}_{c,b} (line 23). In this way, oracle-derived knowledge is transferred to new circuits by narrowing the modification toward configurations that are more likely to be suitable.

The SAFE and SEEK modes differ in candidate scope. Under SAFE (lines 24–25), QuTop performs a local modification around O3DAO^{DA}_3 and allows at most 50% option changes, while still permitting device switches supported by the rules. This reduces the risk of unnecessary large modifications when O3DAO^{DA}_3 is already reasonably strong. Under SEEK, all rule-supported device and option changes are considered, enabling broader exploration for circuits with larger predicted optimization headroom. Importantly, the distilled rules do not directly determine the final configuration. Instead, they act as top-down selection priors that define promising regions of the configuration space, while the predictive models subsequently evaluate and rank the generated candidates. Finally, all rule-guided device-option configurations are collected as candidates for subsequent scoring (line 28).

5.2.3 Candidate Scoring and Selection. After generating the candidate set CcC_c, QCompass uses the three configuration-level models to predict each candidate’s fidelity gain, timeout risk, and compilation-time overhead, and combines them into a unified score (lines 29–32 in Algorithm 1). Fidelity remains the primary objective, while timeout risk and compilation-time overhead are used as penalties. QCompass then selects the candidate with the highest score as the final configuration (line 32).

By scoring only a rule-pruned candidate set with lightweight models, QCompass avoids both repeated online compilation in bottom-up search and the high reasoning latency of LLM-based top-down selection, providing a fast realization of the proposed top-down configuration selection paradigm.

Evaluation

The evaluation investigates the following five research questions (RQ):

  • RQ.1: Are the distilled rules effective for configuration selection, as measured by their improvement to LLM-based selection? (§ 6.2)

  • RQ.2: How effective is QCompass compared with bottom-up search methods, and direct-selection methods, including nearest-neighbor retrieval and LLM-based approaches? (§ 6.3)

  • RQ.3: How well do QCompass, LLMs, and bottom-up methods adapt to new circuits and devices beyond QuOptBench? (§ 6.4)

  • RQ.4: Does QCompass retain its advantage in noise-aware execution fidelity? (§ 6.5)

  • RQ.5: How do the key components and parameters affect the performance of QCompass? (§ 6.6)

Evaluation Settings

LLMs. We use the same ten LLMs as in § 3.1.

Evaluation Metric. We use the FeffF_{\mathrm{eff}} improvement over O3DAO^{DA}_3 as the primary metric, together with the ρ\rho-value introduced in § 3.1, and report compilation time. For RQ.1–RQ.3 and RQ.5, the improvement is computed using FeffF_{\mathrm{eff}} defined in Eq. (1). For RQ.4, we instead use noise-aware execution fidelity obtained from noisy simulation with 2,048 shots per execution.

Baselines. For bottom-up baselines, we evaluate reinforcement learning (RL) and Bayesian optimization (BO). We re-implement MQT Predictor [50], a two-stage approach that uses ML for device selection and PPO [52] for compiler-option tuning, under Qiskit V2.4.1 (originally developed for V0.39.2). To retrain both stages under the updated Qiskit version, we construct the training pool using the original train dataset used by MQT Predictor together with QCircuitBench [61], a large-scale quantum-circuit dataset. After removing circuits overlapping with QuOptBench, we sample 2,000 circuits, four times the original training-set size of 500, using 95% for training and 5% for validation. Following the MQT Predictor, which trains seven candidate ML models to predict the device that achieves the highest estimated fidelity under the O3O_3 setting and selects the best-performing model for device selection, we train the same seven models. In our setting, Random Forest and Decision Tree achieve the highest validation accuracy and are included in the evaluation.

For option selection, we train Maskable PPO on the same 2,000 circuits, following MQT Predictor by masking capacity-infeasible device choices and using the same hyperparameters. We only increase the training steps from the original 100,000 to 1,000,000 and fix the random seed to 42. The state consists of the seven circuit features, and the reward is based on the achieved FeffF_{\mathrm{eff}}. The model is trained on the server described in § 3.1, using one NVIDIA H100 GPU with 80 GB of memory.

We also evaluate BO [6, 64, 65] over the same compiler-option space, using 10 initial random samples, 50 iterations, and early stopping after 20 consecutive non-improving iterations, following the parameter setting used in prior quantum compiler pass tuning work [63]. To isolate the impact of device selection, we further construct Joint RL/BO, which jointly optimize the device and compiler options, and Device-Aware RL/BO, which fix the capacity-feasible device with the lowest average gate error before option selection, as detailed in § 2.2.3.2.

For top-down selection, we include a nearest-neighbor retrieval baseline (NN-Retrieval), which retrieves the most similar circuit among the 68 rule-distillation cases using the seven circuit features in § 2.1 and reuses its configuration. If the retrieved device is infeasible, it is replaced by the capacity-feasible device with the lowest average gate error while retaining the compiler options.

Prompt Setting. The rule-guided prompt extends the prompt in § 3.1 with a rule section.

Benchmarks. We use QuOptBench for RQ.1–RQ.2 and RQ.4–RQ.5, evaluating only the 200 cases not used for rule distillation to avoid overfitting. For RQ.3, we additionally sample 100 QCircuitBench circuits [61] that overlap with neither QuOptBench nor the 2,000 RL training circuits.

Implementation Details. The LLM inference settings follow § 3.1. For QCompass, we split the 68 rule-distillation cases into 54 training cases and 14 validation cases (detailed in § 5.2), yielding 51,840 device-option training samples and 13,440 validation samples before filtering infeasible configurations. The hyperparameters τseek=0.1\tau_{\mathrm{seek}}=0.1, τsafe=0.002\tau_{\mathrm{safe}}=0.002, τrisk=0.6\tau_{\mathrm{risk}}=0.6, λr=1\lambda_r=1, and λt=0.002\lambda_t=0.002 are selected on the 14-case validation set by maximizing the average FeffF_{\mathrm{eff}} improvement over O3DAO^{DA}_3.

Effectiveness of Distilled Rules for Configuration Selection (RQ.1)

As shown in Table 7, incorporating the distilled rules consistently improves LLM performance on quantum compiler configuration selection across all LLMs and all three levels, providing direct evidence of the effectiveness of the distilled rules. For Levels 2 and 3, most LLMs achieve positive gains over O3DAO^{DA}_{3}; notably, Qwen3.5-397B-A17B improves over O3DAO^{DA}_{3} by 20.37% on average for Level 3. For Level 1, however, most models still show slight degradation, with Seed-2.0-Lite exhibiting a larger drop of 15.89%. These results show that the distilled rules help LLMs identify better configurations when sufficient optimization headroom exists. However, LLMs still struggle on Level 1, where O3DAO^{DA}_{3} is already near optimal and unnecessary changes should be avoided. The statistical results show the same trend: all rule-guided LLMs remain significantly different from O3DAO^{DA}_{3} on Level 1, whereas on Level 3, seven of ten models achieve statistically significant positive gains (p<0.05p < 0.05); Level 2 shows a more mixed pattern.

SourceLLMs\multicolumn{4}{c}{Effective Estimated Fidelity (FeffF_{\mathrm{eff}} in Eq. (1))}\multicolumn{4}{c}{Compilation Time}
\multicolumn{2}{c}{-w/o Rules}\multicolumn{2}{c}{-w Rules}
B/E/W O3DAO^{DA}_{3}LLMρLLM\rho_{\mathrm{LLM}}B/E/W O3DAO^{DA}_{3}LLMρLLM\rho_{\mathrm{LLM}}Oracle-w/o R LLM-w R LLMO3DAO^{DA}_{3} Oracle
\multicolumn{12}{c}{Level 1: 76 Cases}
Closed-sourceSeed-2.0-Lite1/11/64−51.88%< 0.0011/33/42−15.89%< 0.0010.03%10.763.173.52; 0.65
Gemini-3.1-Flash0/24/52−3.64%< 0.0012/48/26−1.50%< 0.0014.872.91
Gemini-3.5-Flash0/24/52−3.64%< 0.0011/59/16−3.63%< 0.0014.870.75
GPT-5-Mini0/25/51−4.32%< 0.0013/52/21−1.64%< 0.0014.870.78
GPT-5.50/39/37−2.77%< 0.0012/59/15−1.20%0.0014.470.84
Open-sourceDeepSeek-3.20/38/38−2.63%< 0.0012/60/14−1.79%0.0034.872.90
DeepSeek-V4-Flash0/24/52−7.13%< 0.0012/58/16−2.16%< 0.0014.880.68
GLM-50/24/52−8.70%< 0.0012/55/19−2.69%< 0.00110.460.75
Qwen3.5-27B0/24/52−3.64%< 0.0012/57/17−1.44%< 0.0014.873.10
Qwen3.5-397B-A17B0/26/50−15.13%< 0.0011/49/26−3.26%< 0.0014.873.11
\multicolumn{12}{c}{Level 2: 67 Cases}
Closed-sourceSeed-2.0-Lite7/0/60−40.95%< 0.00129/6/32−11.31%0.1366.04%0.110.110.09; 0.13
Gemini-3.1-Flash6/5/56−4.39%< 0.00121/31/150.27%0.7770.100.10
Gemini-3.5-Flash5/6/56−2.97%< 0.00118/37/120.40%0.3180.100.11
GPT-5-Mini6/7/54−2.84%< 0.00141/7/190.59%0.0100.100.14
GPT-5.53/33/31−3.16%< 0.00132/26/90.46%0.0070.100.11
Open-sourceDeepSeek-3.22/24/41−3.84%< 0.00129/20/18−1.66%0.2629.050.10
DeepSeek-V4-Flash6/5/56−3.73%< 0.00136/18/130.78%0.0030.100.12
GLM-56/4/57−4.13%< 0.00130/22/15−0.22%0.0810.100.11
Qwen3.5-27B6/5/56−3.45%< 0.00137/16/14−0.31%0.0220.100.14
Qwen3.5-397B-A17B7/5/55−3.41%< 0.00142/11/140.99%0.0020.100.12
\multicolumn{12}{c}{Level 3: 57 Cases}
Closed-sourceSeed-2.0-Lite13/13/31−16.96%0.00130/6/217.46%0.26531.92%0.180.220.19; 0.26
Gemini-3.1-Flash2/30/25−0.59%< 0.00120/33/411.72%0.0020.180.19
Gemini-3.5-Flash2/30/25−0.59%< 0.00123/21/1316.03%0.0440.180.24
GPT-5-Mini2/31/24−0.59%0.00136/7/1413.88%0.0050.180.23
GPT-5.53/39/15−0.10%0.11235/15/718.87%< 0.0010.180.23
Open-sourceDeepSeek-3.21/40/16−0.30%0.00515/16/2612.02%0.6830.190.18
DeepSeek-V4-Flash3/26/28−0.72%< 0.00130/14/1314.96%0.0050.180.21
GLM-53/28/26−3.39%< 0.00120/24/1310.40%0.2210.180.21
Qwen3.5-27B2/30/25−0.59%< 0.00132/10/1513.71%0.0110.180.24
Qwen3.5-397B-A17B3/30/24−0.57%0.00339/6/1220.37%0.0010.180.24

Table 7. Configuration selection performance of evaluated LLMs across three levels. In the Effective Estimated Fidelity columns, "LLM" denotes the FeffF_{\mathrm{eff}} improvement of the LLM-generated configuration over O3DAO^{DA}_{3}, while "Oracle" denotes the FeffF_{\mathrm{eff}} improvement of the oracle configuration over O3DAO^{DA}_{3}.

Effectiveness of QCompass (RQ.2)

We further compare QCompass with two bottom-up methods (RL and BO), the NN-Retrieval method, the two best-performing LLMs in Table 7, GPT-5.5 and Qwen3.5-397B-A17B. As shown in Table 8, QCompass achieves positive gains over O3DAO^{DA}_{3} across all three levels and outperforms all baselines on Levels 2 and 3, demonstrating its effectiveness. On Level 1, QCompass achieves a slightly lower gain than Device-Aware BO, with a difference of only 0.012 percentage points. However, QCompass requires only 3.28 s search time per case on average, compared with 2,856.87 s for Device-Aware BO.

ParadigmMethodB/E/WO3DAO^{\mathrm{DA}}_{3}FeffF_{\mathrm{eff}} Imp. over O3DAO^{\mathrm{DA}}_{3}ppCompile (s)Select (s)
Level 1
Bottom-upRandom Forest + BO1/24/51−32.65%<0.001<0.00111.093320.86
Decision Tree + BO2/30/44−23.72%<0.001<0.0011.782944.71
Joint BO4/41/31−8.27%<0.001<0.00119.011746.02
Device-Aware BO3/73/00.014%0.1090.812856.87
Random Forest + RL0/14/62−30.90%<0.001<0.0015.220.15
Decision Tree + RL0/14/62−36.53%<0.001<0.0014.110.15
Joint RL0/21/55−17.31%<0.001<0.0014.810.16
Device-Aware RL0/21/55−19.43%<0.001<0.0012.390.15
Top-downNN-Retrieval1/32/43−17.61%<0.001<0.0013.610.001
GPT-5.5 (-w Rules)2/59/15−1.20%0.0010.8417.43
Qwen3.5-397B (-w Rules)1/49/26−3.26%<0.001<0.0013.11110.73
QCompass4/67/50.002%0.8591.093.28
Level 2
Bottom-upRandom Forest + BO29/6/32−17.45%0.0130.182462.41
Decision Tree + BO28/6/33−19.99%0.0070.212512.41
Joint BO38/10/19−5.25%0.4399.14820.02
Device-Aware BO43/24/02.45%<0.001<0.0010.112146.68
Random Forest + RL13/3/51−21.91%<0.001<0.0010.210.01
Decision Tree + RL10/3/54−30.53%<0.001<0.0010.200.01
Joint RL17/2/48−8.72%<0.001<0.0010.130.01
Device-Aware RL14/10/43−13.39%<0.001<0.0010.180.01
Top-downNN-Retrieval19/22/26−16.14%0.0050.120.001
GPT-5.5 (-w Rules)32/26/90.46%0.0070.1117.39
Qwen3.5-397B (-w Rules)42/11/140.99%0.0020.12110.98
QCompass42/20/53.47%<0.001<0.0010.123.30
Level 3
Bottom-upRandom Forest + BO44/2/1113.65%<0.001<0.00153.411535.58
Decision Tree + BO33/1/2317.87%0.00721.381681.89
Joint BO47/9/121.54%<0.001<0.0010.28967.80
Device-Aware BO38/19/010.62%<0.001<0.0010.211504.36
Random Forest + RL37/1/1921.26%0.0020.350.02
Decision Tree + RL31/1/2515.66%0.1060.360.02
Joint RL39/1/1724.49%<0.001<0.0010.310.02
Device-Aware RL38/3/1618.24%0.0090.300.02
Top-downNN-Retrieval28/15/145.24%0.1140.240.001
GPT-5.5 (-w Rules)35/15/718.87%<0.001<0.0010.2317.06
Qwen3.5-397B (-w Rules)39/6/1220.37%0.0010.24108.54
QCompass49/7/128.56%<0.001<0.0010.253.33

Table 8. Table 8: Comparison of different methods for configuration selection across three difficulty levels. Compile (s) and Select (s) denote the time of compilation and selection.

Notably, on Level 1, QCompass matches O3DAO^{DA}_{3} on 67 of 76 cases, with nearly balanced better and worse cases (4 vs. 5), resulting in no statistically significant difference (p=0.859p = 0.859). By comparison, the Device-aware BO also largely matches O3DAO^{DA}_{3} (73 of 76 cases) but improves all three remaining cases, leading to a lower yet still non-significant pp-value (p=0.109p = 0.109). In contrast, QCompass’s improvements on Levels 2 and 3 are statistically significant (p<0.001p < 0.001), consistent with its goal of preserving near-optimal configurations while exploiting larger optimization headroom.

For BO and RL, most variants underperform O3DAO^{\mathrm{DA}}_{3} on Levels 1 and 2, except Device-Aware BO. This suggests that device-selection errors can trap BO on suboptimal devices, while RL tends to make unnecessary option changes even when the O3DAO^{\mathrm{DA}}_{3} device is fixed. On

Level 3, however, most BO/RL variants outperform Device-Aware BO, indicating that larger optimization headroom allows alternative device choices and more aggressive option tuning to provide greater gains. NN-Retrieval underperforms Device-Aware RL/BO across all three levels, achieving only a 5.24% improvement over O3DAO_{3}^{DA} on Level 3. This indicates that directly reusing configurations from similar circuits is insufficient, while distillation of transferable rules is considerably more effective.

From the perspective of search time, QCompass requires only about 3.30 seconds per case on average, substantially faster than GPT-5.5 (about 17 seconds), Qwen3.5-397B-A17B (about 110 seconds), and BO (820–3,320 seconds). Although QCompass is slower than RL and NN-Retrieval, which require only about 0.001–0.15 seconds per case, it achieves substantially better configuration quality, making this additional inference cost a practical trade-off.

Adaptation to New Devices and Circuits (RQ.3)

We further evaluate the adaptation ability of the distilled rules and QCompass on new circuits and devices. Specifically, we randomly sample 100 circuits from QCircuitBench that do not overlap with QuOptBench and the RL training dataset, and replace the original device pool with four new devices: FakeTorino (133 qubits), FakeSherbrooke (127 qubits), FakePrague (33 qubits), and FakeMontrealV2 (27 qubits), and all methods are restricted to selecting among them. For the ML-based device selectors, we follow their extensible design and retrain them by expanding the training device pool to include the four new devices, while restricting evaluation selection to the four new devices. The RL option-selection policies and QCompass are applied directly without retraining.

As shown in Figure 7, QCompass achieves a 9.06% average improvement over O3DAO_{3}^{DA}, while both rule-guided LLMs achieve gains above 5%. In contrast, the two ML+RL methods yield negative improvements. These results indicate that QCompass’s top-down selection generalizes more effectively to new circuits and devices than the bottom-up RL-based approaches.

Bar chart showing scalable analysis of QCompass and baselines on new circuits and devices

Figure 7. Scalable analysis of QCompass and baselines on new circuits and devices.

Evaluation with Noise-Aware Execution Fidelity on the Noisy Simulator (RQ.4)

In Eq. (1), we use estimated fidelity to evaluate compiled circuits based on device error information without actual execution. To verify whether our conclusions remain consistent under noise-aware execution fidelity, we conduct an additional evaluation in this section. Specifically, we compute the Hellinger fidelity [27] as our evaluation metric. For each selected device, we construct an Aer noise model using the noise model from the corresponding fake backend, which incorporates backend-specific error parameters. All methods in Table 8 are included for evaluation. Since noise-aware execution fidelity simulation for large or complex circuits incurs substantial memory and execution costs, we evaluate 63 small and medium circuits from QASMBench, as detailed in Table 1.

BenchmarkSize#CaseQubitsDescription
QASMBenchSmall392∼10
QASMBenchMedium2411 ∼ 27Representative quantum algorithms of different qubit sizes
QASMBenchLarge4028 ∼ 127
VeriQBenchVariational474 ∼ 121Variational circuits, including QAOA, EfficientSU2, VQE, QCNN
VeriQBenchCombinational1181 ∼ 101Quantum algorithms of different qubit sizes and random circuits
Total268

Table 1. Selected foundational benchmarks in QuOptBench.

As shown in Figure 8, QCompass still achieves the largest mean improvement, while both rule-guided LLMs also maintain positive gains. On the evaluated set, QCompass achieves a 5.71% mean improvement over O3DAO_{3}^{DA}, with the statistical significance p<0.001p < 0.001. Therefore, the noise-aware evaluation remains directionally consistent with our estimated-fidelity results, although the magnitude of the improvement differs from that in Table 8.

Bar chart showing comparison of noise-aware execution fidelity on QASMBench small and medium cases

Figure 8. Comparison of noise-aware execution fidelity on QASMBench small and medium cases.

Ablation and Sensitivity Study (RQ.5)

We further analyze QCompass’s key components, the choice of distilling LLM, and its key parameters. For component ablation, -w/o Policy removes the policy gate, so all cases undergo candidate generation and scoring without distinguishing whether O3DAO_{3}^{DA} should be preserved or only locally modified; -w/o Risk removes the timeout risk-aware safeguard; and -w/o Rules replaces rule-guided candidate generation with the full feasible device-option space.

As shown in Table 9, removing the policy gate causes the largest degradation on Level 1, confirming the importance of avoiding unnecessary exploration when O3DAO_{3}^{DA} is already near optimal. Removing Risk also substantially degrades Levels 1 and 2 because some selected configurations time out, yielding extremely large negative improvements over O3DAO_{3}^{DA} that dominate the average. Level 3 remains positive because its larger optimization headroom allows successful selections to offset part of these losses. In contrast, removing the distilled rules mainly hurts Levels 2 and 3, especially Level 2, showing that the rules are most useful when meaningful optimization headroom exists by guiding the search toward promising configuration regions.

MethodLevel 1Level 2Level 3
Components
QCompass0.002%3.47%28.56%
-w/o Policy−13.38%−3.21%17.36%
-w/o Risk−27.13%−43.06%15.13%
-w/o Rules−0.55%−28.72%19.69%
Distilling Model
Claude-4.6−1.81%−3.51%20.71%
GPT-5.2−14.10%−2.40%18.66%

Table 9. Ablation study of the QCompass.

For the distilling-LLM ablation, we replace Claude-Opus-5 with two alternative LLMs: Claude-Sonnet-4.6 [1], an earlier model from the same Claude family, and GPT-5.2 [40], from a different model family. We repeat the rule-distillation process described in Sec. 4.2. Claude-Sonnet-4.6 generates 17 rules, whereas GPT-5.2 generates only 7 rules.

Table 9 shows that replacing the Claude-Opus-5 distilled rules consistently weakens QCompass. Claude-Sonnet-4.6 produces even more rules than Opus-5 (17 vs. 13), yet its gains drop to −1.81%, −3.51%, and 20.71% across Levels 1–3, indicating that rule quantity alone is insufficient. Its rules rely more on rigid thresholds and can conflict; for example, one rule favors O3O_{3} with SABRE for wide, highly entangled circuits, while another downgrades high two-qubit-error-exposure (often associated with heavily entangling circuits) circuits to O0O_{0}–O1O_{1} with trivial layout. GPT-5.2 exhibits a different limitation, distilling only seven rules, which provides weaker coverage of the configuration space and leads to −14.10%, −2.40%, and 18.66%. In contrast, the Claude-Opus-5 distilled rules more systematically capture interactions among circuit structure, device characteristics, and optimization opportunity, yielding more transferable guidance.

For ablation groups in Table 9, paired Wilcoxon signed-rank tests between QCompass and each ablated variant further confirm that the observed degradations are statistically significant (p<0.05p < 0.05).

For parameter sensitivity, we vary τseek\tau_{\mathrm{seek}}, τsafe\tau_{\mathrm{safe}}, τrisk\tau_{\mathrm{risk}}, λr\lambda_r, and λt\lambda_t around their default settings in § 6.1, as shown in Figure 9. Among them, τseek\tau_{\mathrm{seek}} has the largest impact: the default value performs best, while either increasing or decreasing it degrades performance. For τsafe\tau_{\mathrm{safe}}, setting it to 0.001 reduces Level-3 performance, whereas values above 0.0015 produce nearly unchanged results across all three levels. In contrast, τrisk\tau_{\mathrm{risk}}, λr\lambda_r, and λt\lambda_t are relatively robust, with no noticeable performance variation within the evaluated ranges.

Figure 9. The sensitivity analysis of the QCompass.

Related Work

Compiler Auto-tuning. Classical compiler auto-tuning has explored heuristic search [6, 17, 24, 44, 64, 65], RL-based pass selection [9, 12, 25, 29, 37, 45], similarity-based retrieval [31, 55], and LLM-guided optimization [11, 43, 48]. Quantum compiler tuning has also adopted heuristic and RL-based methods [13, 23, 33, 36, 49, 50]. However, only two of these studies [49, 50] focus on compiler configuration selection with the bottom-up RL method. In this paper, we explore a top-down selection paradigm, achieving better performance than existing methods.

Quantum Software Engineering. Recent advances in quantum computing have led to increasing interest in quantum software engineering [38], encompassing areas such as quantum compiler tuning [13, 33, 36, 49], execution performance and time prediction [35, 56], testing [34, 57, 58, 60], program repair [54], and quantum code generation [2, 4, 21].

Threats to Validity

Internal Validity. The main internal threat lies in oracle construction, which is bounded by the selected devices, option space, timeout policy, and estimated fidelity proxy. We mitigate this by using identical devices, option spaces and settings for all methods. Another threat comes from our re-implementation of MQT Predictor [50]. Since the original MQT Predictor was developed under Qiskit V0.39.2, its search space is not identical to our Qiskit V2.4.1 setting, and our reproduced models therefore cannot exactly match the original implementation. To mitigate this threat, we follow its reported two-stage methodology and model choices and adopt the same training hyperparameters, except that we increase the training steps by 10×. Finally, LLM nondeterminism and parsing errors may affect results; we mitigate them by fixing the temperature to 0.0 and seed to 42. Another internal threat arises from the manual verification of the LLM-distilled rules and may therefore introduce researcher judgment. We mitigate this threat by checking each distilled rule against its supporting cases and removing redundant or overly case-specific statements.

External Validity. Our results are based on the evaluated circuit benchmarks, fake backends, Qiskit V2.4.1, and selected compiler options. Although QOptBench contains diverse QASMbench and VeriQBench circuits, the distilled rules and QCompass may not fully generalize to substantially different workloads, hardware architectures, or future compiler versions. Moreover, most experiments use estimated fidelity, while real devices may additionally be affected by calibration drift, crosstalk, and runtime noise. We partially mitigate these threats through evaluations on new circuits and devices (§ 6.4) and an additional noise-aware execution fidelity experiment on the noisy simulator (§ 6.5), but broader compiler and real-hardware evaluations remain future work.

Conclusion

In this paper, we explore a top-down paradigm for quantum compiler configuration selection. We construct QOptBench with empirical oracle configurations, use these oracles to distill transferable configuration rules, and apply them to new circuits. We further develop QCompass, a rule-guided framework for fast configuration selection. Our results show that QCompass achieves best overall quality–latency trade-off compared with baselines.

In future work, we plan to extend this top-down paradigm to broader quantum compilers, larger and evolving device pools, and real quantum hardware. We also aim to explore more efficient oracle construction to reduce offline characterization cost and improve scalability, together with continual rule adaptation to preserve the effectiveness and transferability of distilled rules.

References

  1. [1]Anthropic. 2026. Introducing Claude Sonnet 4.6. Accessed: Jun 8th 2026. [Online]. Available: https://www.anthropic.com/news/claude-sonnet-4-6.
  2. [2]Abdul Basit, Minghao Shao, Muhammad Haider Asif, Nouhaila Innan, Muhammad Kashif, Alberto Marchisio, and Muhammad Shafique. 2025. PennyCoder: Efficient Domain-Specific LLMs for PennyLane-Based Quantum Code Generation. In 2025 IEEE International Conference on Quantum Computing and Engineering (QCE). IEEE, Albuquerque, New Mexico, USA, 229–234. https://doi.org/10.1109/QCE65121.2025.10324
  3. [3]ByteDance Seed. 2026. Seed 2.0. Accessed: Jun 24th 2026. [Online]. Available: https://seed.bytedance.com/en/seed2.
  4. [4]Charlie Campbell, Hao Mark Chen, Wayne Luk, and Hongxiang Fan. 2025. Enhancing LLM-Based Quantum Code Generation with Multi-Agent Optimization and Quantum Error Correction. In Proceedings of the 62nd Annual ACM/IEEE Design Automation Conference (DAC ’25). IEEE Press, San Francisco, California, United States, Article 414, 7 pages. https://doi.org/10.1109/DAC63849.2025.11133316
  5. [5]Yudong Cao, Jonathan Romero, Jonathan P. Olson, Matthias Degroote, Peter D. Johnson, Mária Kieferová, Ian D. Kivlichan, Tim Menke, Borja Peropadre, Nicolas P. D. Sawaya, Sukin Sim, Libor Veis, and Alán Aspuru-Guzik. 2019. Quantum Chemistry in the Age of Quantum Computing. Chemical Reviews 119, 19 (2019), 10856–10915. https://doi.org/10.1021/acs.chemrev.8b00803 arXiv:https://doi.org/10.1021/acs.chemrev.8b00803 PMID: 31469277.
  6. [6]Junjie Chen, Ningxin Xu, Peiqi Chen, and Hongyu Zhang. 2021. Efficient Compiler Autotuning via Bayesian Optimization. In Proceedings of the 43rd International Conference on Software Engineering (ICSE ’21). IEEE Press, 1198–1209. https://doi.org/10.1109/ICSE43902.2021.00110
  7. [7]Kean Chen, Wang Fang, Ji Guan, Xin Hong, Mingyu Huang, Junyi Liu, Qisheng Wang, and Mingsheng Ying. 2022. VeriQBench: A Benchmark for Multiple Types of Quantum Circuits. arXiv:2206.10880 [quant-ph] https://arxiv.org/abs/2206.10880
  8. [8]Claude. 2026. Introducing Claude Opus 5. Accessed: Jun 25th 2026. [Online]. Available: https://www.anthropic.com/news/claude-opus-5.
  9. [9]Katherine E. Coons, Behnam Robotamili, Matthew E. Taylor, Bertrand A. Maher, Doug Burger, and Kathryn S. McKinley. 2008. Feature selection and policy optimization for distributed instruction placement using reinforcement learning. In Proceedings of the 17th International Conference on Parallel Architectures and Compilation Techniques (PACT ’08). Association for Computing Machinery, New York, NY, USA, 32–42. https://doi.org/10.1145/1454115.1454122
  10. [10]Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta. 2017. Open Quantum Assembly Language. arXiv:1707.03429 [quant-ph] https://arxiv.org/abs/1707.03429
  11. [11]Chris Cummins, Vram V. Seeker, Dejan Grubisic, Baptiste Roziere, Jonas Gehring, Gabriel Synnaeve, and Hugh Leather. 2025. LLM Compiler: Foundation Language Models for Compiler Optimization. In Proceedings of the 34th ACM SIGPLAN International Conference on Compiler Construction (Las Vegas, NV, USA) (CC ’25). Association for Computing Machinery, New York, NY, USA, 141–153. https://doi.org/10.1145/3708493.3712691
  12. [12]Chris Cummins, Bram Wast, Jigang Guo, Brandon Cui, Jason Ansel, Sahir Gomez, Somya Jain, Jia Liu, Olivier Teytaud, Benoit Steiner, Yuandong Tian, and Hugh Leather. 2022. CompilerGym: robust, performant compiler optimization environments for AI research. In Proceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization (Virtual Event, Republic of Korea) (CGO ’22). IEEE Press, 92–105. https://doi.org/10.1109/CGO53902.2022.9741258
  13. [13]Siddharth Dangwal, Gokul Subramanian Ravi, Lennart Maximilian Seifert, Poulamai Das, James Sud, and Frederic T. Chong. 2025. Clifford Assisted Optimal Pass Selection for Quantum Transpilation. arXiv:2306.15020 [quant-ph] https://arxiv.org/abs/2306.15020
  14. [14]DeepSeek. 2025. DeepSeek-V3.2 Release. Accessed: Jun 5th 2026. [Online]. Available: https://api-docs.deepseek.com/news/news251201/.
  15. [15]DeepSeek. 2026. DeepSeek V4 Preview Release. Accessed: Jun 5th 2026. [Online]. Available: https://api-docs.deepseek.com/news/news260424/.
  16. [16]Tao Feng, Fangxu Yu, Haozhen Zhang, Zhongjie Dai, Liangqi Yuan, Zijie Lei, Weizhi Zhang, Kunlun Zhu, Haodong Yue, Keyang Xuan, Ge Liu, and Jiaxuan You. 2026. LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers. arXiv preprint arXiv:2608.06867 (2026).
  17. [17]Unai Garciarena and Roberto Santana. 2016. Evolutionary Optimization of Compiler Flag Selection by Learning and Exploiting Flags Interactions. In Proceedings of the 2016 on Genetic and Evolutionary Computation Conference Companion (Denver, Colorado, USA) (GECCO ’16 Companion). Association for Computing Machinery, New York, NY, USA, 1159–1166. https://doi.org/10.1145/2908961.2931696
  18. [18]Pierre Geurts, Damien Ernst, and Louis Wehenkel. 2006. Extremely randomized trees. Mach. Learn. 63, 1 (April 2006), 3–42. https://doi.org/10.1007/s10994-006-6226-1
  19. [19]Google DeepMind. 2026. Gemini 3.1 Flash-Lite Model Card. Accessed: Jun 5th 2026. [Online]. Available: https://deepmind.google/models/model-cards/gemini-3-1-flash-lite/.
  20. [20]Google DeepMind. 2026. Gemini 3.5 Flash. Accessed: Jun 5th 2026. [Online]. Available: https://deepmind.google/models/gemini-3-5-flash/.
  21. [21]Xiaoyu Guo, Minggu Wang, and Jianjun Zhao. 2025. QuanBench: Benchmarking Quantum Compilation with Large Language Models. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE Press, Seoul, South Korea.arxiv.org/abs/2510.16779
  22. [22]Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd. 2009. Quantum Algorithm for Linear Systems of Equations. Phys. Rev. Lett. 103 (Oct 2009), 150502. Issue 15. https://doi.org/10.1103/PhysRevLett.103.150502
  23. [23]Mohammad Abrarul Hasanat, Ludmir Jason, Patel Tirthak, and Rohan Basu Roy. 2026. TuniQ: Autotuning Compilation Passes for Quantum Workloads at Scale for Effectiveness and Efficiency. In Proceedings of the 39th ACM International Conference on Supercomputing (Belfast, Northern Ireland) (ICS ’26). Association for Computing Machinery, New York, NY, USA.
  24. [24]Kenneth Hoste and Lieven Eeckhout. 2008. Code: compiler optimization level exploration. In Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization (Boston, MA, USA) (CGO ’08). Association for Computing Machinery, New York, NY, USA, 165–174. https://doi.org/10.1145/1356058.1356080
  25. [25]Qijing Huang, Ameer Haj-Ali, William Moses, John Xiang, Ion Stoica, Krste Asanovic, and John Warzyknek. 2019. AutoPhase: Compiler Phase-Ordering for HLS with Deep Reinforcement Learning. In 2019 IEEE 27th Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM). 308–308. https://doi.org/10.1109/FCCM.2019.00049
  26. [26]IBM. 2026. Introduction to Qiskit and IBM Quantum. Accessed: Apr 15th 2026. [Online]. Available: https://quantum.cloud.ibm.com/docs/en/guides/.
  27. [27]Ali Javadi-Abhari, Matthew Treinish, Kevin Krsulich, Christopher J. Wood, Jake Lishman, Julien Gacon, Simon Martiel, Paul D. Nation, Lev S. Bishop, Andrew W. Cross, Blake R. Johnson, and Jay M. Gambetta. 2024. Quantum Computing with Qiskit. arXiv:2405.08810 [quant-ph] https://arxiv.org/abs/2405.08810
  28. [28]Richard Jozsa. 1994. Fidelity for Mixed Quantum States. Journal of Modern Optics 41, 12 (1994), 2315–2323. https://doi.org/10.1080/09500349414552171 arXiv:https://doi.org/10.1080/09500349414552171
  29. [29]Sameer Kulkarni and John Cavazos. 2012. Mitigating the compiler optimization phase-ordering problem using machine learning. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (Tucson, Arizona, USA) (OOPSLA ’12). Association for Computing Machinery, New York, NY, USA, 147–162. https://doi.org/10.1145/2384616.2384628
  30. [30]Ang Li, Samuel Stein, Sriram Krishnamoorthy, and James Ang. 2023. QASMBench: A Low-Level Quantum Benchmark Suite for NISQ Evaluation and Simulation. ACM Transactions on Quantum Computing 4, 2, Article 10 (Feb. 2023), 26 pages. https://doi.org/10.1145/3550488
  31. [31]Lingda Li, Thomas Flynn, and Adolfoly Hoisie. 2024. Learning Generalizable Program and Architecture Representations for Performance Modeling. In Proceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis (Atlanta, GA, USA) (SC ’24). IEEE Press, Article 66, 15 pages. https://doi.org/10.1109/SC41406.2024.00072
  32. [32]Zhiding Liang, Zhixin Song, Jinglei Cheng, Hang Ren, Tianyi Hao, Rui Yang, Yiyu Shi, and Tongyang Li. 2024. Combining Parameterized Pulses and Contextual Subspace for More Practical VQE. In Proceedings of the 61st ACM/IEEE Design Automation Conference. 1–6.
  33. [33]Yi Liu, Yuqiang Jin, and Jinchen Xu. 2025. A Portable Auto-Tuning Framework for Quantum Compilation Optimization Based on D3QN. In Proceedings of the 2025 6th International Conference on Computer Information and Big Data Applications (CIBDA ’25). Association for Computing Machinery, New York, NY, USA, 1422–1428. https://doi.org/10.1145/3746709.3746950
  34. [34]Peixun Long and Jianjun Zhao. 2024. Testing Multi-Subroutine Quantum Programs: From Unit Testing to Integration Testing. ACM Trans. Softw. Eng. Methodol. 33, 6, Article 147 (June 2024), 61 pages. https://doi.org/10.1145/3656339
  35. [35]Ning Ma and Heng Li. 2025. Understanding and Estimating the Execution Time of Quantum Circuits. ACM Trans. Softw. Eng. Methodol. (Nov. 2025). https://doi.org/10.1145/3778031 Just Accepted.
  36. [36]Daniel Mills, Ifan Williams, Jacob Swain, Gabriel Matos, Enrico Rinaldi, and Alexander Koziel-Pipe. 2026. Reinforcement Learning for Adaptive Composition of Quantum Circuit Optimisation Passes. arXiv:2601.21629 [quant-ph] https://arxiv.org/abs/2601.21629
  37. [37]Azalia Mirhoseini, Hieu Pham, Quoc V. Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeff Dean. 2017. Device placement optimization with reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning - Volume 70 (Sydney, NSW, Australia) (ICML ’17). JMLR.org, 2430–2439.
  38. [38]Juan Manuel Murillo, Jose Garcia-Alonso, Enrique Moguel, Johanna Barzen, Frank Leymann, Shaukat Ali, Tao Yue, Paolo Arcaini, Ricardo Pérez-Castillo, Ignacio García-Rodríguez de Guzmán, Mario Piattini, Antonio Ruiz-Cortés, Antonio Brogi, Jianjun Zhao, Andriy Miranskyy, and Manuel Wimmer. 2025. Quantum Software Engineering: Roadmap and Challenges Ahead. ACM Trans. Softw. Eng. Methodol. 34, 5, Article 154 (May 2025), 48 pages. https://doi.org/10.1145/3712002
  39. [39]OpenAI. 2025. GPT-5 is here. Accessed: Jun 2nd 2026. [Online]. Available: https://openai.com/gpt-5/.
  40. [40]OpenAI. 2025. Introducing GPT-5.2. Accessed: Jul 1st 2026. [Online]. Available: https://openai.com/introducing-gpt-5-2.
  41. [41]OpenAI. 2026. Introducing GPT-5.5. Accessed: Jun 4th 2026. [Online]. Available: https://openai.com/introducing-gpt-5-5/.
  42. [42]OpenRouter. 2026. The Unified Interface For Every Model. Accessed: May 4th 2026. [Online]. Available: https://openrouter.ai.
  43. [43]Haolin Pan, Lianghong Huang, Jinyuan Dong, Mingjie Xing, and Yanjun Wu. 2026. ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization. arXiv:2602.00087 [cs.LG] https://arxiv.org/abs/2602.00087
  44. [44]Haolin Pan, Yuanyu Wei, Mingjie Xing, Yanjun Wu, and Chen Zhao. 2025. Towards Efficient Compiler Auto-tuning: Leveraging Synergistic Search Spaces. In Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization (Las Vegas, NV, USA) (CGO ’25). Association for Computing Machinery, New York, NY, USA, 614–627. https://doi.org/10.1145/3696443.3708961
  45. [45]Sunghyun Park, Salar Latifi, Yongjun Park, Armand Behroozi, Byungsoo Jeon, and Scott Mahlke. 2022. SRTuner: effective compiler optimization customization by exposing synergistic relations. In Proceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization (Virtual Event, Republic of Korea) (CGO ’22). IEEE Press, 118–130. https://doi.org/10.1109/CGO53902.2022.9741263
  46. [46]Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, and Jeremy L. O’Brien. 2014. A Variational Eigenvalue Solver on a Photonic Quantum Processor. Nature Communications 5, 1 (7 2014), 7 pages. https://doi.org/10.1038/ncomms5213
  47. [47]Tianlu Qiao, Mingxuan Zhu, Zeyu Sun, and Dan Hao. 2026. WarmTuner: Program-Specific Warm Starts for Compiler Autotuning via Offline-to-Online Reinforcement Learning. arXiv:2607.25831 [cs.SE] https://arxiv.org/abs/2607.25831
  48. [48]Lei Qiu, Zi Yang, Fang Lyu, Ming Zhong, Huimin Cui, and Xiaobing Feng. 2026. Beyond Pass-by-Pass Optimization: Intent-Driven IR Optimization with Large Language Models. arXiv:2602.18511 [cs.PL] https://arxiv.org/abs/2602.18511
  49. [49]Nils Quetschlich, Lukas Burgholzer, and Robert Wille. 2023. Compiler Optimization for Quantum Computing Using Reinforcement Learning. In Proceedings of the 60th Annual ACM/IEEE Design Automation Conference (San Francisco, California, United States) (DAC ’23). IEEE Press, 1–6. https://doi.org/10.1109/DAC56929.2023.10248002
  50. [50]Nils Quetschlich, Lukas Burgholzer, and Robert Wille. 2025. MQT Predictor: Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing. ACM Transactions on Quantum Computing 6, 1, Article 10 (Jan. 2025), 26 pages. https://doi.org/10.1145/3673241
  51. [51]Q Wen. 2026. Qwen3.5: Towards Native Multimodal Agents. Accessed: Jun 5th 2026. [Online]. Available: https://qwen.ai/blog?id=qwen3.5.
  52. [52]John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal Policy Optimization Algorithms. CoRR abs/1707.06347 (2017). arXiv:1707.06347 http://arxiv.org/abs/1707.06347
  53. [53]Bochen Tan and Jason Cong. 2020. Optimal layout synthesis for quantum computing. In Proceedings of the 39th International Conference on Computer-Aided Design (Virtual Event, USA) (ICCAD ’20). Association for Computing Machinery, New York, New York, USA, Article 137, 9 pages. https://doi.org/10.1145/3400302.3415620
  54. [54]Siwei Tan, Liqiang Lu, Debin Xiang, Tianyao Chu, Congliang Lang, Jintao Chen, Xing Hu, and Jianwei Yin. 2025. Homotopy-Like Method for Automated Quantum Program Repair. Proc. ACM Softw. Eng. 2, FSE, Article FSE034 (June 2025), 23 pages. https://doi.org/10.1145/3715751
  55. [55]Lukas Trümper, Tal Ben-Nun, Philipp Schaad, Alexandru Calotoiu, and Torsten Hoefler. 2023. Performance Embeddings: A Similarity-Based Transfer Tuning Approach to Performance Optimization. In Proceedings of the 37th ACM International Conference on Supercomputing (Orlando, FL, USA) (ICS ’23). Association for Computing Machinery, New York, NY, USA, 50–62. https://doi.org/10.1145/3577193.3593714
  56. [56]Hanrui Wang, Zhiding Liang, Jiaqi Gu, Zirui Li, Yongshan Ding, Weiwen Jiang, Yiyu Shi, David Z. Pan, Frederic T. Chong, and Song Han. 2022. TorQuantum Case Study for Robust Quantum Circuits. In Proceedings of the 41st IEEE/ACM International Conference on Computer-Aided Design (San Diego, California) (IC-CAD ’22). Association for Computing Machinery, New York, New York, USA, Article 136, 9 pages. https://doi.org/10.1145/3508352.3561118
  57. [57]Jiyuan Wang, Qian Zhang, Guoqing Harry Xu, and Miryung Kim. 2021. QD-iff: Differential Testing of Quantum Software Stacks. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE Press, Melbourne, Australia, 692–704. https://doi.org/10.1109/ASE51524.2021.9678792
  58. [58]Xinyi Wang, Shaukat Ali, Tao Yue, and Paolo Arcaini. 2024. Quantum Approximate Optimization Algorithm for Test Case Optimization. IEEE Transactions on Software Engineering 50, 12 (2024), 3249–3264. https://doi.org/10.1109/TSE.2024.3479421
  59. [59]R. F. Woolson. 2008. Wilcoxon Signed-Rank Test. John Wiley & Sons, Ltd, 1–3.
  60. [60]Shangzhou Xia, Jianjun Zhao, Fuyuan Zhang, and Xiaoyu Guo. 2025. Quantum Compiling. Proc. ACM Softw. Eng. 2, ISSTA, Article ISSTA051 (June 2025), 21 pages. https://doi.org/10.1145/3728926
  61. [61]Rui Yang, Ziruo Wang, Yuntian Gu, Yitao Liang, and Tongyang Li. 2025. QCircuitBench: A Large-Scale Dataset for Benchmarking Quantum Algorithm Design. In The Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track. https://openreview.net/forum?id=NkIlldW2biarxiv.org/abs/2410.07961
  62. [62]Zhipu AI. 2026. GLM-5: Next Generation Large Language Model. Accessed: Jun 24th 2026. [Online]. Available: https://glm-5.org/.
  63. [63]Ming Zhong, Xiangyu Ren, Jinglei Cheng, Shaohua Li, and Zhiding Liang. 2026. QuTuner: Feature- and Learning-Guided Optimization Pass Tuning for Quantum Compilers. arXiv preprint arXiv:2607.04586 (2026). https://arxiv.org/abs/2607.04586
  64. [64]Mingxuan Zhu, Dan Hao, and Junjie Chen. 2024. Compiler Autotuning through Multiple-phase Learning. ACM Trans. Softw. Eng. Methodol. 33, 4, Article 100 (April 2024), 38 pages. https://doi.org/10.1145/3640330
  65. [65]Mingxuan Zhu, Zeyu Sun, and Dan Hao. 2025. PDCAT: Preference-Driven Compiler Auto-tuning. Proc. ACM Softw. Eng. 2, FSE, Article FSE039 (June 2025), 21 pages. https://doi.org/10.1145/3715756

Paper details

vlnc:W_qgzwrtc6
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents