Skip to content

dq.Options

Options(
    save_states: bool = True,
    verbose: bool = True,
    cartesian_batching: bool = True,
    progress_meter: AbstractProgressMeter | None = TqdmProgressMeter(),
    t0: ScalarLike | None = None,
    save_extra: callable[[Array], PyTree] | None = None,
)

Generic options for the quantum solvers.

Parameters

  • save_states –

    If True, the state is saved at every time in tsave, otherwise only the final state is returned.

  • verbose –

    If True, print information about the integration, otherwise nothing is printed.

  • cartesian_batching –

    If True, batched arguments are treated as separated batch dimensions, otherwise the batching is performed over a single shared batched dimension.

  • progress_meter –

    Progress meter indicating how far the solve has progressed. Defaults to a tqdm progress meter. Pass None for no output, see other options in dynamiqs/progress_meter.py. If gradients are computed, the progress meter only displays during the forward pass.

  • t0 –

    Initial time. If None, defaults to the first time in tsave.

  • save_extra (function, optional) –

    A function with signature f(Array) -> PyTree that takes a state or propagator as input and returns a PyTree. This can be used to save additional arbitrary data during the integration. The additional data is accessible in the extra attribute of the result object returned by the solvers.