symop.polynomial.kernels.measurements.registry¶
Registration of polynomial measurement kernels.
This module registers polynomial-representation measurement kernels with
a MeasurementKernelRegistry.
The registered kernels implement number measurement for the
DeviceKind.NUMBER_DETECTOR device, covering the following
measurement intents:
observe:Compute full probability distributions without modifying the state.
detect:Sample an outcome and return a post-measurement state.
postselect:Condition on a specified outcome and return the corresponding branch.
Both ket and density representations are supported where applicable.
For operations that require state collapse (detect and
postselect), only density-state kernels are registered.
Notes
This function wires semantic measurement actions to concrete backend
implementations for the polynomial representation (rep=POLY).
The registry dispatch key consists of:
device kind (e.g.
NUMBER_DETECTOR)measurement intent (
observe,detect,postselect)representation kind (
POLY)input state kind (
KETorDENSITY)
This allows the runtime to resolve the correct kernel dynamically based on the input state and requested operation.
Functions
Register polynomial number-measurement kernels. |
- register_polynomial_measurement_kernels(*, measurement_registry: MeasurementKernelRegistry) None¶
Register polynomial number-measurement kernels.
- Parameters:
measurement_registry (
MeasurementKernelRegistry) – Registry into which the polynomial measurement kernels are registered.- Return type:
None
Notes
The following registrations are performed for
DeviceKind.NUMBER_DETECTOR:observe:ket input →
observe_number_detector_poly_ket()density input →
observe_number_detector_poly_density()
detect:density input →
detect_number_detector_poly_density()
postselect:density input →
postselect_number_detector_poly_density()
Ket-based kernels are provided only for observation, since detection and postselection require state collapse, which is canonically handled at the density-state level.
This function should be called during initialization of the polynomial backend to ensure that measurement actions are correctly dispatched.