qat.experimental.system_data.materialisers.model.validation module
Structural and referential validation for canonical system data.
The public entry point is validate(). All other functions are internal helpers.
Validation rules
Structural presence – qubits, ports, channels, and oscillators must be present.
Acquire limit –
acquire_limitmust be-1(unlimited) or strictly positive.Ports –
sample_timestrictly positive;block_size/min_blocksat least one;max_blockseither-1or at least one;min_blocks <= max_blockswhen bounded.Oscillators –
frequencystrictly positive.Channels –
frequencynon-negative;port_idandoscillator_referencemust resolve to declared resources.Modes –
channel_idmust resolve to a declared channel; nested waveform and acquire definitions and post-processing methods are bounds-checked.Couplings –
source_qubit_id/target_qubit_idmust resolve to declared qubits.Readout probabilities – probabilities within
[0, 1]and normalised per prepared state.
Warning-level rules flag missing coupling fidelities and inconsistent port sample times.
- validate(model)
Validate a canonical system data model.
Enforces structural, field-level, and referential invariants on
CanonicalSystemData. Fatal issues raiseMaterialisationValidationError(field-level bounds) orMaterialisationConsistencyError(referential integrity and cross-entry consistency). Non-fatal issues are logged as warnings and do not block usage.- Parameters:
model¶ (
CanonicalSystemData) – TheCanonicalSystemDatamodel to validate.- Return type:
None