Quantum computers are exceptionally promising, but also exceptionally unstable. While the processing elements in a conventional computer can run for almost a billion years without suffering a hardware fault, the qubits in quantum computers tend to fail in much less than a second.  Unfortunately this places a major limit on how enterprises can exploit quantum computing to solve real challenges from finance to drug discovery.

Despite continuous improvements in hardware design, errors and hardware instability will continue to limit the capabilities of quantum computers - whether these come from fundamental physics or from more mundane sources like imperfections in classical electronics.

At Q-CTRL, we have pioneered quantum firmware - a software layer that actually stabilizes the underlying quantum hardware against these errors - in order to support the scale-up of quantum computers to the sizes we need to tackle commercially relevant problems.  Our software tools like BOULDER OPAL allow users to redefine the machine language we employ to construct quantum algorithms, now with enhanced resilience against error.  Through the power of quantum control this results in the ability to execute more complex quantum algorithms sooner, and with greater success probability.

Quantum firmware leverages low-level, analog-layer access to machine instructions in order to deliver high-performing quantum logic. This level of programming access - and hence the benefits of quantum firmware - has mostly been restricted to research groups operating their own experimental hardware. Cloud quantum computers have generally been throttled and constrained to make them simpler to use.

In the following we’ll describe two projects led by the Q-CTRL team leveraging Rigetti Quil-T analog programming access. The first was a hands-on task where we used our product, BOULDER OPAL in combination with Quil-T programming to demonstrate performance enhancement on Rigetti’s cloud devices. The second was a more forward-looking theoretical challenge; we set out to explore novel quantum logic gate designs on Rigetti’s unique hardware.

Error-robust single-qubit logic gates with Quil-T

To design error-robust logic gates we start with a basic model of Rigetti’s hardware. This starts with a mathematical representation or “Hamiltonian” describing the qubits, the noise that we want to suppress, and the parameters we’re able to change, like the shape of microwave pulses used to enact the quantum logic. In addition we can add any hardware constraints that may be relevant to the problem, reflecting, for instance, limitations on the electronics used to power the quantum computer.

The next step consists of using Q-CTRL’s custom software package called BOULDER OPAL which allows users to perform numerical optimizations via cloud-computing infrastructure. In the case of single-qubit gates, the optimizer returns the exact shape of the microwave pulse required to enact the desired quantum logic gate. This optimization is computationally challenging - especially when considering hardware constraints - and our cloud architecture has been shown to give some very big speedups.

You can see in the example below a smooth pulse that was constructed to perform a bit-flip operation and to be robust against control noise. That is, it has been designed to implement the desired quantum logic while also being insensitive to errors in the magnitude of the two signals we generate.

Q-CTRL Rigetti Pulse
Q-CTRL Rigetti Pulse

The implementation of this pulse on the hardware requires a proper calibration of the signal $\gamma(t) = I(t) +i Q(t)$. In our experiment, this is accomplished by varying a scaling factor $s$ multiplying the pulse so that $\gamma(t) \rightarrow s \gamma(t)$. In Quil-T, this scan can be performed efficiently using the parametric compilation feature, which allows the program to be compiled only once before being executed multiple times for each desired value of $s$.

The following code snippet shows how this is done: a `new_waveform`, defined using the values of the Q-CTRL optimized pulse, is added to the custom program definition that performs the gate on qubit 32. The program is then compiled with `scale` as a parameter that is then used within a loop to obtain the desired scan.

new_waveform = DefWaveform(entries=qctrl_pulse_values, name='custom', parameters=[])
prog_32_custom = Program("""
DEFCAL CustomX 32:
    FENCE 32
    NONBLOCKING PULSE 32 "rf" custom
    FENCE 32

SET-SCALE 32 "rf" scale

CustomX 32
MEASURE 32 ro[0]""")

prog_32_custom += new_waveform
exe = qc.compiler.native_quil_to_executable(prog_32_custom)

# Run executable on QPU
scales = np.linspace(0,2,100)
for scales in scales:
    results = qc.run(exe, {'scale': scale})

So how well does this gate work? The answer to this question comes directly from the experimentally varying the scaling factor $s$. If the gate is really robust against imperfections in the magnitudes of the control signals $I(t)$ and $Q(t)$, then there should be a broad range of $s$ where the gate performs well.

When we examine Rigetti’s native single-qubit gate, it shows an oscillatory behavior with an optimal scaling factor $s=1$, indicating that the gate works well only for a narrow range around this optimal calibration value. Move away and the amount of error or “infidelity” rapidly increases.

In stark contrast, the optimized error-robust pulse shows a broad plateau at low gate infidelity demonstrating that amplitude fluctuations in that range would not affect gate performance. This is a key signature of “robustness” in a quantum logic gate.

For the average user, replacing standard gates with these optimized error-robust gates mean that whenever you perform your experiments, you’ll be able to achieve maximum success probability in your algorithm even as the system varies in time - something we routinely see in real devices.

Q-CTRL Rigetti Robustness Scan
Q-CTRL Rigetti Robustness Scan

New two-qubit gates with arbitrary flux modulation

The exciting control possibilities enabled by Quil-T don’t stop at single qubit gates!

Quil-T allows the user to access and manipulate all gate definitions in Rigetti’s hardware, including the waveform of the magnetic flux pulse used in the construction of their native two-qubit gates - the gates that generate entanglement between qubits.  This immediately triggered the curiosity of our team; What could we achieve with access to this extra control knob? The answer it turned out was a totally new way to generate the multiqubit entangling gates for Rigetti’s hardware that could offer better error-robustness than the standard gates.

Let’s first understand how the original two-qubit gates work. The setup involves two capacitively coupled transmon qubits, one with a frequency fixed in hardware and another with a frequency that can be tuned via an external signal (an applied magnetic flux, $\phi_{\rm ext}(t)$). In these so-called parametric gates, modulation of the external flux at a specific oscillatory frequency creates different interaction terms corresponding to three possible two-qubit interactions. Simply selecting the appropriate flux modulation frequency allows you to choose the gate you want.

In the left panels of the figure below, you can see an example of such a pulse and the corresponding dynamics when the frequency is set to perform a gate known as CZ02. But this gate is imperfect and can only achieve about 99% gate fidelity in the best case.  We wanted to beat that.

Q-CTRL Rigetti Flux Gates
Q-CTRL Rigetti Flux Gates

We started out thinking we needed to create optimized gates staying within this “fixed-modulation frequency” paradigm. But BOULDER OPAL is much smarter than that!

Using BOULDER OPAL, and starting with the standard construction, we found that by iteratively adding small changes we could find totally new gates that don’t look at all like the fixed-frequency starting point.

In our numerical simulations, the optimized pulse, shown on the right side of the figure above, outperformed the default parametric gate in the whole range of detunings investigated, resulting in a 10x improvement in infidelity in the noise-free case and robustness to errors. These are exciting first results and we can’t wait to further explore the control possibilities for this problem and to implement them using Quil-T!

Stay tuned!