{"id":18508864,"url":"https://github.com/flaport/photontorch","last_synced_at":"2025-07-18T04:37:24.592Z","repository":{"id":37792250,"uuid":"163304634","full_name":"flaport/photontorch","owner":"flaport","description":"Highly parallel simulation and optimization of photonic circuits in time and frequency domain based on the deep-learning framework PyTorch","archived":false,"fork":false,"pushed_at":"2022-06-16T19:38:09.000Z","size":925,"stargazers_count":80,"open_issues_count":3,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-13T18:13:53.012Z","etag":null,"topics":["optimization","photonic-circuit","photonic-computing","photonic-optimization","photonics","pytorch","simulation","simulation-framework","simulator","torch"],"latest_commit_sha":null,"homepage":"http://photontorch.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flaport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-27T14:40:20.000Z","updated_at":"2025-06-13T17:06:47.000Z","dependencies_parsed_at":"2022-06-22T16:20:09.192Z","dependency_job_id":null,"html_url":"https://github.com/flaport/photontorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flaport/photontorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaport%2Fphotontorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaport%2Fphotontorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaport%2Fphotontorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaport%2Fphotontorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flaport","download_url":"https://codeload.github.com/flaport/photontorch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaport%2Fphotontorch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265701409,"owners_count":23813751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optimization","photonic-circuit","photonic-computing","photonic-optimization","photonics","pytorch","simulation","simulation-framework","simulator","torch"],"created_at":"2024-11-06T15:15:39.724Z","updated_at":"2025-07-18T04:37:24.567Z","avatar_url":"https://github.com/flaport.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photontorch\n\nPhotontorch is a photonic simulator for highly parallel simulation and\noptimization of photonic circuits in time and frequency domain.\nPhotontorch features CUDA enabled simulation and optimization of\nphotonic circuits. It leverages the deep learning framework PyTorch to\nview the photonic circuit as essentially a recurrent neural network.\nThis enables the use of native PyTorch optimizers to optimize the\n(physical) parameters of the circuit.\n\n- Floris Laporte [[floris.laporte@ugent.be](mailto:floris.laporte@gmail.com)]\n- Website: [photontorch.com](http://photontorch.com)\n\n## Installation\n\n### Stable version\n\nPhotontorch can be installed with pip:\n\n```\npip install photontorch\n```\n\n### Development version\n\nDuring development or to use the most recent Photontorch version,\nclone the repository and link with pip:\n\n```\ngit clone https://git.photontorch.com/photontorch.git\n./install-git-hooks.sh # Unix [Linux/Mac/BSD/...]\ninstall-git-hooks.bat  # Windows\npip install -e photontorch\n```\n\nDuring development, use pytest to run the tests from within the root\nof the git-repository:\n\n```\npytest tests\n```\n\n## Documentation\n\nRead the full documentation here: [https://docs.photontorch.com](https://docs.photontorch.com)\n\n## Dependencies\n\n### Required dependencies\n\n- Python 2.7 (Linux only) or 3.6+. It's recommended to use the [Anaconda](http://www.anaconda.com/download) distribution.\n- [`pytorch\u003e=1.5.0`](http://pytorch.org): `conda install pytorch` (see [pytorch.org](https://pytorch.org) for more installation options for your CUDA version)\n- [`numpy`](http://www.numpy.org): `conda install numpy`\n- [`scipy`](http://www.scipy.org): `conda install scipy`\n\n### Optional (but recommended) dependencies\n\n- [`tqdm`](https://github.com/tqdm/tqdm): `conda install tqdm` [progress bars]\n- [`networkx`](http://networkx.github.io): `conda install networkx` [network visualization]\n- [`matplotlib`](http://matplotlib.org): `conda install matplotlib` [visualization]\n- [`pytest`](http://docs.pytest.org): `conda install pytest` [to run tests]\n- [`pandoc`](https://pandoc.org): `conda install pandoc` [to generate docs]\n- [`sphinx`](https://www.sphinx-doc.org): `pip install sphinx nbsphinx` [to generate docs]\n- [`torch-lfilter`](https://github.com/flaport/torch_lfilter): `pip install torch-lfilter` [faster lfilter for detectors]\n\n## Reference\n\nIf you're using Photontorch in your work or feel in any way inspired by it,\nwe ask you to cite us in your work:\n\nFloris Laporte, Joni Dambre, and Peter Bienstman. _\"Highly parallel simulation\nand optimization of photonic circuits in time and frequency domain based on the\ndeep-learning framework PyTorch.\"_ Scientific reports 9.1 (2019): 5918.\n\n## Known issues\n\n- Complex tensor support. Complex tensors are not supported in\n  PyTorch/Photontorch. Wherever complex tensors would be applicable,\n  Photontorch expects a real-valued tensor with the real and imag part\n  stacked in the first dimension. The Photontorch issue can be\n  followed [here](https://github.com/flaport/photontorch/issues/4) and\n  the PyTorch issue [here](https://github.com/pytorch/pytorch/issues/755).\n- Sparse tensor support. A lot of memory usage can probably be avoided\n  when transitioning to a sparse tensor representation for the connection matrices and\n  scatter matrices. The Photontorch issue can be followed [here](https://github.com/flaport/photontorch/issues/5)\n\n## License\n\nPhotontorch used to be available under a custom Academic License, but Since October\n2020, Photontorch is now fully open source and available under the [AGPLv3](LICENSE). \n\nCopyright © 2020, Floris Laporte - UGent - [AGPLv3](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaport%2Fphotontorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaport%2Fphotontorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaport%2Fphotontorch/lists"}