Code for paper Fermihedral: On the Optimal Compilation for Fermion-to-Qubit Encoding
A Nvidia GPU is required and configured to run noisy simulation using GPU backend. To reduce the time to solve the SAT problems, we recommend to use a CPU with powerful single-core performance since the SAT solver uses only one core.
Ubuntu 22.04 tested.
To replicate our experiments, please at least have
- Python 3.9+ for this project
- For compiling the SAT solver
kissat
:gcc
orclang
andmake
are required. If your are using Ubuntu, thensudo apt install build-essential
.
README.md
: this filerequirements.txt
: required Python packagesfermihedral/
: the main code of our frameworkmodel/
: Hamiltonian patterns of different physical modelsprepare.py
: script to prepare the environmentsimulation.ipynb
,singleshot.ipynb
,hamiltonian-weight.ipynb
: notebooks to reproduce the result.
-
To prepare the environment, execute
python3 prepare.py
, it will create the virtual environment, install packages andkissat
. -
For experiments including Figure 3, 4 and 5, please refer to
singleshot.ipynb
. The executation time could be extremely long. -
For experiments including all noisy simulation, please refer to
simulation.ipynb
. -
For experiments including Hamiltonian Pauli weight using Full SAT or SAT+Anl. method, please refer to
hamiltonian-weight.ipynb
.
Note: please make sure ./data
exists so that all generated data and cache files could be placed correctly.