Skip to content

Loss redesign

Qubit loss reaches this backend in two ways:

  • Pre-resolvable loss is lowered by the core library into primitives (Reset, Measure, SetBit0/SetBit1) before the circuit reaches the backend, so it runs with no backend-specific handling. Such circuits are admissible even without the loss capability.
  • Runtime LossyOperator loss is handled through the shared LocalBackend.evolve_with_loss driver. The backend advertises the loss capability and uses_loss_driver, and supplies two loss-agnostic primitives, apply_instruction and sample_kraus. The driver samples a branch, the core returns the sampled operator index, and the backend maps it back to the original tag-preserving operator.