Compiler-Aligned Parameter Freezing for Parameter-Shift Training

Training a parameterized quantum circuit is expensive in a way that training a classical network is not. A parameterized quantum circuit is a sequence of quantum gates whose rotation angles are tuned like neural-network weights. On real hardware, the gradient for each angle is estimated by the parameter-shift rule: run the circuit twice with that one angle nudged forward and backward, then take the difference. A full gradient therefore costs $2M$ circuit runs for $M$ angles. Recent optimizers cut this cost by "freezing" most angles at each step and computing gradients only for an important subset. QOC and WSBD both do this, scattering the frozen angles wherever importance scores put them.

Scattered freezing only reduces how many circuits are run. The circuits themselves stay just as deep and just as noisy. Classical pruning has seen this before: removing scattered individual weights shrinks the parameter count but buys little speed, while hardware-aligned patterns such as $N{:}M$ sparsity recover most of the accuracy and also run fast. This note carries that lesson into quantum training. The proposal is to freeze angles in units that a quantum compiler can collapse. When a whole region of the circuit acting on two or three neighboring qubits is frozen, that region is a fixed unitary. It can be exactly resynthesized into a bounded number of two-qubit gates. Every shifted circuit in that step then runs on a shallower, less noisy circuit that computes the same function.

Core Claim

Our claim is that the right granularity for parameter freezing on quantum hardware sits between the two extremes studied so far. Freezing individual angles is the extreme that WSBD reports beats layer-wise freezing by nearly 50%. Freezing whole layers is the other extreme. The intermediate unit we propose is the compactable block: a contiguous subcircuit on $k \in \{2,3\}$ adjacent qubits spanning several ansatz layers. Any fixed two-qubit unitary can be rebuilt from at most three entangling gates plus single-qubit rotations, and any fixed three-qubit unitary from a bounded number. So a frozen block that contains more entanglers than this bound can be replaced by a shorter equivalent.

Because the replacement is exact, the noiseless loss landscape seen by the active angles does not change at all. The only effects of the structure are two. First, it restricts which sets of angles can be active together, which is a cost. Second, it reduces the noise on every one of the $2|\mathbb{A}|+1$ circuits run per step, where $|\mathbb{A}|$ is the number of active angles; this is the benefit. The proposal is worth doing only if the second effect outweighs the first. That condition is falsifiable with a single transpilation measurement before any training is run.

The resource we care about is total hardware time to reach a target loss:

$$C = \sum_{t=1}^{T} (2|\mathbb{A}_t|+1)\, S_t\, \tau(d_t),$$

where $T$ is the number of optimizer steps, $S_t$ is the shots per circuit at step $t$, and $\tau(d_t)$ is the per-shot latency of a circuit of transpiled two-qubit depth $d_t$. Scattered freezing lowers $|\mathbb{A}_t|$. Block freezing also lowers $d_t$. Through lower gate error, it should also lower the $S_t$ needed to resolve a gradient of a given size above the noise floor.

Research Program

We would build a block-freezing optimizer as a wrapper around WSBD's importance scheme.

Block partition. Before training, the ansatz is split into candidate blocks by a greedy procedure. It groups gates acting on the same two or three adjacent physical qubits across consecutive layers. Each block is kept only if its entangler count exceeds the resynthesis bound, so that freezing it yields real compaction. Blocks are allowed to tile the circuit in a staggered, brickwork-like pattern. This lets importance flow between neighboring qubits rather than being trapped inside one layer, which addresses the entanglement argument WSBD gives against layer-wise freezing.

Importance and selection. Per-angle importance is the same sliding-window gradient-magnitude sum that WSBD uses, including its reset on unfreezing. It is summed per block. Blocks are sampled for activation with probability proportional to this score, under a budget of $N$ active blocks out of every group of $M$ adjacent blocks. That budget is the quantum analogue of the $N{:}M$ constraint in SR-STE.

Compilation. At each change of the frozen set, frozen blocks are fused into fixed unitaries, resynthesized, and transpiled once. All shifted circuits in that window share this compiled frozen skeleton and differ only inside active blocks.

Mask stability. Following SR-STE's observation that rapid mask toggling destabilizes sparse training, we will measure mask churn with its Sparse Architecture Divergence. We test whether shot noise inflates churn. Churn matters twice here, because each change of mask forces a recompilation. If churn is high, we add a hysteresis rule in the spirit of SR-STE's damping, so a block must lose importance for several windows before it is frozen again.

Relation to prior work. The two most relevant methods play different roles. PECT supplies the precedent that physically shrinking the circuit is valuable: it reports a 28% depth and 42% two-qubit-gate reduction on LiH. PECT removes gates permanently by zeroing angles, and it notes an increased number of function evaluations. We never change the function the circuit computes, so compaction cannot cost accuracy directly.

LiePrune also merges gates into a smaller structure. It does so once, after training, and its LiH energy errors stayed high after fine-tuning. That result constrains us away from approximate merging; our resynthesis is exact and is redone throughout training.

The basis-rotation ideas in ARMOR and EigenDamage motivate the hardware-alignment framing, but we do not import their factorizations.

Baselines

Naive reference. The do-nothing reference is full parameter-shift Adam with no freezing. Every angle's gradient is computed every step on the circuit transpiled at the highest standard optimization level. It sets the accuracy ceiling in noiseless simulation and the cost ceiling everywhere.

