Skip to main content

Rust-backed photonics mode solver with a small Python API.

Project description

micromode

A minimal FDFD electromagnetic mode solver for rasterized waveguide cross sections with a Rust core made to be a standard plugin for FDTD engines.

License Tests Coverage

pip install micromode

Why Use It?

  • Grid-first API: pass arrays directly, with no required geometry model.
  • Rust sparse backend: one production solve path.
  • Practical outputs: fields, n_eff, k_eff, mode area, polarization fractions, Lorentz overlaps, plotting, dataframe export, and HDF5 save/load.
  • Tensor-aware: supports scalar, diagonal anisotropic, and full tensor material grids.
  • Works for both 2D cross sections and 1D slices.

You give it a material grid. It returns guided modes: effective indices, six-component fields, polarization metrics, mode area, overlaps, diagnostics, plots, and HDF5 output. MicroMode is intentionally not a CAD or geometry package. It is the solver piece you use after geometry has already been rasterized onto a mode-plane grid.

Quick Start

import micromode as mm

wavelength_um = 1.55
freq = mm.C_0 / wavelength_um

# Arrays from your own rasterizer.
eps_xx, x_edges, y_edges = mode_plane_arrays(...)

materials = mm.Materials.from_diagonal(
    eps_xx=eps_xx,
    x_edges=x_edges,
    y_edges=y_edges,
)

data = mm.solve_modes(
    material_grid=materials,
    freqs=[freq],
    num_modes=2,
    target_neff=2.5,
)

print(data.n_eff.values)
data.plot_field("Ex", mode_index=0)
data.to_hdf5("modes.h5")

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

micromode-0.1.0a1.tar.gz (10.7 MB view details)

Uploaded Source

Built Distributions

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

micromode-0.1.0a1-cp313-cp313-manylinux_2_38_x86_64.whl (17.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64

micromode-0.1.0a1-cp313-cp313-macosx_11_0_arm64.whl (20.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

micromode-0.1.0a1-cp313-cp313-macosx_10_12_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

micromode-0.1.0a1-cp312-cp312-manylinux_2_38_x86_64.whl (17.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

micromode-0.1.0a1-cp312-cp312-macosx_11_0_arm64.whl (20.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

micromode-0.1.0a1-cp312-cp312-macosx_10_12_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

micromode-0.1.0a1-cp311-cp311-manylinux_2_38_x86_64.whl (17.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

micromode-0.1.0a1-cp311-cp311-macosx_11_0_arm64.whl (20.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

micromode-0.1.0a1-cp311-cp311-macosx_10_12_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

micromode-0.1.0a1-cp310-cp310-manylinux_2_38_x86_64.whl (17.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

micromode-0.1.0a1-cp310-cp310-macosx_11_0_arm64.whl (20.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

micromode-0.1.0a1-cp310-cp310-macosx_10_12_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file micromode-0.1.0a1.tar.gz.

File metadata

  • Download URL: micromode-0.1.0a1.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for micromode-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 e163cb052091bfee5484bcb2c36a90c5bc6ed310c3dbd43cf41f49995d1c2348
MD5 363441ddad388570db5f87db7f96c0b2
BLAKE2b-256 878e45b821b2f60beeb6250b7f7b78eb505e568dee7ff3be3a24601d1824f25e

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1.tar.gz:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 fd08893f076695b1a30be3d43bed4bdecea965f0fe12b383dbb9c8549cb68997
MD5 a2218a8349e07c81ad57bbebd7ee4563
BLAKE2b-256 e5c9e35d55d6eecbd03799d2f1dca127539988eb357fab71e664b06658246f48

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp313-cp313-manylinux_2_38_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f52a055c2569f0416b0e3eef90a510ecde70238fe99111dcb1d3897d3fdcc8a5
MD5 2aca6f0e00bc9286ecbedaf1c0c496e8
BLAKE2b-256 55aee2fbef16f81d65865550b96ed527c314e4652cf7aa019071cfec05581d57

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5dabcee30a2bb46b0ee20cb1288cd3b5a57a5646268a1c6b68da5b286d4d030e
MD5 7f62b1d37d0f29b5ceca4c4da67574cf
BLAKE2b-256 f229c32f763df520474f37d40d24ffe2320ebb1110c6e5ecc6e83ac76e4999e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 fa05d6ab6f7e549ba2e8a84ff5d4617eb507a02c2cd7f8dd2e62eee217e200e6
MD5 35684247098670e74091af2fa4ba5290
BLAKE2b-256 5e78e0dec67c1138663a7a4672379e41296af2329bf46dbfe2f106f058852ea2

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp312-cp312-manylinux_2_38_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ec3b072864135caedc83417edd1f90cd49da928fa6ba0662c96130ddde72f87
MD5 18c87c26832c27b82e889dd32298eb77
BLAKE2b-256 411ac90a96af21caa1f1e4abb8f20992f8186463af8badc14a7d9400af6e7cb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 644ceaa111c12f372b45deb7cfe02a8423206797e2072de465897033f97fbd8d
MD5 d5dffa32e93572e8ff28bb5844279da4
BLAKE2b-256 c44eb7237baca27be1ce532c1e2a1f6363f9d14024cddab9d2b1df60e2823932

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 23f37b15c8037a019f02d2adaf08d9619464dc2d9a396b03a69a2652036319f9
MD5 dce690a7161e462cd5a7e23896d413c2
BLAKE2b-256 f95fb8209604a6805a887d21b9122a62fe850b01926eb55976bf5e4297b1a153

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp311-cp311-manylinux_2_38_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce2222d533bbf4c3f0a4134ba6c6aefd6077de03047ca85e2e7dd2683d185121
MD5 58b58305f1f524bc9f20b974fa4f59c1
BLAKE2b-256 ffabf1bd5d21425b53dcc8834a20909469388646b39630a5f97f9ce72c4ae950

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 043ede028f392cd8265605bc78c50ce3e4dd663b1c4499afeb5063f6b1003e92
MD5 0ad2a1a95cf022dddbc6c49e5b22de23
BLAKE2b-256 38db400ada0466c6443224da66267d6bd5dce25d2515f6d9f070bb36f8bfb419

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 3f801405fca20b995e0c3120282f789c4e590620ae97f261e6ee04f3b3aaee17
MD5 26acd19d7351f74f87e15a3b7e825915
BLAKE2b-256 6edb2de74ca8c4cbf592b8105953fdb5c7b89aca12f05b50821beefff758c820

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp310-cp310-manylinux_2_38_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8227af97565ac1663a5e8a67b6a7f6f43d98d07c41b1c989177695fda9318ec
MD5 45558e7718373d0ef5f7c06ec9cc1671
BLAKE2b-256 86de7b657df70fc28bc0274db2d7cad9c690c13e763b58ec293484fffb07018b

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on QuentinWach/micromode

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

File details

Details for the file micromode-0.1.0a1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for micromode-0.1.0a1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5a2699c03eda84d627ebb8c0a9a8614f9e5d3c4578a797cfd1062bf6e5ec1af0
MD5 bb32829beca0e30d8815526349ee5cb1
BLAKE2b-256 003d9e83e0bd02e3666d702828c483615b532922c5c5c39d606031923e55349f

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromode-0.1.0a1-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: publish.yml on QuentinWach/micromode

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