This code reproduces the figures in Constrained and Vanishing Expressivity of Quantum Fourier Models. It implements the process of calculating empirical, analytic values and upper bounds of Fourier Coefficients for the Data Reuploading Model.
- Clone the Repository
git clone https://github.com/quantumsoftwarelab/DRM_fourier_expressivity.git
cd DRM_fourier_expressivity
- Set Up a Virtual Environment Create and activate a Python virtual environment. This step is optional but recommended to maintain dependency isolation.
- On macOS and Linux:
python3 -m venv quantum_fourier_env
source quantum_fourier_env/bin/activate
- On Windows:
python -m venv quantum_fourier_env
.\\quantum_fourier_env\\Scripts\\activate
- Install Dependencies Install all the required packages listed in the requirements.txt file:
pip install -r requirements.txt
- Verification After installation, you can verify that the packages have been installed correctly by running:
pip list
- Kernel for Jupyter Install the kernel for the notebooks
python -m ipykernel install --user --name=quantum-model-kernel --display-name "Quantum Fourier Model Kernel"
An example on how to run the functions is available in the main.ipynb
notebook. Make sure to use the correct kernel. If you are using VSCode, you would probably have to refresh the Jupyter Kernels list.
For questions and suggestions, please contact Mario Herrero González: mherrer3@ed.ac.uk
Distributed under the Apache-2.0 license.