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 thelosscapability. - Runtime
LossyOperatorloss is handled through the sharedLocalBackend.evolve_with_lossdriver. The backend advertises thelosscapability anduses_loss_driver, and supplies two loss-agnostic primitives,apply_instructionandsample_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.