https://arxiv.org/abs/2312.16985
Project description
qsensoropt
qsensoropt is a library based on Tensorflow 2 for the automatic optimization of adaptive and non-adaptive controls in quantum metrology tasks.
Docs
Documentation for this project is available on gitlab pages.
Along with the description of all the modules, the documentation contains many examples of use on which the user can base new applications.
Installation
The following instructions are written for a Linux system.
It is advisable to install qsensoropt in a conda environment created for the purpose.
-
If conda is not available on you machine, install it with the following commands
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -
Resource the bash configuration with
source ~/.bashrc -
Create a new conda environment named
qsensoroptconda create --name qsensoropt python==3.10 -
Activate the environment just created and upgrade pip
conda activate qsensoropt pip install --upgrade pip -
qsensoroptis based on Machine Learning and a such it is best used with a GPU. If a GPU is available on your system you can use it by installing CUDA and cuDNNconda install -c conda-forge cudatoolkit=11.8 pip install nvidia-cudnn-cu11==8.6.0.163 conda install -c nvidia cuda-nvccConfigure the system path with
mkdir -p $CONDA_PREFIX/etc/conda/activate.d echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$CONDA_PREFIX/bin:$CUDNN_PATH/lib:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.shfollowed by
echo 'export XLA_FLAGS=--xla_gpu_cuda_data_dir=/path/to/cuda/' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.shwhere in the place of
/path/to/cuda/the complete path to cuda on the machine must be inserted. In most cases, while using conda it is sufficient to specify the directory of the environmentqsensoropt.Then restart the environment with
conda deactivate conda activate qsensoropt -
Clone the repository and enter in the
qsensoroptdirectorygit clone https://gitlab.com/federico.belliardo/qsensoropt.git cd qsensoropt -
Install the
qsensoroptlibrary and all its dependenciespip install -e .
Congratulation! You can now optimize your quantum sensor!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file qsensoropt-1.1.0.tar.gz.
File metadata
- Download URL: qsensoropt-1.1.0.tar.gz
- Upload date:
- Size: 39.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfbe8a05d3c73f4ba6d491369a7b1f70bd1061f76b77172cf54642db8cda455b
|
|
| MD5 |
31b6b63caf870ef9b45bfff56dfb3cea
|
|
| BLAKE2b-256 |
5499d50113122980a58cc6796bad5eff5c0281d3656413ecb181b1e8dfbaf93b
|