iqm.cpc.compiler.standard_stages#
Standard compilation stages, their constituent compiler passes, and functions for implementing them.
There are 6 standard compilation stages:
Circuit-to-circuit.
Circuit-to-timebox.
Timebox-to-timebox.
Timebox-to-schedule.
Schedule-to-schedule.
Schedule-to-playlist.
Breakdown of compiler passes of each stage:
1. Circuit-to-circuit#
Validate the circuit execution options.
Map backwards-compatible aliases for quantum operation names into the current name. This is needed until old operation names such as
phased_rx
andmeasurement
are no longer supported.Validate the contents of the circuits.
Map the logical QPU components to physical QPU components. Provided mapping is used, if any. Otherwise, identity mapping is used.
Choose implementations for circuit operations based on the calibration set.
Derive mapping between station acquisition labels and user’s measurement keys. Populates
readout_mappings
andheralded_components
of context.
2. Circuit-to-timebox#
Resolve the circuits to timeboxes using
ScheduleBuilder.circuit_to_timebox()
.
3. Timebox-to-timebox#
Merge any MultiplexedProbeTimeBoxes inside each TimeBox using
TimeBox.composite()
.Add the heralding measurement timebox to all circuits if
HeraldingMode
in circuit execution options requires it.Add a reset timebox to all circuits.
4. Timebox-to-schedule#
Resolve the timeboxes to schedules using
ScheduleBuilder.resolve_timebox()
.
5. Schedule-to-schedule#
Apply dynamical decoupling sequences to the schedule if requested.
Apply resonator-related phase corrections if MOVE gates are used.
Remove non-functional instructions from schedules using
ScheduleBuilder._finish_schedule()
.
6. Schedule-to-playlist#
Build the playlist from the schedules using
ScheduleBuilder.build_playlist()
.
Functions
|
Insert dynamical decoupling sequences into the schedules, if dynamical decoupling is enabled. |
|
Apply calibrated phase corrections if MOVE gates are used. |
|
Build the playlist from the schedules. |
|
Analyze the instructions in the circuits and pick an implementation for each (operation, locus). |
|
Remove non-functional instructions from schedules. |
|
Derive mapping between station acquisition labels and user's measurement keys. |
|
Get a copy of the standard compilation stages. |
|
Map the logical QPU components to physical QPU components using |
|
Map backwards-compatible aliases for quantum operation names into the current name. |
|
Merge any MultiplexedProbeTimeBoxes inside a TimeBox representing a circuit. |
|
Merge any MultiplexedProbeTimeBoxes inside a TimeBox representing a circuit. |
|
Add the heralding measurement timebox to all circuits. |
|
Add a reset timebox to all circuits. |
|
Resolve the circuits to timeboxes. |
|
Resolve the timeboxes to schedules. |
|
Validate the contents of the quantum circuits. |
|
Validate the circuit execution options (only some combinations make sense). |