Can we run quantum circuits on ultra-cold atom devices?

In this blog-post, we present our path and thoughts towards using ultra-cold atom experiments for quantum computation. They are the result of a two month internship where we studied the feasibility of such an undertaking in our group. Many associate only universal devices, especially qubit devices, to be valid quantum computers. We show how we think of our ultra-cold atoms in terms of quantum circuits and implement ﬁrst steps in the software framework PennyLane.

1. the complexity of constructing the experimental hardware, which involves substantial technical know-how and funding.2. the specificity of knowledge and language required to understand/communicate the experiment.3. the need to formulate the target problem as a Hamiltonian.4. the manual compilation of programs on this hardware class.
A circuit-based approach to ultra-cold atom quantum simulators would alleviate points 2) and 3) as we could agree on the quantum circuit, given the hardware-specific operations, and run it on the experiment.Integrating the system with a software stack like PennyLane would additionally allow to address and run the experiment on a higher level and substantially lower the barrier of entry for users outside of the cold-atom and quantum physics community.
These points motivated our research group to have a look how our experimental hardware, which is controlled by the Labscript Suite, can be integrated into PennyLane to run quantum circuits on ultra-cold atom devices.Our group is part of SynQS, working on two ultra-cold atom experiments, the NaLi and SoPa (named after the two atomic species used in the lab).
Why use ultra-cold atoms as a quantum information platform ?
For ultra-cold atoms, the processing unit is not a qubit and as such, the natural operations are not generally the commonly used and widely known qubit operations such as X, Y, Z rotations, Hadamard H gates, entangling CN OT or XX gates with oberservables like σ z expectations.Instead, our NaLi experiment implements a X(θ) rotation on a long spin of many bosons on one optical lattice site.Additionally, the system naturally evolves under a many-body Hamiltonian H mb , coupling the the atomic species.
What is the qubit equivalent of those operations?The relation is pretty complex -and that is the nice thing!Cold atoms are different.Given their success in the quantum simulation of many-body problems, they could make for an exciting quantum information processor that is complementary to universal devices.So as a general rule of thumb, it could be argued that cold atom machines often give up some control over individual particles, leading to much bigger systems.Additionally, because we work with a large number of atoms, we can measure obtain rather precise estimates of expectation values with a single state preparation and one measurement.

A concrete example from our group
Before we go into more detailed discussion of our implementation, we will present a concrete example of our device, where we study lattice gauge theories.These theories have become a popular benchmark for quantum simulators (Kokail et al., 2019) and quantum computers (Martinez et al., 2016;Mathis et al., 2020b) in recent years.On our NaLi machine, we recently performed experiments on the building block for certain quantum simulators that would be suited for theories from high-energy physics (Mil et al., 2020).These experiments are performed with two atomic species, sodium and lithium, that can be prepared in two internal spin states.
Re-thinking our analog quantum simulation for the purpose of quantum circuits, we can represent the sodium atoms as a very long spin state |ψ N .The observable outcomes are , where N ∼ 10 5 is the number of sodium atoms.On a quantum computer this should be compared to a qubit, for which we can only measure two outcomes L z = ± 1 2 .The lithium atoms on the other hand can be described by the states on two independent sites |ψ p and |ψ v .For each site we can observe that number of atoms that sit on it.The observable outcomes are then n p/v = 0, . . ., n where n ∼ 10 4 is the number of lithium atoms.
In this formulation and analogous to other circuit-based quantum computing devices, the NaLi experiment then consists of three main stages: 1.The atoms are prepared in some initial state. . . 2. controlled through a set of operations/gates. . .3. and then measured to evaluate the operators L z and N p,v Without having to dig through all the physical details to understand the publication (Mil et al., 2020), the figures in it intuitively open themselves up to readers with varying backgrounds when plotting the corresponding circuits next to them as shown in Fig. 1.
Figure 1: Scetched quantum circuits that correspond to selected figures from Mil et al. (Mil et al., 2020).The results gain a clear intuitive meaning through the quantum circuits even though the system that is being simulated is not known.The color blue signifies the Sodium atoms and the orange color Lithium.

Additional benefits of using the circuit language include
• a more uniform definition of fidelity for ultra-cold atom experiments relative to fidelity in qubit devices where each operation and the final result can be quantified.• improved communication with and feedback of theorists involved in the project by working on the same level of resolution.• more easily generalizing the capabilities of the device to work on other problems.
• general accessibility and a path towards using ultra-cold atoms experiments in the quantum computing community.

