Borealis Quickstart

   Borealis will only be available to the public until June 2, 2023.
   Public access to this device will not be available after this date.

Authors: Theodor Isacsson and Isaac De Vlugt

In this quickstart, we will show how Xanadu’s new Borealis quantum hardware can be programmed in minutes. Borealis showcases quantum computational advantage, as can be seen in our publication in Nature [1] — meaning that it can compute in seconds quantities that would require years on the fastest available supercomputer. Its hardware is based on time-domain multiplexing (TDM); a single squeezed-light source emits batches of 216 time-ordered squeezed-light pulses that interfere with one another with the help of optical delay loops, programmable beamsplitters, and phase shifters. To demonstrate quantum computational advantage, we chose a task that is proven to be computationally hard: Gaussian Boson Sampling (GBS). We will show you how to run our experiment!


If you would like to learn more about Borealis and how to program it in more detail, check out our Borealis demo for beginners.

To start off, we import the necessary packages. Then, by loading a device object which contains relevant and up-to-date information about Borealis, we can retrieve the device by calling the device property on the RemoteEngine object.

import strawberryfields as sf
import numpy as np

eng = sf.RemoteEngine("borealis")
device = eng.device

A time-domain program is defined by arguments that each quantum gate applies at each time bin, within the duration of the program. We’re going to use helper functions that will do some heavy lifting for us. The borealis_gbs function will summarize all the necessary information for Strawberry Fields and our hardware to implement your circuit, then get_mode_indices gives us the number of concurrent modes N and the mode indices n.

from strawberryfields.tdm import borealis_gbs, get_mode_indices

gate_args_list = borealis_gbs(device, modes=216, squeezing="high")
delays = [1, 6, 36]
n, N = get_mode_indices(delays)

Finally, we can construct and run the circuit.

from strawberryfields.ops import Sgate, Rgate, BSgate, MeasureFock

prog = sf.TDMProgram(N)

with prog.context(*gate_args_list) as (p, q):
    Sgate(p[0]) | q[n[0]]
    for i in range(len(delays)):
        Rgate(p[2 * i + 1]) | q[n[i]]
        BSgate(p[2 * i + 2], np.pi / 2) | (q[n[i + 1]], q[n[i]])
    MeasureFock() | q[0]

shots = 10_000
results =, shots=shots, crop=True)

Congratulations for successfully demonstrating quantum computational advantage!



Madsen, L.S., Laudenbach, F., Askarani, M.F. et al. “Quantum computational advantage with a programmable photonic processor”, Nature 606, 75-81, 2022.

About the authors

Theodor Isacsson

Theodor Isacsson

Theodor Isacsson is a quantum software developer at Xanadu. He works on the photonics software stack, leading the efforts to expand and maintain packages such as Strawberry Fields and The Walrus.

Isaac De Vlugt

Isaac De Vlugt

Isaac De Vlugt is a quantum computing educator at Xanadu. His work involves creating accessible quantum computing content for the community, as well as spamming gifs in our Slack channels.

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery