Compilation for Dynamically Field-Programmable Qubit Arrays with Efficient and Provably Near-Optimal Scheduling. Open source under the BSD 3-Clause license.
- We recommend to run the compiler in a Python3 virtual environment.
- The file
enola/router/codegen.py
is based on a file from OLSQ-DPQA, so you need to installnetworkx
andmatplotlib
. - To compile circuits in the QASM format, you need
qiskit
installed. We used the API inqiskit-1.1.0
specifically. - The code for Misra&Gries coloring algorithm in
enola/scheduler/
is from this Misra-Gries-coloring.
run.py
is an example of using the compiler on a circuit specified by a qubit interaction graph. Refer topython run.py -h
for options.run_qasm.py
is an example of using the compiler for circuits in the QASM format. Refer topython run_qasm.py -h
for options.enola/
contains the source files implementing Enola.graphs.json
contains all the random 3-regular graphs we used as qubit interaction graphs.animation.py
contains the classAnimator
that generates animations from the full code produced by Enola based on the implementation from Animation.py in OLSQ-DPQA. Refer topython animation.py -h
for options.simulator.py
contains the classSimulator
that calculate the circuit fidelity based on Enola instructions. Refer topython simulator.py -h
for options.qasm_exp/
is the directory containing one generic circuit example from QASMBench.results/
is the default directory for the results.results/code/
contains the code files generated from compilation results.results/animations/
contains animation generated from full code files.results/fidelity/
contains fidelity estimation based on code files.
- Run
python run.py <S> <I>
where<S>
is the number of vertices in the random 3-regular graph,<I>
is the id of the graph. To try other graphs, please editrun.py
as needed.- Default setting: simulated annealing with dynamic placement, maximal independent set with sorting heuristic for routing strategy, no restriction for vectex number in solving MIS, and no animation code generation.
- The most scalable setting: trivial layout (
--trivial_layout
), return to initial mapping after each Rydberg stage (--r2i
), using maximal independent set for routing (--routing_strategy=maximalis
), and limit the number of vertices to 1000 in solving MIS (--window
).
For example,python run.py 30 0 --trivial_layout --r2i --routing_strategy=maximalis --window
- (Optional) To generate animation, run
python animation.py <F>
where<F>
is the full code file, e.g.,results/code/rand3reg_30_0_code_full.json
.