Shared simulation state in Hybrid programs¶
A Hybrid experiment applies Digital gates and Analog evolution to the same quantum state in sequence. Each block receives the previous block’s final state, preserving coherence across boundaries. The runtime does not sample counts between blocks and prepare a new state from those counts.
This matters in a Digital–Analog–Digital experiment. The first block can prepare a superposition, Analog evolution changes amplitudes and phases, and the final gates can turn phase differences into measurable probability differences. Running each block independently and combining results generally describes a different experiment.
Order, state and measurement¶
HybridProgram retains concrete Digital and Analog blocks for the local executor. Ideal, density-matrix and trajectory paths use the state representation appropriate to their method. Changing the representation still requires compatible noise and simulation settings.
Logical order and basis must agree across blocks. Analog evolution advances logical time by its control duration. Digital gates currently have no gate-duration semantics, so their logical timing cannot predict device execution time. Measurement is terminal; intermediate measurement, feedback and dynamic atom movement are outside the current local Hybrid path.
program.compile() produces a dependency graph and plan. A plan alone lacks the complete executable content. An assembled program must also meet the runner’s requirements, such as terminal measurement when sampling. See the planning and assembly lesson.
Check continuity and numerical meaning¶
State provenance and hash chains in the result help check that blocks were connected. They record processing history; they do not establish that the Hamiltonian, units or numerical evolution were correct. For small systems, compare probabilities or expectations against an independent reference as well.
The shared-state lesson compares continuous evolution with a reset control. The noisy Hybrid project checks noisy results against an independent Lindblad equation.
Internal SimulationState and SimulationStateIR types support state transfer and result records; they are not a public checkpoint format across versions. Save the program, configuration, raw results and job store described in the recovery guide. A state summary does not contain the amplitudes needed to resume evolution.