Computations in the monodromy polytope for quantum gate sets
Fixed-Depth Two-Qubit Circuits and the Monodromy Polytope described a technique for determining whether a given two-qubit unitary can be written as a circuit with a prescribed sequence of two-qubit interactions, interleaved with arbitrary single-qubit unitaries. This python package is a computationally effective implementation of that technique.
- This package comes with a
requirements.txt
file. Begin by installing those requirements, usingpip -r requirements.txt
. - Install
lrs
. Typically, this means downloading the source, building it, and placing the generated executable somewhere in the search path for your python process. NOTE: We require version version โฅ0.7.1b oflrsgmp
(renamed tolrs
). - Optionally, install
lrcalc
. Typically, this means downloading the source, building it, then building the Cython bindings, and installing the resulting package. This is not necessary:lrcalc
is needed only for the curious user who wants to regenerate the contents ofqlr_table.py
.
If you're unable to put lrs
in your search path, you can specify its location via the environment variable LRS_PATH
.
Give it a whirl with scripts/demo.py
.
We've designed the package around polytopes with rational coordinates.
In practice this suits the use cases of quantum computer scientists fine, but it is easy to imagine use cases outside of this.
lrs
makes strong assumptions about the kind of arithmetic used, so if one were to want to process irrational polytopes, one would be obligated to move away from lrs
.
lrs
is licensed under GPLv2, which makes it insuitable for inclusion in some projects.
We may someday want to remove (or make optional) this dependency from this project.
To this end, we have set up a backend
which describes a contained and minimal set of calls we make of any computational library.