Photontorch¶
Examples · Documentation · Index · Module Index
Photontorch is a photonic simulator for highly parallel simulation and optimization of photonic circuits in time and frequency domain. Photontorch features CUDA enabled simulation and optimization of photonic circuits. It leverages the deep learning framework PyTorch to view the photonic circuit as essentially a recurrent neural network. This enables the use of native PyTorch optimizers to optimize the (physical) parameters of the circuit.
Installation¶
Development version¶
During development or to use the most recent Photontorch version, clone the repository and link with pip:
git clone https://git.photontorch.com/photontorch.git
./install-git-hooks.sh # Unix [Linux/Mac/BSD/...]
install-git-hooks.bat # Windows
pip install -e photontorch
During development, use pytest to run the tests from within the root of the git-repository:
pytest tests
Dependencies¶
Required dependencies¶
Python 2.7 (linux only) or 3.6+. It’s recommended to use the Anaconda distribution.
pytorch >=1.5.0:
conda install pytorch
(see pytorch.org for more installation options for your CUDA version)numpy :
conda install numpy
scipy :
conda install scipy
Recommended dependencies¶
tqdm :
conda install tqdm
[progress bars]matplotlib :
conda install matplotlib
[network visualization]networkx :
conda install networkx
[visualization]pytest :
conda install pytest
[to run tests]pandoc:
conda install pandoc
[to generate docs]sphinx :
pip install sphinx nbsphinx
[to generate docs]
Table of contents¶
- Examples
- A Brief Introduction to Photontorch
- Simulating an All-Pass Filter
- Simulating an Add-Drop Filter
- Circuit optimization by backpropagation with PyTorch
- Design of a Coupled Resonator Optical Waveguide band-pass filter with Photontorch
- Optimize an optical readout based on ring resonators
- Unitary Matrix Networks in the Frequency domain
- Unitary Matrix Networks in the Time Domain
- General Ring Networks
- Optimize an MZI in the time domain to perform the XOR on two subsequent bits
- Documentation
Reference¶
If you’re using Photontorch in your work or feel in any way inspired by it, please be so kind to cite us in your work.
Floris Laporte, Joni Dambre, and Peter Bienstman. “Highly parallel simulation and optimization of photonic circuits in time and frequency domain based on the deep-learning framework PyTorch.” Scientific reports 9.1 (2019): 5918.
Where to go from here?¶
Check out the first example: A brief introduction to Photontorch.
License¶
Photontorch is available under an Academic License. This means that there are no restrictions on the usage in a purely non-commercial or academic context. For commercial applications you can always contact the authors.
Copyright © 2020, Floris Laporte - Universiteit Gent - Ghent University - Academic License.