Skip to content

dq.method.Event

Event(
    noclick_method: Method = Tsit5(),
    root_finder: AbstractRootFinder | None = None,
    smart_sampling: bool = False,
)

Event method for the jump SSE and SME.

This method uses the Diffrax library event handling to interrupt the no-click integration at the next sampled click time, apply the corresponding measurement backaction to the state, and continue the no-click integration until the subsequent sampled click time.

Click times precision

By default, the click time precision is determined by the integration step size. The exact click time can be refined to a chosen precision by specifying the root_finder argument, see for example the optimistix library Newton root finder.

Parameters

  • noclick_method –

    Method for the no-click evolution. Defaults to dq.method.Tsit5 (supported: Tsit5, Dopri5, Dopri8, Kvaerno3, Kvaerno5, Euler).

  • root_finder –

    Root finder to refine the click times, defaults to None (precision determined by the integration step size).

  • smart_sampling –

    If True, the no-click trajectory is sampled only once, and result.states contains only trajectories with one or more clicks. Information about the no-click trajectory are stored in result.infos:

    • result.infos.noclick_states (qarray of shape (..., nsave, n, 1)) - No-click trajectory.
    • result.infos.noclick_prob (array of shape (...)) - Probability of the no-click trajectory.
    • result.infos.noclick_expects (array of shape (..., len(exp_ops), ntsave) or None) - No-click trajectory expectation values.
Supported gradients

This method supports differentiation with dq.gradient.CheckpointAutograd (default).