Recent posts

Welcome to Google Summer of Code 2020

For this summer, I will be working full-time on the open-source project QuTiP with a stipend provided by Google as part of the Summer of Code 2020 project to the umbrella organisation numFOCUS. One requirement of the stipend is that I blog about what I am working on throughout the project, and on any interesting parts of team programming I encounter, so that future applicants to the programme have an idea of what to expect. I will be doing that here, under the “GSoC” tag.

QuTiP is a Python library for dynamics simulations of open quantum systems, something that I have made heavy use of during my PhD studies. At its core is the Qobj class, which represents all quantum objects. Currently, the underlying data storage format is always a compressed-sparse-row matrix, which allows efficient simulation of very large tensor-product spaces, but introduces significant overhead when handling smaller, few-qubit systems. The aim of the project is to abstract out the data layer so that higher-level components can function seamlessly without worrying about the representation format, but the advanced user will be able to access accelerated functions by using the right tool for the job. You can also read my full project proposal in PDF format hosted here.

Detecting star imports in Python

Star (or wildcard) imports are one of the methods for importing libraries in Python, and although they are generally discouraged, they are rather prevalent in a lot of notebook-style scientific code. Within a package being imported, there is no official way of knowing whether this is by a star import, but since Python allows overriding just about everything, we can detect slight differences in the methods and inject arbitrary code if the wildcard is used.

In QuTiP, we currently suffer from long import times and want to move to a scipy-like style where fewer symbols are in the global package namespace, and submodules are only imported if explicitly requested. We want to issue a warning to people currently using the from qutip import * syntax, because the number of symbols available to them will soon decrease.

…more recent posts