Following a Consultancy project with NeSI, a research group at Waipapa Taumata Rau, University of Auckland studying quantum states of light are now able to investigate systems involving many more atoms than previously.

Simulating quantum systems

"By investigating our code and optimising the libraries that we were using, the NeSI consultants sped up components of our code by a factor of 20."
The below case study shares some of the technical details and outcomes of the scientific and HPC-focused programming support provided to a research project through NeSI’s Consultancy Service.
This service supports projects across a range of domains, with an aim to lift researchers’ productivity, efficiency, and skills in research computing. If you are interested to learn more or apply for Consultancy support, visit our Consultancy Service page.

 

Research background

Quantum systems offer the prospect for the secure storage of information and the development of encrypted communication protocols. At Waipapa Taumata Rau, University of Auckland, Associate Professor Scott Parkins and his graduate students in the Department of Physics are using QuTiP, an open-source software, for simulating quantum systems.

In particular, they are interested in looking at generating states of light which are described by a negative Wigner quasiprobability distribution. Negative quasiprobability distributions are a strictly nonclassical phenomenon, and represent purely quantum states of light. Generating non-classical states is useful in the implementation of quantum information and communication protocols. 

 

Project challenges

Quantum systems involve a large number of combinations of states, all of which need to be taken into account. This leads to 180,000 ordinary differential equations that need to be solved simultaneously. On a workstation, it can take 10 hours to solve such a system. Such computations need to be repeated for every set of parameters, making quantum system computations numerically expensive.

A second challenge revolves around the need to ease collaboration between distributed teams when developing software. This calls for applying good programming practices, which encourage contributions from multiple researchers while ensuring that the code does not break. 

 

What was done

NeSI Research Software Engineer Alex Pletzer and Data Science Engineer Maxime Rio helped Alexander Elliot, a PhD student in Scott's research group, to improve and better understand their code's performance (eg. memory footprint, bottlenecks, etc.). 

Over the course of the project, Alex and Maxime helped Alexander and his colleagues build skills in:

  • Getting started with git version control
    • Setting up ssh and cloning repositories to access code
    • How to contribute to a project by creating feature branches and submitting pull-requests
    • How to review and accept/reject pull-requests
  • Creating Python in a virtual environment in the repository to nail down the package’s dependencies for better reproducibility
  • Creating and building a package with pypackage.toml that installs modules, scripts and dependencies
  • Adding tests with pytest
  • Turning on continuous integration with Github Actions

Alex and Maxime also modified the QuTip repo to leverage NeSI’s MKL library.

 

Main outcomes 

  • Researchers now apply programming practices that facilitate collaboration while ensuring robustness of the developed software
  • A 21x performance improvement when using NeSI’s MKL library while invoking the “direct” solver 

research figure
Attribution: 

The figure above shows Wigner distributions for a mode of the field leaking from an optical cavity, coupled to N two-level atoms, with a laser driving the cavity mode. (a) shows the result for two two-level atoms, and an extra atom is added to the model for each subsequent figure (i.e 2, 3, 4, 5, ... atoms).

Researcher feedback

"Multi-atom simulations scale exponentially with the number of atoms, meaning that computations quickly become infeasible on a standard PC. By investigating our code and optimising the libraries that we were using, the NeSI consultants sped up components of our code by a factor of 20.

This, in combination with the ability to run searches for many different sets of parameters in parallel on NeSI, enables us to investigate systems involving many more atoms than we were previously able to. With Alexander and Maxime’s help, they also helped us set up version control in GitHub to help us collaborate more effectively as a group, and package up many useful tools that we can now easily share."
- The Quantum Optics Group, University of Auckland

 


 

Do you want to bring your research to the next level? We can help. Send an email to support@nesi.org.nz to learn more about our Consultancy support or visit our Consultancy Service page.

 

 

Next Case Study

A picture of someone sitting in a cave in French Polynesia.

Understanding future climate change through the lens of past climates

"The support received from NeSI significantly contributed to our research capabilities and productivity."
Subject: