Skip to content

Results are limited to the current section : Qoolqit

Compiling a Quantum Program

In this page, you will learn how to:

  • create built-in QoolQit devices,
  • fetch available hardware devices from a connection,
  • build a QoolQit device from a Pulser device,
  • understand what compilation does in QoolQit,
  • compile a dimensionless program to a target device,
  • inspect the compiled Pulser Sequence,
  • visualize both the original program and its compiled version.

A QoolQit program is written entirely in dimensionless units: qubit positions are expressed as dimensionless coordinates, waveforms carry dimensionless amplitudes and detunings, and time is measured in units of a reference interaction energy, that we call J0J_0. This device-agnostic formulation means that the same program can be compiled and run on any compatible hardware.

Compilation is the step that converts these dimensionless quantities into concrete physical values that a real Pulser device can execute. Concretely, it:

  1. Selects a physical reference scale J0J_0 that is consistent with the device's hardware constraints.
  2. Converts all dimensionless times, energies, and distances into their physical counterparts.
  3. Builds and returns a Pulser Sequence ready for emulation or execution on a QPU.

The conversion rules are derived from the requirement that the dimensionless Hamiltonian H~(t~)\tilde{H}(\tilde{t}) and the physical Hamiltonian H(t)H(t) generate the same unitary evolution. A full derivation is given in the Adimensionalization page. The key identities are:

rij=(C6J0)1/6r~ij,Ω(t)=J0Ω~(t~),δ(t)=J0δ~(t~),t=t~J0. r_{ij} = \left(\frac{C_6}{J_0}\right)^{1/6} \tilde{r}_{ij}, \qquad \Omega(t) = J_0\, \tilde{\Omega}( \tilde{t}), \qquad \delta(t) = J_0\, \tilde{\delta}( \tilde{t}), \qquad t = \frac{ \tilde{t}}{J_0}.

Choosing J0J_0 therefore simultaneously sets the physical amplitude scale, the detuning scale, the physical runtime, and the physical atom spacings.


A device imposes hardware constraints on the compiled program. The two most important ones for compilation are:

  • a maximum drive amplitude Ωmax\Omega_{\max}, which defines J0J_0 through the relation J0=Ω/Ω~Ωmax/Ω~maxJ_0 = \Omega / \tilde{\Omega} \le \Omega_{\max} / \tilde{\Omega}_{\max};
  • a minimum atom spacing rminr_{\min}, which defines J0J_0 through the distance relation rij=(C6/J0)1/6r~ijrminr_{ij} = (C_6/J_0)^{1/6} \tilde{r}_{ij} \ge r_{\min}, i.e. J0C6/(rmin/r~min)6J_0 \le C_6 / (r_{\min}/ \tilde{r}_{\min})^6.

QoolQit always picks the largest J0J_0 consistent with these hardware constraints, because a larger reference scale realizes the same dimensionless program with a higher physical amplitude and a shorter physical runtime — the most efficient use of the hardware.

Which constraint becomes binding first depends on the dimensionless ratio

Ω~maxJ~max=Ω~maxr~min6 \frac{\tilde{\Omega}_{\max}}{\tilde{J}_{\max}} = \tilde{\Omega}_{\max} \cdot \tilde{r}_{\min}^6

which characterizes the program, compared with the corresponding device ratio

ΩmaxJmax=Ωmaxrmin6C6. \frac{\Omega_{\max}}{J_{\max}} = \frac{\Omega_{\max} \cdot r_{\min}^6}{C_6}.

These two example are shown in the following figure

Compilation diagram

The users works by default at J~=1.0\tilde{J}=1.0. When the program's energy ratio exceeds the device's energy ratio, the drive amplitude bound is reached first (blue line). The largest valid J0J_0 is then obtained by rescaling the amplitude limit to the maximum allowed value (as denoted by the arrow).

In this regime the compiled program runs at maximum device amplitude, and the physical atom spacings are larger than the device minimum.

When the program's energy ratio is within the device budget, the minimum-spacing constraint is reached first (red line). The largest valid J0J_0 is obtained by saturating the distance limit.

In this regime the compiled register uses the smallest physical spacing the device allows, and the resulting amplitude is below Ωmax\Omega_{\max}.

In progress...