quchip.engine.problem

Package engine physics and solve inputs into frozen solve requests.

Responsibilities

  • Resolve the chip frame.

  • Flatten e_ops into solver-ready bands with decompose_eops().

  • Build an EngineResult for each variant and pack it into a single SolveProblem, or merge homogeneous variants into a SolveBatch (N identical skeletons with per-element ScalarModulation signals).

Collapse operators enter the standard Lindblad master equation dρ/dt = −i[H, ρ] + Σₖ D[Lₖ]ρ. Rates are stored in 1/ns.

Functions

assign_point_noise(problems, *[, split_keys])

Assign omitted QuTiP seeds in logical point order before grouping.

build_solve_batch_from_results(context, ...)

Package homogeneous EngineResult`s as one :class:`SolveBatch.

build_solve_problem(chip, drive_ops, tlist, *)

Resolve, assemble, and package a frozen SolveProblem.

prepare_solve_problem_context(chip, tlist, *)

Resolve the frame and keep authored observables and state specifications.

solve_problem_list(problems, *[, progress, ...])

Dispatch each captured backend's requests and restore the original point order.

Classes

SolveProblemContext(chip, tlist, e_ops, ...)

Shared solve metadata reused across a homogeneous problem batch.

class quchip.engine.problem.SolveProblemContext(chip, tlist, e_ops, resolved_frame, approximation, _base_result, solver, options, run_args, states=None, dissipation=True, automatic_sampling=False)[source]

Bases: object

Shared solve metadata reused across a homogeneous problem batch.

Built once by prepare_solve_problem_context(), so sweep points can skip redundant observable normalization.

chip: Chip
tlist: Any
e_ops: Any
resolved_frame: Any
approximation: Approximation
solver: str | None
options: dict[str, Any]
run_args: dict[str, Any]
states: StateStorage | None = None
dissipation: bool = True
automatic_sampling: bool = False
quchip.engine.problem.prepare_solve_problem_context(chip, tlist, *, solver=None, options=None, e_ops=None, drive_ops=None, approximation=None, frame=None, states=None, dissipation=True, run_args=None, initial_states=None, _product_space=False)[source]

Resolve the frame and keep authored observables and state specifications.

Observables and states are materialized only after assembly resolves every local solver basis. The default ground state stays lazy, so callers that supply an explicit state do not pay for unused state construction.

frame overrides the chip’s declared frame. For "auto", the solve window tlist[-1] - tlist[0] gives the duration used for weights.

tlist defines the actual interval. Scheduled signals keep their absolute times, including operations partly or fully outside this interval.

quchip.engine.problem.build_solve_batch_from_results(context, engine_results, *, initial_states=None)[source]

Package homogeneous EngineResult`s as one :class:`SolveBatch.

All results must share the same static term objects and the same number of dynamic terms. Each slot’s operator payloads must match, by identity or by canonical fingerprint. initial_states=None gives every point one shared default start. Individual None entries reuse that start. The batch shares one static Hamiltonian, frame, and start time.

quchip.engine.problem.build_solve_problem(chip, drive_ops, tlist, *, solver=None, options=None, e_ops=None, initial_state=None, approximation=None, frame=None, states=None, dissipation=True, run_args=None, _initial_states=None, _product_space=False)[source]

Resolve, assemble, and package a frozen SolveProblem.

Equivalent to prepare_solve_problem_context() followed by build_engine_result(). For many variants that share one chip configuration, use that two-step form with build_solve_batch_from_results().

frame overrides the chip’s declared frame and follows the same operation-aware "auto" resolution as prepare_solve_problem_context().

quchip.engine.problem.solve_problem_list(problems, *, progress=True, parameters=None, max_workers=None)[source]

Dispatch each captured backend’s requests and restore the original point order.

quchip.engine.problem.assign_point_noise(problems, *, split_keys=False)[source]

Assign omitted QuTiP seeds in logical point order before grouping.

Explicit native seeds/keys are kept, including intentionally shared noise. Dynamiqs keys stay a necessary native input.