qat.middleend.decompositions.pulses module
- class DefaultPulseDecompositions(gate_decompositions=None)
Bases:
PulseDecompositionBase
Implements the standard gate-to-pulse decompositions used in OQC hardware.
Provides decomposition rules for the native gate set {
Z_phase
,X_pi_2
,ZX_pi_4
}. Gates which are not part of the native set are first decomposed into native gates usingDefaultGateDecompositions
, and then decomposed into pulses using the rules provided here.- Parameters:
gate_decompositions¶ (
Optional
[DecompositionBase
]) – The DAG for decomposing higher-level, non-native gates can be provided as an optional argument. Uses the:class:DefaultGateDecompositions by default.
- decompose_op(gate, *args)
Implements the definition of a decomposition of a gate.
The definition does not have to be in terms of native gates, but decompositions must form a DAG. This will call
gate_decompositions
for higher-level gates. Decompositon details of native gates and other qubit operations should be implemented here.
- end_nodes = (<class 'qat.ir.instructions.QuantumInstruction'>,)
- class PulseDecompositionBase(gate_decompositions=None)
Bases:
DecompositionBase
Base object for implementing decompositions of
NativeGate
and other qubit operations such asMeasure
,Reset
andBarrier
.This handles decompositions of gates / operations to pulse level instructions. Details of gate-to-gate decompositions should not be specified here, but can be injected as
gate_decompositions
to allow for decomposition of higher-level gates into pulses.- Parameters:
gate_decompositions¶ (
Optional
[GateDecompositionBase
]) – The DAG for decomposing higher-level, non-native gates can be provided as an optional argument. Uses theDefaultGateDecompositions
by default.
- decompose_op(gate, model)
Implements the definition of a decomposition of a gate.
The definition does not have to be in terms of native gates, but decompositions must form a DAG. This will call
gate_decompositions
for higher-level gates. Decompositon details of native gates and other qubit operations should be implemented here.
- end_nodes = (<class 'qat.ir.instructions.QuantumInstruction'>,)