qat.backend.waveform_v1.codegen module
- class WaveformContext(pulse_channel, total_duration)
Bases:
object
Used for waveform code generation for a particular pulse channel.
This can be considered to be the dynamical state of a pulse channel which evolves as the circuit progresses.
- Parameters:
pulse_channel¶ (
PulseChannel
) – The pulse channel that this is modelling.total_duration¶ (
int
) – The lifetime of the pulse channel in number of samples.
- property buffer
- property physical_channel
- process_delay(samples)
- process_frequencyshift(frequency)
- process_phasereset()
- process_phaseshift(phase)
- process_pulse(instruction, samples, do_upconvert=True)
- process_reset()
- class WaveformV1Backend(model)
Bases:
BaseBackend
,InvokerMixin
Target-machine code generation from an IR for targets that only require the explicit waveforms.
- Parameters:
model¶ (
QuantumHardwareModel
) – The hardware model that holds calibrated information on the qubits on the QPU. As the emitter is used to generate code for some target machine, the hardware model is needed for context-aware compilation.
- build_pass_pipeline(*args, **kwargs)
- create_acquire_dict(ir, timeline_res)
- create_physical_channel_buffers(ir, timeline_res, upconvert=True)
- static create_pulse_channel_buffer(pulse_channel, instructions, durations, upconvert=True)
- emit(ir, res_mgr=None, met_mgr=None, upconvert=True, **kwargs)
Compiles
InstructionBuilder
into aWaveformV1Executable
.Translates pulse instructions into explicit waveforms at the required times, and combines them across pulse channels to give a composite waveform on the necessary physical channels. Deals with low-level details such as pulse scheduling and phase shifts.
- Return type: