autoqasm.types.deferred module
Deferred variable wrappers for lazy promotion of Python values to QASM variables.
These wrappers subclass Python’s numeric types (float, int) so they behave as plain literals when used as gate parameters, but lazily promote to oqpy variables when combined with QASM expressions via arithmetic or comparison operators.
- class autoqasm.types.deferred.DeferredVarMixin[source]
Bases:
objectMixin that lazily promotes a Python numeric value to an oqpy variable when combined with a QASM expression. When used as a gate parameter the value remains a literal.
- class autoqasm.types.deferred.DeferredFloat(value, name)[source]
Bases:
DeferredVarMixin,floatA Python float that lazily promotes to an oqpy FloatVar.
- class autoqasm.types.deferred.DeferredInt(value, name)[source]
Bases:
DeferredVarMixin,intA Python int that lazily promotes to an oqpy IntVar.