Variational Quantum Compilation Overview
- Variational quantum compilation is the optimization of parameterized quantum circuits to approximate a target unitary, accounting for hardware limitations and noise.
- It integrates fixed ansatz, architecture search, and pulse-level methods to support both static and dynamic variational quantum algorithms.
- Tailored cost functions and reinforcement-learning strategies address trainability, noise resilience, and efficient execution in practical quantum systems.
Searching arXiv for recent and foundational papers on variational quantum compilation and related compilation-for-VQAs topics. First search: variational quantum compiling / compilation. Variational quantum compilation denotes a family of approaches in which compilation is itself treated as an optimization problem over parameterized quantum circuits or, more broadly, over parameterized hardware-level representations of a quantum program. In the most traditional sense, the task is to approximate a target unitary by a trainable circuit so that reproduces exactly or approximately under a compilation cost such as a Hilbert–Schmidt-overlap objective (Sharma et al., 2019, Herrera-Martí, 2021). In a broader systems sense, the term also encompasses compilation methods tailored to variational quantum algorithms (VQAs), where the repeated execution of parameterized circuits, the interaction between logical design and hardware-aware transpilation, and the preservation of symbolic parameters become central compilation concerns (Krol et al., 2022, Khalate et al., 2022, Peham et al., 2022, Kashif et al., 16 Apr 2026). More specialized developments extend the paradigm to Hamiltonian dynamics compilation (Zhang et al., 2024, Mizuta et al., 2022, Kanasugi et al., 2023), mixed-state preparation (Ezzell et al., 2022), structured QAOA compilation (Jin et al., 2021), and pulse-level or hybrid gate–pulse realizations on superconducting hardware (Gokhale et al., 2019, Liang et al., 2022).
1. Concept and scope
In its canonical formulation, variational quantum compiling seeks a parameterized circuit that approximates a target unitary , with exact compilation corresponding to equality up to global phase and approximate compilation corresponding to small residual cost (Sharma et al., 2019, He et al., 2021). A representative global objective is the Hilbert–Schmidt-based cost
where for qubits; iff 0 and 1 differ only by a global phase factor (Sharma et al., 2019, He et al., 2021). Related formulations compile only the action of a unitary on a fixed input state, rather than the full operator, through Loschmidt-echo-style costs (Sharma et al., 2019, Bilek et al., 2022).
A second, increasingly important usage concerns the compilation of VQAs themselves. Here the issue is not only whether a circuit family can express a target unitary, but how a parameterized ansatz should be represented, lowered, verified, and repeatedly executed on constrained hardware (Krol et al., 2022, Khalate et al., 2022, Peham et al., 2022, Liang et al., 2022). This broader notion includes compiler support for late binding of gate parameters (Krol et al., 2022), runtime rebinding of compiled kernels (Khalate et al., 2022), symbolic verification of transpiled parameterized circuits (Peham et al., 2022), and hardware-aware co-design of the compilation boundary between gate-level and pulse-level abstractions (Liang et al., 2022).
This dual usage is not merely terminological. A plausible implication is that the field has split into at least two tightly connected strands: compilation by variational optimization of target transformations, and compilation for variational workloads whose structure and repeated execution patterns create distinct systems problems (Sharma et al., 2019, Krol et al., 2022).
2. Core formulations and objective functions
A standard VQC setup writes the target of compilation as a unitary 2 and the trainable circuit as 3, often with a fixed architecture and continuous parameters (Sharma et al., 2019, Herrera-Martí, 2021). In full-unitary matrix compiling, the principal cost is
4
which is related to average gate fidelity (Sharma et al., 2019). Local variants such as
5
replace the global overlap by an average over local Hilbert–Schmidt tests and obey the faithfulness bound
6
so 7 iff 8 up to global phase (Sharma et al., 2019). For fixed-input-state compiling, the corresponding global and local Loschmidt-echo objectives are
9
with an analogous faithfulness relation (Sharma et al., 2019).
Policy-gradient and reinforcement-learning formulations preserve the same compilation target but alter the optimization variable. One formulation replaces direct optimization over 0 by optimization over a stochastic policy 1, with expected reward
2
and score-function gradient
3
for sampled training states 4 (Herrera-Martí, 2021). Another reinforcement-learning approach treats circuit structure as a discrete variable and jointly optimizes
5
where 6 specifies gate identities, qubit operands, and order (He et al., 2021).
Universal-compilation formulations specialized to state preparation and tomography optimize the Fubini–Study distance
7
or equivalently pure-state fidelity (Hai et al., 2022). Mixed-state variants replace pure-state overlap by the Hilbert–Schmidt distance
8
under a rank constraint 9 (Ezzell et al., 2022).
For dynamics compilation, the ideal objective may be unitary infidelity
0
but scalable formulations instead optimize empirical risk over input–output training examples,
1
where 2 and 3 are sampled product states (Zhang et al., 2024).
3. Methodological families
Several distinct methodological families coexist within variational quantum compilation.
The first is unitary or state compiling with fixed ansatzes. Here one chooses a trainable circuit architecture and optimizes only its continuous parameters against overlap-based costs such as HST, LHST, LET, or Fubini–Study distance (Sharma et al., 2019, Herrera-Martí, 2021, Hai et al., 2022). Examples include dressed-CNOT ansatzes for compiling Toffoli, QFT, and W-state preparation (Sharma et al., 2019), nearest-neighbor 4 and 5 ansatzes under policy-gradient training (Herrera-Martí, 2021), and linear or graph-based ansatzes for GHZ and W state preparation (Hai et al., 2022).
The second is structure-learning or architecture-search VQC. In this family, circuit structure itself is an optimization variable. One double-6-learning formulation writes the compiled circuit as
7
and treats gate choice and qubit assignment as RL actions, with terminal reward
8
or a CNOT-penalized variant (He et al., 2021). This approach was reported to find exact or near-exact compilations with shorter circuits than fixed-template baselines on several 2- and 3-qubit targets (He et al., 2021).
The third is recursive or local compilation for deep or large-scale dynamics. Recursive variational quantum compiling (RVQC) decomposes a deep target 9 into shorter segments and trains successive ansatzes with costs
0
thereby replacing one deep noisy optimization problem by a sequence of shallower ones (Bilek et al., 2022). Local variational quantum compilation (LVQC) instead compiles a short-time evolution on a subsystem whose size is controlled by a Lieb–Robinson bound and then transfers the learned parameters to the full system (Mizuta et al., 2022, Kanasugi et al., 2023).
The fourth is Hamiltonian-structured or commuting-operator compilation. A generic strategy for the UCC ansatz partitions Pauli exponentials into mutually commuting sets, diagonalizes each set with a Clifford circuit, and synthesizes the resulting diagonal block using phase polynomials (Cowtan et al., 2020). For QAOA, a separate structured compiler exploits commuting two-qubit cost-layer terms to obtain provable linear-depth compilations on lattice-like architectures (Jin et al., 2021).
The fifth is pulse-level and hardware-native compilation. Partial compilation for variational algorithms precompiles reusable pulse blocks or tunes GRAPE hyperparameters offline so that repeated parameter updates do not incur full pulse optimization from scratch (Gokhale et al., 2019). A more recent hybrid gate–pulse model preserves the problem-informed part of a VQA at gate level while implementing the problem-agnostic part directly as native trainable pulses (Liang et al., 2022).
The sixth is compiler and runtime infrastructure for repeated parameterized execution. OpenQL Parameterized Compilation explicitly separates static circuit structure from dynamic parameters to reduce repeated recompilation overhead in hybrid loops (Krol et al., 2022). An LLVM-based C++ toolchain compiles a parameterized hybrid program once, packages quantum kernels in ELFQ, and rebinds dynamic parameters at runtime, reducing total latency from
1
to
2
for 3 optimization iterations (Khalate et al., 2022).
The seventh is verification and analysis of compiled parameterized circuits. Symbolic equivalence checking via ZX-calculus verifies whether a parameterized ansatz remains correct after transpilation for all parameter values (Peham et al., 2022). Hardware-aware transpilation has also been shown to reshape gradient statistics and hence trainability, implying that compilation itself modifies the optimization landscape of VQCs (Kashif et al., 16 Apr 2026).
4. Hardware awareness, trainability, and noise
Hardware-awareness is a recurring theme because near-term performance is dominated by two-qubit error, depth, routing overhead, and control constraints. One line of work on superconducting hardware argues that the most effective compilation strategy for VQAs is neither purely gate-level nor purely pulse-level, but a hybrid in which “fixed” problem-informed layers remain at gate abstraction while “problem-agnostic” layers are compiled and optimized at the pulse level (Liang et al., 2022). In a QAOA case study, the Hamiltonian layer is kept gate-level while the mixer layer is represented by a native pulse ansatz with trainable amplitude, phase, and frequency controls (Liang et al., 2022).
A closely related issue is the repeated cost of compiling parameterized circuits in VQE- or QAOA-style loops. OpenQL Parameterized Compilation introduces explicit parameter objects so that only parameterized instructions and affected instructions are reconsidered during recompilation; when no QASM output is written, repeated compilations incur almost no additional wall-clock time beyond the first compile (Krol et al., 2022). A more aggressive systems design in an LLVM-based toolchain preserves parameterized instructions in compiled artifacts and performs runtime rebinding, so that programmers can call quantum routines “the same way as classical routines” while avoiding recompilation across iterations (Khalate et al., 2022).
Trainability is not invariant under compilation. A recent study comparing logical circuits 4 and their transpiled physical counterparts 5 shows that transpilation can alter gradient variance in ansatz-dependent ways (Kashif et al., 16 Apr 2026). The metric
6
reveals that shallow circuits are the most sensitive to hardware-aware compilation, while deep circuits show little sensitivity across EfficientSU2, TTN, and RealAmplitudes families (Kashif et al., 16 Apr 2026). This suggests that logical-level trainability analyses may be misleading when the physically executed circuit differs structurally from the abstract ansatz.
Noise affects both optimization and correctness in distinct ways. For traditional VQC costs based on HST/LHST or LET/LLET, rigorous results establish Optimal Parameter Resilience (OPR) under broad classes of incoherent noise models. Strong OPR means
7
while weak OPR means
8
so noisy optimization preserves the ideal optimum set or a subset thereof (Sharma et al., 2019). Theorems in that work show strong OPR for HST/LHST costs under depolarizing, Pauli, Pauli-gate, measurement, and certain non-unital Pauli noise models, and weak OPR for LET/LLET (Sharma et al., 2019).
At the same time, noise can render optimization practically untrainable even if the optimum is preserved. RVQC addresses this by reducing effective training depth from 9 to
0
when a target of depth 1 is segmented into 2 parts and compiled recursively with an ansatz of depth 3 (Bilek et al., 2022). Under the noise-induced barren plateau analysis adopted there, the gradient suppression changes from
4
to
5
providing a concrete trainability rationale for segmentation (Bilek et al., 2022).
5. Representative applications
5.1 Unitary and state compiling
Variational compiling was demonstrated early on for quantum Fourier transform, Toffoli, and W-state preparation, where noisy training on IBM’s noisy simulator still learned parameters that minimized the noiseless compilation cost (Sharma et al., 2019). Policy-gradient compiling later showed competitive performance relative to COBYLA and Powell on shallow random target circuits while avoiding Hilbert–Schmidt-test overheads (Herrera-Martí, 2021). Universal-compilation-based state preparation was studied with linear and graph-based ansatzes for GHZ and W states, using Fubini–Study distance and optimizers including QNG (Hai et al., 2022).
5.2 Quantum state tomography and mixed-state compiling
Universal compilation was also specialized to tomography of unknown pure states prepared by a circuit oracle, again using overlap estimation via inversion and computational-basis measurement (Hai et al., 2022). Mixed-state compiling generalizes the paradigm by learning either a purification-based ansatz
6
or a convex combination of pure states
7
to approximate a target density matrix (Ezzell et al., 2022). The optimal rank-8 approximation under the Hilbert–Schmidt distance is
9
so the method also functions as a compression and principal-component-learning procedure (Ezzell et al., 2022).
5.3 Hamiltonian dynamics and many-body simulation
A major recent strand treats variational quantum compilation as dynamics compression. One approach casts compilation of 0 as supervised quantum machine learning and trains a brickwall ansatz 1 on a small set of time-evolved product states (Zhang et al., 2024). The empirical risk
2
is justified by generalization results connecting random-product-state risk to Haar-average risk and hence to unitary infidelity (Zhang et al., 2024). This method was reported to exceed prior VQC results in both system size and accuracy in 1D and to extend VQC to 2D strips via quasi-1D treatment (Zhang et al., 2024).
LVQC complements this by compiling short-time evolution on smaller subsystems using local HST/LHST costs and Lieb–Robinson bounds (Mizuta et al., 2022). A later application to Green’s-function estimation for the Fermi–Hubbard model uses the same idea to learn shallow local dynamics circuits on small subsystems and reuse them unchanged on lattices up to 3 sites (32 qubits) (Kanasugi et al., 2023). There the retarded Green’s function
4
is computed with the compiled circuit replacing exact real-time evolution (Kanasugi et al., 2023).
5.4 VQE, UCC, and Pauli-operator ansätze
For UCC-type VQE circuits, a generic compilation strategy partitions Pauli exponentials into commuting sets, diagonalizes each set with a Clifford circuit, and synthesizes the resulting phase gadgets by phase-polynomial methods (Cowtan et al., 2020). Across molecules, basis sets, and encodings, this yielded average CX depth reduction of 5 and up to 6 compared with naive synthesis (Cowtan et al., 2020).
Tetris addresses another chemistry-oriented setting: compilation of Pauli-string exponentials with explicit emphasis on reducing two-qubit gates in VQA circuits (Jin et al., 2023). Its Tetris-IR partitions each Pauli block into root-tree and leaf-tree qubit sets so that shared leaf-tree structure induces CNOT cancellation. It reports up to 7 reduction in CNOT counts, 8 reduction in depth, and 9 reduction in duration relative to state-of-the-art approaches (Jin et al., 2023).
5.5 QAOA and structured variational circuits
QAOA is a recurring application because its cost-layer terms commute and its ansatz structure is graph-induced. A structured compiler exploiting this commutativity obtains linear-depth compilation guarantees on multi-dimensional hardware and reports up to 0 depth speedup, 1 gate-count reduction, and 2 improvement in circuit ESP up to 1024 qubits (Jin et al., 2021). Hardware-aware hybrid gate–pulse compilation for QAOA on IBM superconducting backends further demonstrates that preserving the Hamiltonian layer at gate level while optimizing the mixer layer at pulse level can improve approximation ratio and shorten pulse duration (Liang et al., 2022).
6. Verification, infrastructure, and open issues
Trustworthy variational compilation requires verification because a compiled parameterized ansatz is typically reused across many optimization iterations. Symbolic equivalence checking of parameterized circuits via ZX-calculus addresses this directly (Peham et al., 2022). Two parameterized circuits are equivalent only if for every parameter assignment 3, the instantiated circuits are equal up to global phase. Under the paper’s linear-angle assumption
4
symbolic ZX rewriting can prove equivalence without instantiating parameters, while inequivalence can be exposed by structured or random instantiations (Peham et al., 2022). The completeness guarantee rests on the theorem
5
for genuinely non-equivalent parameterized circuits with linear parameter expressions, so a random instantiation almost surely exposes inequivalence (Peham et al., 2022).
Infrastructure papers expose another crucial systems issue: the effective compilation unit in VQAs is often not a fully instantiated circuit but a parameterized kernel. OpenQL_PC makes explicit parameter objects first-class IR entities and updates only parameterized instructions during recompilation (Krol et al., 2022). The LLVM-based single-source toolchain goes further by introducing quantum basic blocks embedded in ELFQ binaries and rebinding parameter values dynamically at runtime (Khalate et al., 2022). This suggests that scalable variational quantum compilation depends as much on compiler/runtime co-design as on ansatz-level optimization.
Several limitations and controversies remain. Traditional VQC costs such as HST are expressive but can exhibit barren plateaus (Sharma et al., 2019, Herrera-Martí, 2021). State-based or local costs improve trainability but may sacrifice some global guarantees (Sharma et al., 2019, Hai et al., 2022). Hardware-aware transpilation can reshape trainability itself, complicating any separation between “algorithm design” and “compilation” (Kashif et al., 16 Apr 2026). Many methods remain specialized: the hybrid gate–pulse model is clearly tuned to superconducting hardware and to ansätze with a meaningful fixed/flexible split (Liang et al., 2022); partial pulse compilation depends on ansatz monotonicity and block structure (Gokhale et al., 2019); LVQC relies on locality and Lieb–Robinson-type bounds (Mizuta et al., 2022, Kanasugi et al., 2023). Mixed-state compiling and universal-compilation-based tomography assume access models that are stronger than generic experimental tomography settings (Ezzell et al., 2022, Hai et al., 2022).
A plausible implication is that “variational quantum compilation” is best treated not as a single algorithmic primitive but as a layered field spanning operator learning, structured circuit compression, symbolic verification, hardware-native realization, and repeated parameterized execution. Across these layers, the common theme is the replacement of static one-shot compilation by compilation procedures that explicitly account for trainability, parameter reuse, hardware constraints, and the semantics of variational quantum programs (Sharma et al., 2019, Krol et al., 2022, Liang et al., 2022, Kashif et al., 16 Apr 2026).