qat.purr.backends.verification module
- class LucyVerificationEngine(model=None, startup_engine=True, max_instruction_len=200000)
Bases:
VerificationEngine
- max_circuit_duration = 9e-05
- verify_instructions(instructions, metadata)
- class QPUVersion(make, version=None)
Bases:
object
- static with_version(version=None)
Creates a QPU version with an empty QPU make. Only used in very special circumstances.
- class VerificationEngine(model=None, startup_engine=True, max_instruction_len=200000)
Bases:
QuantumExecutionEngine
,ABC
- abstract verify_instructions(instructions, metadata)
- exception VerificationError
Bases:
ValueError
- class VerificationModel(qpu_version, verification_engine, control_hardware=<qat.purr.backends.live_devices.ControlHardware object>)
Bases:
LiveHardwareModel
- create_engine()
- Return type:
- get_verification_model(qpu_type)
Get verification model for a particular QPU make and model. Each make has its own class, which has a field that is each individual version available for verification.
- Return type:
Optional
[VerificationModel
]
For example, if you wanted to verify our Lucy machine, that’d be done with: `` get_verification_model(Lucy.Latest) ``
Or with a specific version: `` get_verification_model(Lucy.XY) ``
- inject_name(cls)
Decorator to inject class name into the QPU make/version fields in our static make/model naming objects.
- verify_instructions(builder, qpu_type)
Runs instruction verification for the instructions in this builder.
Only run this on instructions that will go through no more transformations before being sent to the driver, otherwise you cannot rely upon its results as being accurate. In most situations this will only be fully truthful on instructions that have already gone through the entire pipeline.
- verify_program(program, compiler_config, qpu_version)