© Rodrigo Gutiérrez Cuevas
Article_PrecisionLimitTensorWFS provides all the necessary code and examples to reproduce the results presented in the following work:
- Reaching the precision limit with tensor-based wavefront shaping. R. Gutiérrez-Cuevas, D. Bouchet, J. de Rosny, and S.M. Popoff, arXiv:2310.17516 [physics.optics] (2023).
This repository contains all the code to perform the main tensor operations, such as folding, unfolding, computing the n mode product with a matrix or vector. Likewise, it provides functions for computing the higher-order singular value decomposition, and rank-one tensor approximations through the alternating-least squares algorithm. It also provides examples on how the code is run to reproduce the results presented in the main manuscript.
The code provided should be able to run in any standard machine with a working version of python and the following libraries:
- Numpy
- Scipy
- functools
- gc
For the optimization of the input and output projection modes:
- torch
For plotting:
- Matplotlib
- colorsys
Simply download the codes and import the desired functions as shown in the provided Jupyter notebooks.
The following Jupyter notebooks provide detailed examples on how to run the code using the data for the main articles to reproduce all the results presented:
TensorWFS.ipynbreproduces the results of the main manuscript. In particular, it shows how to use the tensor-based functions to optimize the Fisher information.TensorWFS_SI.ipynbreproduces the results of the supplementary information.