A GSOC Summary
This blogpost is meant to serve as a repository of links pointing towards the work done on the Quantum Circuits GSOC project.
The project aimed to enhance the QIP module of QuTiP by adding a structure and enhancing the capabilities of circuit simulation as well as adding compatibility with other quantum libraries. While the second half of the project was aimed towards enhancing circuit simulation in the presence of noise, a change of direction was decided upon with the support of the mentors. The latter half then focussed on making important changes to the QuTiP documentation and working on the project to port the QIP sub-module of QuTiP to it’s own repository. This decision was made after exploring the previous idea of improving features related to noise and realizing that it was probably a project suited more to a longer timeframe keeping in mind my level of comfort with the material required and the amount of work required. Furthermore, the alternative tasks of shoring up QuTiP documentation and bootstrapping the new repository required more immediate attention and fit more neatly into the timeframe.
The work can be divided roughly into the following sections:
- Circuit Simulation:
Addition of measurement gates and classical controls to theQubitCircuit
class and a simple circuit simulation module (PR #1274, merged).
Consolidated circuit simulation in a new classExactSimulator
for easier use and extension. Also adds a few optimizations for faster simulation (PR #1331, under review).
Added new documentation and organized existing documentation for circuits (PR #117, under review).
Added a notebook covering a tutorial on Quantum Teleportation and giving examples on circuits (PR #108, under review).
Ideas: There is a lot of new features that can now be added to the QIP module especially in terms of making circuit simulation more seamless. For example, theProcessor
based simulation could be incorporated in theExactSimulator
API structure by extending it. Furthermore, once the PR forExactSimulator
is merged, it would be much easier to make unitary simulation faster by modifying specific sections of the code.
- Quantum Assembly Language Support:
Added support for import from and export to the OpenQASM format. This enables further compatibility with other quantum libraries such as Qiskit and Cirq.
Import.qasm
file into Quantum Circuit (PR #1291, merged).
Export Quantum Circuit to.qasm
file (PR #1318, merged).
Added notebook with examples and explanations. (PR #111, under review).
Ideas: The QASM import/export modules could have better error reporting. The more immediate task is to add more example notebooks for import/export from other Quantum libraries.
- Enhancements for QuTiP documentation:
The QuTiP documentation was failing to build due to problems withipython_directive
(Issue #103) and there was another suggestion to add sphinx doctests to the documentation (Issue #115).
Addressed both issues by convertingipython
code blocks todoctest/testcode/plot
code blocks adding capability to test examples in documentation as well as examples in inline documentation. Also fixes the build issue (PRs #120, #1334, under review).
Ideas: Doctest style tests try to match numerical values exactly, however it is not feasible to keep the exact same precision/accuracy each time, therefore it would be easier if all such tests could somehow be matched approximately without changing the code examples visually. - QIP Repository: I was not able to hit any significant milestones with respect to this task but I did make some inroads. I will continue working on this part of the project and the progress can be tracked at the QIP repository.
GSOC has been an xcellent experience and I would love to thanks my mentors Alex Pitchford, Boxi Li, Nathan Shammah and Neil Lambert for their amazing support and guidance. The experience has acquainted me well with the rigors of OSS and I hope to continue working on QuTiP in the future.
Reply