- First install the package manager
uv
. On Mac:
curl -LsSf https://astral.sh/uv/install.sh | sh
If that doesn't work, check out the uv docs
- The following command will use the pyproject.toml, uv.lock and .python-version files to properly build the virtual environment.
uv sync
- Activate the virtual environment.
source .venv/bin/activate
- Now you should be able to run the code.
To run the quantum solver:
uv run ed_quantum.py
To run the classical solver, where you can edit NUM_GENS
and NUM_SCENARIOS
:
uv run uc_classical_clean.py
This will output a dataset into data/
.
To run the QNN on this data, qnn.ipynb
has been created to guide you through the model training, evaluation and classical comparison process.