Skip to main content

Meent

Meent is an Electromagnetic(EM) simulation package with Python, composed of three main parts:

  • Modeling
  • EM simulation
  • Optimization

Backends

Meent provides three libraries as a backend:
alt text

  • NumPy
    • The fundamental package for scientific computing with Python
    • Easy and lean to use
  • JAX
    • Autograd and XLA, brought together for high-performance machine learning research.
  • PyTorch
    • A Python package that provides two high-level features: Tensor computation with strong GPU acceleration and Deep neural networks built on a tape-based autograd system

When to use

Numpy JAX PyTorch Description
64bit support O O O Default for scientific computing
32bit support O O O 32bit (float32 and complex64) data type operation*
GPU support X O O except Eigendecomposition**
TPU support* X X X Currently there is no workaround to do 32 bit eigendecomposition on TPU
AD support X O O Automatic Differentiation (Back Propagation)
Parallelization X O X JAX pmap function

*In 32bit operation, operations on numbers of 8>= digit difference fail without warning or error. Use only when you do understand what you are doing.
**As of now(2023.03.19), GPU-native Eigendecomposition is not implemented in JAX and PyTorch. It's enforced to run on CPUs and send back to GPUs.

Numpy is simple and light to use. Suggested as a baseline with small ~ medium scale optics problem.
JAX and PyTorch is recommended for cases having large scale or optimization part.
If you want parallelized computing with multiple devices(e.g., GPUs), JAX is ready for that.
But since JAX does jit compilation, it takes much time at the first run.

How to install

pip install meent

JAX and PyTorch is needed for advanced utilization.

How to use

import meent

# backend 0 = Numpy
# backend 1 = JAX
# backend 2 = PyTorch

backend = 1
mee = meent.call_mee(backend=backend, ...)

Tutorials

Jupyter notebooks are prepared in tutorials to give a brief introduction.

Examples

Comprehensive examples of computational optics with Meent can be found in examples folder.

Citation

To cite this repository:

@article{kim2024meent,
    title={Meent: Differentiable Electromagnetic Simulator for Machine Learning},
    author={Kim, Yongha and Jung, Anthony W. and Kim, Sanmun and
            Octavian, Kevin and Heo, Doyoung and Park, Chaejin and
            Shin, Jeongmin and Nam, Sunghyun and Park, Chanhyung and
            Park, Juho and Han, Sangjun and Lee, Jinmyoung and
            Kim, Seolho and Jang, Min Seok and Park, Chan Y.},
    journal={arXiv preprint arXiv:2406.12904},
    year={2024}
}

Metadata

Release files for meent 0.13.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meent 0.13.2
File Size Uploaded
meent-0.13.2.tar.gz 356.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meent 0.13.2
File Interpreter ABI Platform
meent-0.13.2-py3-none-any.whl Python 3 none any Details

Total release size: 738.7 kB

Release files / meent-0.13.2.tar.gz

Download URL meent-0.13.2.tar.gz
Size 356.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62bd207fb2eb7d56629ae3c76db58b92d6cc7e4126761ca64a66a9f3bc73e524
BLAKE2b-256 checksum
How to use checksums
c0b1694b504feeefd1a1fae806bb3179025ce93bd76753e94614b60e3c9f546d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / meent-0.13.2-py3-none-any.whl

Download URL meent-0.13.2-py3-none-any.whl
Size 381.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ae2abcedfe4b185a36cfe870e8108ce490923775f5033857c50010c37e97aae
BLAKE2b-256 checksum
How to use checksums
7ffbcb89426d95907669625bd3dd88df720f59c1e5a9255fbd1f8896487dd6bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.13.2 This release

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.9.11

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.11

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page