Five Tips to Boost Your Qubit Measurements

June 7, 2022 by Andrea Corna

When operating qubits, speed and high system utilization are key to achieving rapid progress. This is true even for initial experiments - such as qubit characterization - that need to be repeated frequently. Quickly cycling through different measurements allows you to save time and, therefore, focus more on the actual science.

In this blog post, you’ll find a collection of five important tips to optimize the throughput of your Zurich Instruments Quantum Computing Control System (QCCS) and perform measurements faster than ever!

1 - Create a dedicated network for your instruments

As a basis for fast measurements, it’s important that your QCCS is efficiently linked to your control computer through a LAN network.

For optimal performance, we recommend installing an Ethernet card solely dedicated to your instruments and use it to configure a separated network. That way, you can have the card’s entire bandwidth dedicated to your measurements and accidental and unintended access to your instrument control is prevented.

Example of a dedicated network for instruments

Linking instruments through a shared Ethernet switch to the control computer that is also connected to a university or corporate network exposes your instrumentation both to unintentional access and limitations due to the network bandwidth. With separate Ethernet cards, you will still be able to control your instruments remotely (see Working Remotely with Zurich Instruments' LabOne), since your computer acts as gateway.

Two last tips when using a dedicated network card:

  1. By default, your computer doesn't assign an IP address to the instruments, making their provisioning challenging. We recommend installing a DHCP server on your computer to centralize the management of your small local network. On Windows, you can use Open DHCP Server, while on Linux or macOS, Dnsmasq is recommended. Ensure it only listens to the card on your local network, otherwise your system administrator will have a chat with you 😉.
  2. Please choose Ethernet cables of the appropriate category. We provide suitable Ethernet cables with our instruments, but, of course, these cables always get mixed up over time. Check that the cables you are using are at least Cat5e (Category 5 enhanced) or better, otherwise they will cap your speed at only 100Mbps! The category is typically printed on the cable itself.

2 - Set nodes in batches

After setting up your control instrumentation, and every time you switch between different types of measurements, you’ll configure your instruments through setting nodes.

In most cases, several such nodes need to be manipulated at once, and for this you should always use our ‘transactional set’. The advantage? In contrast to the ‘regular set’, multiple nodes are written to the instrument simultaneously, which saves communication overhead, even for large numbers of nodes.

How do you use ‘transactional set’? With our open-source, pythonic API - the zhinst-toolkit - it’s very easy. Just modify your nodes as usual, but open a set_transaction context and set all parameters you want. For example, update 4 oscillator frequencies, route one of them to an output, and switch all instruments outputs on with one communicated command:

with device.set_transaction():
    for i in range(4):
        device.oscs[i].freq(i*1e6)
    device.sines[0].enables[1](True)
    device.sigouts["*"].on(True)

Note here the use of a wildcard ("*”), which also comes in handy when you request several settings from the device.

The updates will be committed when the set_transaction is closed. This example, with only a few nodes, is five times faster than code which sets each node separately. Now consider setting hundreds of nodes!

3 - Use placeholder waveforms

To generate pulsed qubit control signals, you’ll likely make use of our arbitrary waveform generator (AWG) sequencers. Typically, you’ll define an experiment sequence in our C-type sequencer language– SeqC. The program will then be compiled and executed in real time on the instrument FPGAs. For each experiment, a new program needs to be compiled, so compilation time is critical and needs to be minimized. The way that custom waveform data is supplied to the AWG compiler can have a large impact on compilation speed.

As detailed also in our user manual, there are two methods to link the AWG compiler with your custom waveforms:

  1. By directly uploading a waveform either floating point in a CSV file or through a binary file.
  2. By defining a placeholder waveform in SeqC and then upload the waveform through the API.

We recommend variant 2 – here is why:

Thanks to the advanced libraries NumPy/SciPy it is easy to create the waveforms in Python. These waveforms are then often stored in a file following upload to the instrument using method 1. Although we support this method for convenience, this is inefficient, as the waveform needs to be serialized, written on the disk of the control computer, read from the disk, and finally deserialized – all done during the SeqC compilation step.
Variant 2 bypasses all these steps and directly writes into the onboard instrument memory. To see how to do that, check out our LabOne Programming Manual or our zhinst-toolkit AWG example can point you in the right direction.

To showcase the compilation difference, I created a randomized benchmarking sequence with flat waveforms, i.e., a single long waveform that contains all pulses. Varying the length of the sequence from 1 to 214 Clifford gates (around 18 million samples), I measured both the data upload time and the compilation time. The figure below shows just how large the overhead of using CSV files (variant 1) is, with a linear increase of the compilation time with increasing waveform length. Direct upload (variant 2) requires a constant compilation time. The upload time doesn’t differ significantly between the two variants. If you want to test it in your system – here is the link to the Python script.

 

Waveform compilation benchmark, placeholder vs CSV

4 - Keep LabOne updated

LabOne is the software that powers Zurich Instrument devices and runs both on the control computer and the instruments. We keep on enhancing its capabilities and deliver upgrades to all our user at no cost – twice a year. Often, we add new features or support for new products, fix bugs, or improve performance. For example, we recently focused our attention to optimize our AWG compiler’s performance for quantum technology applications. As discussed in the last tip, compilation time is a key performance metric of the AWG. In our latest release (version 22.02.29711 at the time of writing), we were able to tune the compiler to a degree that it showed up to 90% performance improvement for many sequences. Sounds like a great reason to click that "Update" button!

To showcase this improvement, I carried out another performance measurement based on the example of a randomized benchmarking sequence. This time, instead of a single long flat waveform, we define all the Clifford gates as individual waveforms that we upload to the instrument. The sequence program now just calls a random list of these Clifford gates one after the other. From the performance graph, it is evident that with latest LabOne release the compilation time is reduced significantly, making the longest sequence of 214 Clifford gates (around 18 million of samples) even faster than the shortest before! Try it by yourself here.

 

Compiler benchmark, old vs new

I hope this convinces you to keep your LabOne installation updated. To do so, please follow the official instructions - and, if you are using Python to control your instruments, please also update the zhinst library with

%pip install -U zhinst

from your Jupyter notebook (or without the percentage sign from your Anaconda/system shell).

5 - Challenge us to get the best out of your sequencers

Tips 1 to 4 gave you an idea of the potential that’s under the hood of your QCCS already. But there’s often even more to be gained in terms of performance and ease of use when looked at in the context of a specific use case. We at Zurich Instruments are constantly working to help you to tweak our sequencers to get the best performance out of your measurements. –  promoting efficient ways on how to tackle a specific problem. So, keep track of our blog posts, get in contact, and challenge us!

Here is just a glimpse of useful examples where we demonstrate how to boost your instruments’ performance.

  • Randomized benchmarking (RB) – seen above – not only helps benchmarking compilation time, but it is a widely used tool in quantum information science to measure gate fidelity. In the blog post Randomized Benchmarking in Seconds, Clemens compares different ways how to perform that optimally.
  • Qubit characterization requires pulses with many dynamical parameters. In Efficient Generation of Dynamic Pulses, I show how to create sample-precise complex pulses faster than ever.
  • Often, we need to generate modulated pulses. All our signal generators have at least one integrated, numerically controlled oscillator that can be used to parametrically control pulse parameters through pulse-level sequencing, while maintaining long-term phase coherence - all in conjunction with arbitrary waveform capabilities. In How to Generate QAM Signaling with the HDAWG, Mehdi demonstrates several complex modulation techniques.
  • Unfortunately, cabling in a real-world setup is not as ideal as we would like. The large temperature gradients in cryostats impose choices on the cabling that will distort your signal before reaching the qubits. Luckily, it’s possible to compensate for them in real-time. In AWG Precompensation for High-Fidelity CZ Gates in Transmon Qubits, Chunyan shows how to do that very efficiently and with minimal effort.

Conclusions

There are many ways to speed up the measurement of your qubits. Here, I showed you some that can give you a significant boost. Need more? Write to me at Andrea.Corna@zhinst.com, I’m looking forward to your challenge!