Skip to content

Performance at scale

LabOne Q was originally developed fully in the Python language. This enabled fast turnaround and rapid prototyping of new functionality and allowed us to remain very close to the needs of our partners throughout the nearly three years of LabOne Q’s availability.

In the next phase of our roadmap, software performance moves closer to the center of attention to enable the next scaling milestones. In this phase, we take the proven and reliable mechanics of the LabOne Q compiler and migrate it into a programming language giving access to much enhanced performance: Rust.

We now have completed the first phase of this migration, rewriting the code generator in Rust. By starting with the code generator, we realize the largest possible improvement potential, especially for experiments with many qubits or signal lines.

Our migration strategy is designed to minimize the impact on our users and to keep all functionality available. We are migrating the compiler piece-by-piece, all while performing extensive tests to ensure reliability for our users throughout the process. The only impact will be a boost in performance.

This page highlights some of the performance improvements that have already happened, and explains how you can use benchmark your own code and experiments using a easy-to-use benchmarking package that is released as part of our open-source repository.

Performance data

Figure 1: Total time spent in the LabOne Q compiler as function of LabOne Q version for two large-scale experiments.

Figure 2: Time spent in the LabOne Q code generator as function of LabOne Q version for two large-scale experiments.

The above two plots show benchmark measurements of the time spent compiling two large experiment in different LabOne Q versions - the example experiments chosen here are a Ramsey experiment with 201 sweep steps executed in parallel on 180 qubits and an RB experiment in parallel on 4 qubits, with a sequence length of 8192 Clifford gates and 40 random sequences. Starting with version 2.41 from the end of 2024, when we started focusing on performance, we increased the overall compilation speed by a factor 28 for the Ramsey and by a factor 6 for the RB experiment.

Zooming in on the code generator part, which was the main focus in the past months, we see the speed up is significantly increased to factors of 18 and more than 200 - clearly the code generator is now no longer the bottleneck, and it is time to move our focus to the remaining parts of the LabOne Q compiler. Stay tuned for the next results!

Figure 3: Time spent in the LabOne Q code generator as function of problem size for different versions of LabOne Q. The data is shown on a log-log scale to highlight the different scaling behavior with problem size achieved early on between versions 2.41.0 and 2.47.0.

Another highlight on our journey to more performance is not concerned with the translation into Rust, but concerns algorithmic improvements. Early on in the effort, we realized that the compilation time did not scale favorably with problem size, as can be seen in the above figure: instead of the expected linear scaling with size, we observed approximately quadratic scaling. One of the first changes implemented was therefore an improvement in the algorithmic component of the code generator, that managed to restore the expected linear scaling with problem size, as shown in the plot.

All benchmarking data shown here was obtained on a standard consumer laptop (Macbook Pro 14-inch, 2023 with M2 Pro processor and 16 GB RAM).

Installing the benchmark package

The standalone benchmarking package is part of our public repository and contains benchmarking tools and experiments for LabOne Q. Under the hood, it uses the OpenTelemetry framework to instrument LabOne Q code and obtain reliable benchmarking data.

Install directly from the laboneq-benchmark source folder into any environment that already contains a LabOne Q installation using

uv pip install -e .

The package requires a LabOne Q installation with a minimum version of LabOne Q 2.41.0.

For an example of how to use the benchmarking package, refer to the example notebook in the examples folder.

Example experiments

The source repository contains implementations of standard Ramsey and Rabi experiments, as well as single qubit randomized benchmarking. All these experiments can be executed and tested with LabOne Q versions as early as 2.41.

In addition, a two-qubit randomized benchmarking experiment that uses more recent language features of LabOne Q, and is only tested with version from LabOne Q 2.57.