qat.backend.qblox.passes.analysis module

class QbloxLegalisationPass

Bases: AnalysisPass

amp_as_steps(amp)

The instruction set_awg_offs expects DAC ratio as a (potentially signed) integer operand.

Return type:

int

static freq_as_steps(freq_hz)

The instruction set_freq expects the frequency as a (potentially signed) integer operand.

Return type:

int

static phase_as_steps(phase_rad)

The instruction set_ph_delta expects the phase shift as a (potentially signed) integer operand.

Return type:

int

run(ir, res_mgr, *args, **kwargs)

Performs target-dependent legalisation for QBlox.

  1. A repeat instruction with a very high repetition count is illegal because acquisition memory

on a QBlox sequencer is limited. This requires optimal batching of the repeat instruction into maximally supported batches of smaller repeat counts.

This pass does not do any batching. More features and adjustments will follow in future iterations.

  1. Previously processed variables such as frequencies, phases, and amplitudes still need digital conversion

to a representation that’s required by the QBlox ISA.

  • NCO’s 1GHz frequency range by 4e9 steps:
    • [-500, 500] Mhz <=> [-2e9, 2e9] steps

    • 1 Hz <=> 4 steps

  • NCO’s 360° phase range by 1e9 steps:
    • 1e9 steps <=> 2*pi rad

    • 125e6 steps <=> pi/4 rad

  • Time and samples are quantified in nanoseconds

  • Amplitude depends on the type of the module:
    • [-1, 1] <=> [-2.5, 2.5] V (for QCM)

    • [-1, 1] <=> [-0.5, 0.5] V (for QRM)

  • AWG offset:
    • [-1, 1] <=> [-32 768, 32 767]

The last point is interesting as it requires knowledge of physical configuration of qubits and the modules they are wired to. This knowledge is typically found during execution and involving it early on would upset the rest of the compilation flow. In fact, it complicates this pass in particular, involves allocation concepts that should not be treated here, and promotes a monolithic compilation style. A temporary workaround is to simply assume the legality of amplitudes from the start whereby users are required to convert the desired voltages to the equivalent ratio AOT.

This pass performs target-dependent conversion as described in part (B). More features and adjustments will follow in future iterations.