This is the code repository for the paper Quixer: A Quantum Transformer Model. It contains the implementation of the classical simulation of Quixer, along with Transformer, LSTM and FNet baselines.
Important
It is recommended that you first install the version of torch
2.2.3 suitable to your platform by following the instructions here, or the command below may not work.
When installing using the above link, add torchtext==0.18.0
to the installation command. For example
conda install pytorch==2.3.0 torchvision==0.18.0 torchtext==0.18.0 torchaudio==2.3.0 cpuonly -c pytorch
pip install -e .
On CPU:
python3 run.py -d cpu -m Quixer Transformer LSTM FNet
On Nvidia GPU:
python3 run.py -d cuda -m Quixer Transformer LSTM FNet
You can exclude any of the models in the commands above and it will not be run.