Choice of framework software for our quantum circuits
The choice of which framework software to use for our circuit-based approach was not a particularly hard one for us.We have our own experiment in the lab which implements a non-standard device for quantum simulation and thus some of our requirements are (roughly in order of importance): 1. Can we integrate our own experimental hardware into the framework and potentially run it from there? 2. How strong of an assumption is made about the computational unit of the hardware?Does it have to be strictly qubits/photons etc.? 3. Is the framework open-source and shows openness to the academic community?4. Can also integrate classical simulators that are based on our hardware?5. Does it provide some sort of user management and safety measures to avoid unqualified users from killing the system?
Lets give a brief overview of how we answered those questions with regard to PennyLane.PennyLane is designed for users to write and use their own plugin, which is what they call the integration of quantum computing devices into the framework.Officially, it only supports qubit and continuous variable devices and not more general approaches but we may be able to integrate bosonic and fermionic atoms flexibly as the code itself is not very restricted.Other big platorms like Qiskit, Forest and Strawberry Fields focus exclusively on their own quantum computing hardware or simulator without the possibility to integrate your own.PennyLane is open-source and Python-based, which is perfect as the Labscript Suite controlling our experiment is so, too.Additionally, the company behind PennyLane, Xanadu, is a partly academic player who is very open in their publications and supports a great community around the software.The framework allows to add simulators to the framework device which mirror the functionality of the hardware.It performs various parameter range checks for the system and the operations used.Not built-in is user a system for management which allows only registered users to run the experiment from a queue.We would have to implement this ourselves.
All-in-all, PennyLane seems to be the best and likely only fit for our endeavors.Let's talk about it in more detail.

Pennylane
A cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations.Existing popular quantum computing platforms such as Qiskitfor qubits and Strawberry Fields (also created by Xanadu) for photons have written plugins for PennyLane which make their quantum simulators or quantum hardware accessible through it and with that PennyLane's quantum algorithms and automatic differentiation feature.
In fact, any quantum lab can adapt the plugin template for their own experiment and simulators to assimilate their own specific workflow with PennyLane where users are generally able to use the same workflow accross platforms and know what to expect.Fig. 3 shows a typical way of using PennyLane in a classical-quantum hybrid algorithm.Here, the default qubit simulator by PennyLane is used.After writing our own plugin, we can call that device, change the quantum circuit to contain the supported operations and the workflow is otherwise the same.All-in-all, the interface is very robust towards changing up the quantum backend (especially when they support the same operations).Our workflow and connecting PennyLane to our hardware The current state of our pennylane ls plugin for ultra-cold atom experiments can be viewed in this public github repository.It provides examples from our labs and can guide you to adapting it to your own experiment and needs.
Our group uses the Labscript suite to coordinate and execute experimental sequences with cold atoms.
The labscript suite is a collection of programs, which work together to form a control system for autonomous, hardware timed experiments.
On the deepest level it is very nuts and bolts with plenty of commands in the style of Fig. 4 below.The Experiment.py file (Fig. 4) determines the exact sequence of hardware controls that is executed during the measurement.It contains Labscript syntax and is fed into the Labscript Python compiler Runmanager.
Our approach for combining Labscript with PennyLane is sumarized in Fig. 5.
With the help of the plugin functions pre apply(), apply() and post apply(), we generate a new Experiment.py on the fly depending on the quantum circuit programmed through the PennyLane interface.In other words, our PennyLane plugin translates a quantum circuit to an Experiment.py which our control system can interpret.
The expval() method from the plugin is then used to send the newly generated file to the Runmanager and engage the sequence.The output shots are then evaluated and the method returns an expectation.

Figure 2 :
Figure 2: PennyLane as the connecting puzzle piece.Source

Figure 3 :
Figure 3: Typical simple way of using PennyLane by instantiating the device, defining the parametrized quantum circuit and the cost, and calculating the gradient for the classical parameters.Source

Figure 4 :
Figure 4: The Experiment.py (left) defines the experimental sequence of a Labscript-controlled lab experiment, here by calling functions from NaLiFunctions.py at given times.The function UMPUMP (right) shows the exact low level hardware instructions that are to be executed.

Figure 5 :
Figure 5: The functions pre apply(), apply() and post apply() are used to generate a new Experiment.py on the fly for each quantum circuit in PennyLane.apply() loops through the operations in the circuit while the other functions always write the same necessary code for the compilation.