Scattered freezing (WSBD). The strongest existing competitor is WSBD-Adam with parameter-wise freezing, run with its published importance and reset rules. It is the strongest because it already beats layer-wise freezing by nearly 50% and reports converging 63.9% faster than Adam on 4-qubit TFIM VQE (WSBD). Crucially, we will give it the same full-optimization transpiler pass on each frozen configuration. That way it receives whatever incidental compaction its scattered frozen gates happen to allow.

Probabilistic gradient pruning (QOC). QOC's PGP is the second unstructured competitor. It reports a 2x training speedup and up to 7% accuracy gain over no pruning, with over 90% accuracy on 2-class MNIST and Fashion-MNIST on IBM hardware (QOC). We run it from its TorchQuantum release.

Layer-wise freezing. This is the coarse endpoint, included to locate our method on the granularity spectrum.

Fair comparison. All methods share the same active-parameter budget per step, the same shot budget, and the same noise model. Each gets the same hyperparameter search budget, covering window sizes, pruning ratio or block budget, and learning rate, with a fixed number of trials each. Results are reported over several seeds.

Ablations. Two ablations isolate the key ingredient. Blocks without compaction uses our block masks but runs the uncompacted circuit. It separates the cost of the structural restriction from the benefit of shallower circuits; in noiseless simulation it must match the full method exactly. Random blocks uses the same partition with uniform block sampling, to show that importance-weighted selection matters.

What counts as winning. Beating WSBD means reaching the same final energy error or test accuracy with lower total cost $C$ under Heron R2 latencies, or a better final result at equal $C$, by a margin larger than the seed-to-seed spread.

Why not just…?

Why not just freeze scattered angles and let the transpiler compact whatever it can? This is the most serious threat, because standard transpilers already fuse adjacent fixed gates. If scattered frozen angles often form fusible runs, our structure adds nothing. We settle this before any training. For each benchmark ansatz, we sample WSBD-style masks and block masks at matched active fraction, transpile both at full optimization, and compare two-qubit depth. If block masks do not yield substantially shallower circuits, we drop the proposal. Our expectation that they will rests on a simple observation: a single active angle inside a region blocks fusion across it, and scattered masks place active angles almost everywhere.

Why not just freeze whole layers, which is simpler and also shortens circuits? WSBD reports that layer-wise freezing is nearly 50% worse than parameter-wise freezing. Its explanation is that entanglement spreads each angle's importance across layers. Our blocks are local in qubits but span layers and are staggered, which is precisely the direction WSBD's explanation favors. The layer-wise baseline measures whether we inherit layer-wise freezing's accuracy loss.

Why not just use simultaneous perturbation, which needs only two circuits per step regardless of $M$? Simultaneous perturbation (SPSA) estimates the whole gradient from one random joint nudge of all angles, but its gradient variance is high. The existence of Guided-SPSA, which injects parameter-shift gradients to rescue it, and the optimizer comparison in An Empirical Comparison of Optimizers for Quantum Machine Learning with SPSA-based Gradients both indicate that pure SPSA struggles on hard landscapes. We include SPSA at matched $C$ as a cost-efficiency reference. Compaction is also orthogonal to it: SPSA circuits would equally benefit from running on a compacted frozen skeleton, and we test that combination.

Why not just extrapolate trajectories with Koopman models? QuACK predicts future optimizer steps from past ones. It reaches over 200x speedup in overparameterized regimes, but its gains fall to 3x–4.6x on LiH and 2x–5.5x under noise, and it still needs real gradient steps periodically. Those real steps are exactly what our method cheapens, so we treat QuACK as complementary rather than competing.

Proposed Experiments and Decisive Checks

Transpilation check. The first experiment is the transpilation test described above, run on hardware-efficient ansätze of 4 to 12 qubits and depths up to the overparameterized regime. Symmetric Pruning reports this regime needs roughly 800 angles for TFIM before pruning. For each ansatz, we measure two-qubit depth and entangler count against active fraction for block and scattered masks. This single measurement decides whether training experiments proceed.

Optimization benchmarks. Training runs cover three settings: TFIM ground states at 4 qubits (matching WSBD's 1–3 layer setup) and larger sizes; LiH with UCCSD and $k$-UpCCGSD ansätze as in PECT, with energy error measured against the chemical accuracy threshold; and 2-class and 4-class MNIST and Fashion-MNIST as in QOC via TorchQuantum. Each is run in three noise settings: noiseless state-vector simulation, shot-noise-only simulation, and the FakeManila and FakeLima device noise models used by QuACK. Cost $C$ is computed from IBM Heron R2 latencies, as WSBD does.

Decisive predictions. The design makes sharp predictions. In noiseless simulation, the full method and the no-compaction ablation must coincide. Both should trail WSBD slightly, which quantifies the price of the block constraint. Under device noise, the full method should pull ahead of both the ablation and WSBD. The size of that gap should grow with ansatz depth and with two-qubit error rate, because compaction removes more noisy gates from deeper circuits.

Stability and shots. We also report per-step gradient signal-to-noise at a fixed shot count, and Sparse Architecture Divergence for block versus scattered masks. These test whether block masks churn less and therefore trigger fewer recompilations.

Stopping criterion. If block freezing fails to beat WSBD on cost-to-target under noise on at least TFIM and LiH, we will conclude that the granularity lesson from classical $N{:}M$ sparsity does not transfer to quantum training at current error rates.