Representation as a Variable: Cross-Framework Variance Decomposition for Quantum Compilation
David Vesterlund
Abstract
Abstract The frameworks algorithm interaction explains 32–42% of circuit depth variance across 6–12 qubit circuits—exceeding the framework main effect (10–14%) and approaching the algorithm main effect (23–34%). No single compilation framework is universally optimal; the best framework depends on the algorithm, and representation search within a framework explains up to 78% of depth variance at 12 qubits. A quantum algorithm does not determine a unique compiled circuit. The choice of compilation framework, configuration within that framework, and the interaction between the two jointly determine the final circuit depth, gate count, and two-qubit gate count. We treat this representation choice as an optimization variable and ask: how much of compilation quality variance comes from the framework, from the configuration, and from their interaction? We conduct a large-scale empirical study across four quantum compilation frameworks (Qiskit, PyTKET, PennyLane, Cirq), six benchmark algorithms (QFT, Grover, QPE, GHZ, Bernstein–Vazirani, and a superposition circuit), four circuit sizes (6, 8, 10, 12 qubits), and three replicates per cell, yielding 4,608 observations. We apply a two-factor variance decomposition (algorithm Å~ framework) and a within-framework decomposition (algorithm vs. configuration). We find three results. First, the framework Å~ algorithm interaction explains 32–42% of circuit depth variance (mean 39%), exceeding the framework main effect (mean 12%) and approaching the algorithm main effect (mean 29%). No single framework dominates for all algorithms. Second, configuration choice within a single framework explains up to 78% of depth variance at 12 qubits, and this fraction grows with circuit size. Third, the four frameworks expose structurally different representation search spaces—ranging from 6 to 128 configurations across different compilation dimensions—meaning the “representation space” is framework-defined, not universal. These findings support the thesis that representation is a genuine optimization variable: the choice of how to compile a quantum algorithm matters as much as the choice of algorithm itself, and its importance grows with circuit scale.