User guide

Introduction

Quantify-scheduler is a module for writing quantum programs. It features a unique hybrid control model allowing quantum gate- and pulse-level descriptions to be combined in a clearly defined and hardware-agnostic way. Quantify-scheduler is designed to allow experimentalists to easily define complex experiments, and produces synchronized pulse schedules to be distributed to control hardware.

Quantify-scheduler can be understood by understanding the following concepts.

  • Schedules: describe when an operation needs to be applied.

  • Operations: describe what needs to be done.

  • Resources: describe where an operation should be applied.

  • Compilation between different abstraction layers and onto a hardware backend.

The following table shows an overview of the different concepts and how these are represented at the gate- and pulse-level abstraction.

Table 1 Overview of concepts and their representation at different levels of abstraction

Concept

Gate-level description

Pulse-level description

When

Schedule

What

Operation

unitaries and POVMs

parameterized waveforms

Where

Resource

qubits (str)

ports (str) & clocks (ClockResource)

To schedule operations on control hardware different compilation steps take the schedule and compile it for a hardware backend. The following block diagram gives an overview of the different compilation steps. A schedule can be created using the quantify API (shown in Tutorial 1).

blockdiag quantify API Hardware backends Gate-level Pulse-level d. config h. config Input formats Schedule

A first compilation step uses the device configuration (file) to add a pulse representation to operations with a gate representation. A second compilation step uses the hardware configuration (file) to compile the pulses onto a hardware backend.

Note

We use the term “device” to refer to the physical object(s) on the receiving end of the control pulses, e.g. a thin-film chip inside a dilution refrigerator.

And we employ the term “hardware” to refer to the instruments (electronics) that are involved in the pulse generations / signal digitization.

Schedule

The Schedule is a data structure that is at the core of the Quantify-scheduler. The Schedule contains information on when operations should be performed.

When adding an Operation to a Schedule using the add() method, it is possible to specify precisely when to perform this operation using timing constraints. However, at this point it is not required to specify how to represent this Operation on all (both gate and pulse) abstraction levels. Instead, this information can be added later during Compilation. This allows the user to effortlessly mix the gate- and pulse-level descriptions as is required for many (calibration) experiments. An example of such an experiment is shown in Tutorial 1.

The Schedule contains information on the operations and timing_constraints. The operations is a dictionary of all unique operations used in the schedule and contain the information on what operation to apply where. The timing_constraints is a list of dictionaries describing timing constraints between operations, i.e. when to apply an operation.

Operation

The Operation object is a datastructure that describes the operation that should be performed, it also contains information on where it should be applied. An operation can be represented at different levels of abstraction such as the (quantum) Gate-level description and the Pulse-level description. The quantify.scheduler comes with the quantify.scheduler.gate_library and the quantify.scheduler.pulse_library , both containing common operations.

Gate-level description

The (quantum) gate-level description is an idealized mathematical description of the operations. In this description operations are quantum gates that act on idealized qubits as part of a quantum circuit. Operations can be represented by (idealized) unitaries acting on qubits which are represented here as strings (e.g., "q0", "q1", "qubit_left", etc.). Valid qubits are strings that appear in the device configuration file used when compiling the schedule. The gate_library contains common gates (including the measurement operation).

Note

Strictly speaking a measurement is not a gate as it cannot be described by a unitary. However, it is a fundamental building block of circuit diagrams and therefore included at this level of abstraction.

A Schedule containing operations can be visualized using as a circuit diagram using quantify.scheduler.visualization.circuit_diagram.circuit_diagram_matplotlib(). An example of such a visualization is shown below.

_images/Tutorial 1. Scheduler concepts_0_0.png

To summarize:

  • Gates are described by unitaries.

  • Gates are applied to qubits.

  • Qubit resources are represented by strings.

Pulse-level description

The pulse-level description describes waveforms applied to a sample. These waveforms can be used to implement the unitaries of the gate-level description, in which case there is a one-to-one correspondence, but this is not required. The pulse-level description typically contain parameterization information, such as amplitudes, durations and so forth required to synthesize the waveform on control hardware. The pulse_library contains a collection of commonly used pulses. To specify where an operation is applied, the pulse-level description needs to specify both the location in physical space as well as in frequency space. The location on chip is denoted by a port while the frequency is set using a clock, both are represented as strings. These resources are described in detail in the next section.

A Schedule containing operations can be visualized using as a pulse diagram using quantify.scheduler.visualization.circuit_diagram.pulse_diagram_plotly(). An example of such a visualization is shown below: