An exploratory time-evolution compression workflow now lives under
examples/time_evolution/.
The workflow uses SPD's existing forward and backward public runners to:
- precompute cached target evolved operators for representative single-site
XandZ - optimize a shallower variational circuit against those cached targets using the local operator L2 cost
- reload saved optimization results and recompute the channel-wise cost split together with a direct-Trotter baseline comparison
This work stays at the example layer and does not introduce new spd/ public
APIs.
examples/time_evolution/common.pycentralizes:- benchmark constants
- target/optimization artifact paths
- 2D TFI circuit builders
- metadata helpers
- translationally invariant gradient compression helpers
Current setup:
- system size
4 x 4 - target circuit: first-order Trotter, total time
0.3,100steps - variational circuit: first-order Trotter,
5layers
Current setup:
- system size
14 x 14 - target circuit: linear ramp in
gfrom0.0to3.2 - target circuit style: second-order Trotter, total time
0.06,6layers - variational circuit: first-order Trotter,
2layers
This script reloads:
- target metadata
- cached target
X/ZSPOs - saved optimization result
and then prints:
- recomputed total cost
XandZchannel costs- direct-Trotter baseline cost
- parameter vectors for both the baseline and the optimized circuit
- The compression cost is the SPD-friendly local operator cost:
||X - X_target||^2 + ||Z - Z_target||^2using one representative site per channel under translational invariance. - Raw SPD gradients are reduced back to shared layer parameters in the example
code by summing all sitewise gate contributions belonging to the same shared
parameter, then converting from SPD's internal angle convention back to
pytket's parameterization by a factor of
pi. - The constant and ramp examples now carry separate lattice-size settings in
common.py, so changing the ramp benchmark size no longer changes the original constant-TFI example. - The example scripts suppress SPD's internal per-gate progress printing during normal forward/backward calls so the console output stays readable.
- The constant-TFI example was run through target precomputation and
optimization, and its saved result can be checked with
check_result.py. - The linear-ramp example was run through target precomputation and
optimization, and its saved result can also be checked with
check_result.py --scenario ramp. check_result.pycurrently reports both:- recomputed saved-result cost
- direct-Trotter baseline cost
- constant-TFI compression example added
- linear-ramp compression example added
- cached target metadata and target SPO artifacts added
- saved-result inspection script added
- direct-Trotter baseline comparison added
- constant and ramp benchmark sizes separated
Likely next steps for this example area:
- try alternate local cost functions in
check_result.py - raise optimization iteration limits for heavier ramp runs when needed
- extend the ansatz beyond full translational invariance, for example to a
2 x 2unit cell pattern