-
Notifications
You must be signed in to change notification settings - Fork 41
Description
This issue qualifies for UnitaryDESIGN 2026!
Context
Performance testing is particularly important in quantum computing libraries due to exponential scaling in simulator computational requirements relative to the size of the quantum operation.
Graphix does not currently have a shared system to test performance - codebase performance is tested in an ad-hoc way.
This testing involves:
- creating
Circuitobjects in Graphix (found intranspiler.py) - transpiling to Graphix patterns using the
circuit.transpilemethod - simulating the pattern using the
pattern.simulate_patternmethod (found inpattern.py)
Testing can be done with the timeit module for runtime, and memory_profiler package for maximum memory usage
Various aspects of the library would benefit from such a system, including:
- pattern optimisations
- internal simulation backends
- third-party interfaces.
Such a system is most beneficial when designed based on an industry standard, to allow for simple like-for-like comparison with other libraries.
One example of such a system is the Munich Quantum Toolkit's MQT Bench.
This library generates benchmarking circuits, representing common circuits of interest from general algorithms to parametrised circuits and circuits with specific gate sets.
Task
Design a proof-of-concept, using MQT Bench, for benchmarking in Graphix.
Successful completion of this task will include the creation of a Github repository, with one or more modules.
These modules, acting as a plugin for Graphix, will generate a plot comparing performance of each Graphix backend simulator (StateVector, DensityMatrix and TensorNetwork) across a subset of the benchmark suite circuits.
The underlying class(es) and functions will:
- Generate circuits in MQT Bench and convert to
Circuitobjects in Graphix.- The interface between MQT Bench and Graphix should be general, and support all circuits supported by Graphix. This includes all Graphix circuit (parametrised) gates (see the source code). It should be possible to programatically select a subset of the MQT-bench circuits that fit.
- If not directly converted between MQT Bench and Graphix, conversion of circuits should be through openQASM3. See graphix-qasm-parser.
-
Note: Graphix initialises qubits in the
$|+\rangle$ state, so make sure this is taken into account.
- Transpile to Graphix patterns using the
circuit.transpilemethod. - Simulate the pattern on each simulator backend using the
pattern.simulate_patternmethod. - Measure the time and memory required by the simulation step above (preferably using timeit and memory_profiler, but this is up for discussion).
- Plot these results in a suitable way. See Plot 2 from Nation et al. (2025) as an example.
We are willing to discuss suggestions to change the task conditions in a way that still meets the intent of the bounty.
If accepted, the owner of the Github repository will transfer it to the maintainers of Graphix and it will be included as a Graphix plugin.