qat.middleend.passes.legacy.validation module

class PhysicalChannelAmplitudeValidation

Bases: ValidationPass

Validates that the total amplitude of pulses on a physical channel does not exceed allowed levels.

Data is stored in a nested dict structure

{ 'CH1': {
              CH1.Q0.drive: 0.2+0.5j,
              CH1.Q0.Q1.cross_resonsance: 0.4+0.0j,
          },
  'CH2': { CH2.R0.measure: 0.9-0.6j },
}

This pass requires all Pulse s to have been lowered to either PulseShapeType.SQUARE or a CustomPulse with the evaluated pulse samples. Any non lowered pulses with other types may cause the pipeline to fail.

run(ir, *args, **kwargs)
Parameters:

ir (InstructionBuilder) – The intermediate representation (IR) InstructionBuilder.

Raises:

ValueError – for Pulse of non PulseShapeType.SQUARE type.

class QiskitResultsFormatValidation

Bases: ValidationPass

Validates the results format contains BinaryCount, and throws a warning if not.

run(ir, *args, compiler_config, **kwargs)
Parameters:
  • ir (QiskitBuilder) – The Qiskit instruction builder.

  • compiler_config (CompilerConfig) – The compiler config contains the results format.

Returns:

The instruction builder, unaltered.