quchip.results.steady_state

Backend-neutral results for stationary Lindblad calculations.

Functions

build_steady_state_result(solver_result, ...)

Wrap one backend stationary solve without concretizing native arrays.

stationary_expectations(values, meta, frame, ...)

Return the public expectation values of a stationary state from the solver's flat values.

Classes

SteadyStateBatchResult(results, *[, shape, axes])

Immutable stationary results reshaped to their declared sweep grid.

SteadyStateResult(state, residual, nullity, ...)

One normalized stationary density matrix and its diagnostics.

class quchip.results.steady_state.SteadyStateResult(state, residual, nullity, _condition_number, dims, device_info, stats, _backend, _expectations, frame=None, excitation_space=None, diagnostics=<factory>)[source]

Bases: object

One normalized stationary density matrix and its diagnostics.

Variables:
  • state (backend state) – Stationary density matrix in the solver basis, or in the energy coordinates of excitation_space when that is set.

  • residual (scalar) – Residual norm of the stationary equation.

  • nullity (scalar) – Null-space dimension of the trace-constrained generator.

  • dims (tuple of int) – Hilbert-space dimensions in chip order. With excitation_space, they are the dimensions of its product space.

  • device_info (tuple) – (label, computational) records used by accessors.

  • stats (mapping) – Backend solver statistics.

  • frame (ResolvedFrame or None) – Integration frame of the stationary state.

  • excitation_space (PulseSpace or None) – Retained product labels of state when the solve kept only some of them, else None.

  • diagnostics (mapping) – The solve’s route under "route" and its name under "solver". A solve on excitation sectors adds its truncation entries.

state: Any
residual: Any
nullity: Any
dims: tuple[int, ...]
device_info: tuple[tuple[str, bool], ...]
stats: Mapping[str, Any]
frame: Any = None
excitation_space: Any = None
diagnostics: Mapping[str, Any]
property condition_number: Any

Condition number of the trace-constrained generator, calculated on request.

property trace: Any

Trace of the captured stationary density matrix.

property trace_error: Any

Absolute deviation from unit trace.

property hermiticity_error: Any

Frobenius norm of rho minus its adjoint, calculated on request.

property minimum_eigenvalue: Any

Smallest eigenvalue of the Hermitian part, calculated on request.

property positivity_error: Any

Magnitude of a negative minimum eigenvalue, or zero.

property is_unique: Any

Return uniqueness, or None when the backend skipped that diagnostic.

expect(key, index=None)[source]

Return one named stationary expectation value.

Parameters:
  • key (object or str) – Captured observable key.

  • index (int or None, optional) – Entry of a list-valued observable.

reduced_state(device)[source]

Partial-trace the stationary state down to one device.

Parameters:

device (device object or str) – Device to keep.

quchip.results.steady_state.build_steady_state_result(solver_result, problem, backend, *, diagnostics=None, space=None)[source]

Wrap one backend stationary solve without concretizing native arrays.

space holds the retained labels of a state that a route solved on fewer labels than the engine result has. None uses the engine result’s excitation space.

quchip.results.steady_state.stationary_expectations(values, meta, frame, backend)[source]

Return the public expectation values of a stationary state from the solver’s flat values.

meta is the metadata of the decomposed e_ops, or None, and frame the resolved frame whose demodulation the values take.

class quchip.results.steady_state.SteadyStateBatchResult(results, *, shape=None, axes=None)[source]

Bases: BatchResult[SteadyStateResult]

Immutable stationary results reshaped to their declared sweep grid.

Variables:
expect(key, index=None)[source]

Return one expectation value on the sweep grid.

Parameters:
  • key (object or str) – Captured observable key.

  • index (int or None, optional) – Entry of a list-valued observable.