qat.middleend.passes.legacy.transform module
- class IntegratorAcquireSanitisation
Bases:
TransformPass
Changes AcquireMode.INTEGRATOR acquisitions to AcquireMode.RAW.
The legacy echo/RTCS engines expect the acquisition mode to be either RAW or SCOPE. While the actual execution can process INTEGRATOR by treating it as RAW, they are typically santitised the runtime using
EchoEngine.optimize()
. If not done in the new pipelines, it will conflict withPostProcessingSantisiation
, and return the wrong results. The new echo engine supports all acquisition modes, so this is not a problem here.- run(ir, *args, **kwargs)
- Parameters:
ir¶ (
InstructionBuilder
) – The list of instructions stored in anInstructionBuilder
.
- class QiskitInstructionsWrapper
Bases:
TransformPass
Wraps the Qiskit builder in a wrapper to match the pipelines API.
A really silly pass needed to wrap the
QiskitBuilder
in an object that allows QiskitBuilderWrapper.instructions to be called, allowing the builder to be used in the theLegacyRuntime
. This is needed because the qiskit engine has a different API to other purr engines, requiring the whole builder to be passed (as opposed to builder.instructions).- run(ir, *args, **kwargs)
- Parameters:
ir¶ (
QiskitBuilder
) – The Qiskit instructions- Return type: