Skip to main content

Differentiable photonic design and simulation on XLA accelerators

Project description

PHOXLA

PHOXLA ("FOX-luh") - Differentiable photonic design and simulation on XLA accelerators.

PHOXLA is a framework blueprint for building modern photonic inverse-design systems with JAX/Flax. The goal is to treat differentiable physics as a first-class deep learning component, so photonic simulation modules can be plugged into end-to-end trainable workflows.

Vision

  • XLA-native photonic simulation and optimization (GPU/TPU first, CPU compatible)
  • Differentiable physics modules usable as model layers/loss terms
  • Inverse design pipelines integrated with standard deep learning tooling
  • Extensible interoperability with JAX-based solvers (including FDTDX-style workflows)

Current Status

This repository is an initial blueprint and governance scaffold. Core simulation and training modules will be added incrementally.

Planned Package Layout

  • src/phoxla/sim: differentiable photonic simulation core
  • src/phoxla/nn: NN-facing modules and differentiable operators
  • src/phoxla/inv: inverse design workflows and optimizers
  • src/phoxla/integrations/fdtdx: interoperability layer

Repository Bootstrap

See:

  • docs/REPO_LAUNCH_GUIDE.md
  • docs/REPO_ABOUT_AND_TOPICS.md
  • docs/PACKAGE_NAMESPACE_PLAN.md
  • docs/PYPI_CLAIM_PLAYBOOK.md
  • docs/NAMESPACE_PRIORITY.md
  • docs/AUTOMATION_FLOW.md
  • docs/ARCHITECTURE_BLUEPRINT.md
  • docs/COMMIT_MESSAGE_GUIDE.md
  • ROADMAP.md

Quick Release Commands

make venv
make qa
make next-tag
make release-check

# then with PyPI token in env:
make publish-pypi

Modern Tooling Stack

  • Ruff: lint + format
  • Pytest: test runner
  • Mypy: static type checks
  • pre-commit: local hook runner
  • GitHub Actions: CI (ci.yml) + auto-tag (auto-tag.yml) + release publish (release.yml)

Local setup

make venv
. .venv/bin/activate
pre-commit install

Daily checks

make qa

Conventional commit -> version bump

  • feat:, fix:, perf:, refactor: -> alpha bump (...aN)
  • feat!: / fix!: / BREAKING CHANGE -> next major alpha (X+1.0.0a0)
  • docs:, chore:, test:, ci: only -> no release

End-to-end Automation Flow

  1. Push to main
  2. ci.yml runs Ruff/Mypy/Pytest/build checks
  3. auto-tag.yml computes next alpha tag from commit messages and pushes vX.Y.ZaN tag
  4. release.yml runs full quality/build checks on that tag
  5. release.yml publishes GitHub Release notes + uploads package to PyPI (Trusted Publishing)

auto-tag.yml writes the new version (e.g., 0.1.4a0) into pyproject.toml and src/phoxla/__init__.py, so manual a1/a2/a3 edits are not needed.

Push To GitHub

git add .
git commit -m "feat(core): add initial phoxla module scaffold"
git remote add origin git@github.com:phoxla/phoxla.git
git push -u origin main

Publish To PyPI (name claim)

. .venv/bin/activate
python -m build --sdist --wheel --no-isolation
python -m twine check dist/*
read -s -p "PyPI token: " PYPI_TOKEN; echo
TWINE_USERNAME=__token__ TWINE_PASSWORD="$PYPI_TOKEN" python -m twine upload dist/*
unset PYPI_TOKEN

License

Apache-2.0 (LICENSE)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phoxla-0.1.4a2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phoxla-0.1.4a2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file phoxla-0.1.4a2.tar.gz.

File metadata

  • Download URL: phoxla-0.1.4a2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phoxla-0.1.4a2.tar.gz
Algorithm Hash digest
SHA256 26f92f9c13caa3421af333b20328d46600207c2e7f059f4e376f391014e5146d
MD5 e1e6e0453db9cf36f924ab73e064a4b4
BLAKE2b-256 d7ab070bec223f5dae24c438ca58cd6a0ad420ee1c87a58b35e42eff6180a321

See more details on using hashes here.

Provenance

The following attestation bundles were made for phoxla-0.1.4a2.tar.gz:

Publisher: release.yml on phoxla/phoxla

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phoxla-0.1.4a2-py3-none-any.whl.

File metadata

  • Download URL: phoxla-0.1.4a2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phoxla-0.1.4a2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4b60660cb22ec6a55e5f32cb4a9913e4b20dc5fc0a38f4a38c2f25a14980ebf
MD5 81c1a9725571f367eede9585777d925d
BLAKE2b-256 f05f97710e8fdce5b465d4ccdb707dab101c68bd247676d3478ce47624757b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for phoxla-0.1.4a2-py3-none-any.whl:

Publisher: release.yml on phoxla/phoxla

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page