qprof

Matrix exponential of “-i H t”

Initiation of the project

The qprof idea came just after the implementation of the quantum wave equation solver using QatHS, when I reached the optimisation step. Once again the issue was the lack of proper tooling around quantum computing frameworks: I wanted to optimise my implementation, but no tool I was aware of was capable of analysing the quantum circuits I generated and to give me the numbers I want.

Goal of the project

The target of this project was to produce a gprof-compatible tool: a program that would analyse quantum circuits and output a summary in the exact same format as gprof.

The constraint on the output format (that should be exactly the same as gprof) was motivated by several points:

  1. gprof is nearly $40$ years old and is still recognised as one of the standard tools to profile code nowadays. As such, I came to the conclusion that its output format should be the result of many years of polishing and is probably a good starting point.
  2. There exist a plethora of tools that plug themselves to gprof post-processing its output. I was mostly looking at the excellent gprof2dot tool that generates a dot file from gprof output. Having an output format compatible with gprof made the usage of all these tools possible and easy.

Conclusion of the project

I am still working on this project actively. It has already been tested on a big implementation involving a lot of nested calls: QatHS. The results are already quite nice as you can see on the following call graphs, generated with qprof, gprof2dot and Graphviz' dot tool using quantum circuits from QatHS.

Call graph with the QFT-based
adder.
Call graph with the arithmetic-based adder.

The next step will be to update the existing (but not published) qiskit plugin for qprof. This will allow qprof to analyse quantum circuits implemented with qiskit.

Thanks to its modular implementation, qprof should be trivial to extend to any library using the quantum circuit model.

PhD student in Quantum Computing

I am a doctoral student currently involved in a PhD on quantum computing algorithms and how they can be applied to speed-up scientific computing.

Previous