Apache License 2.0

项目介绍

google/ceviche-challenges 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 126 个 Star、16 次 Fork。

仓库全名
google/ceviche-challenges
开源许可证
Apache License 2.0
Star 数
126
Fork 数
16

README 摘要

Ceviche Challenges: Photonic Inverse Design Suite The cevichechallenges module contains a suite of photonic inverse design challenge problems, backed by the open source ceviche finite difference frequency domain (FDFD) simulator, and packaged into a standard API for calculating scattering parameters and fields. Gradients and automatic differentiation capabilities are provided by HIPS autograd. The suite of challenge…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ceviche-challenges 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 126 个 Star。

ceviche-challenges 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ceviche-challenges 的源码?

可以直接克隆仓库:git clone https://github.com/google/ceviche-challenges.git,默认分支为 main;安装与运行步骤见仓库 README。

ceviche-challenges 最近还在维护吗?

仓库最近一次更新为 2024年1月21日,当前没有未关闭的 Issue;Star 数为 126,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A suite of photonic inverse design challenge problems for topology optimization benchmarking

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
284
价值分
93
活跃状态
归档

语言占比

Python

Release

贡献者

README

Ceviche Challenges: Photonic Inverse Design Suite

The ceviche_challenges module contains a suite of photonic inverse design challenge problems, backed by the open source ceviche finite difference frequency domain (FDFD) simulator, and packaged into a standard API for calculating scattering parameters and fields. Gradients and automatic differentiation capabilities are provided by HIPS autograd.

The suite of challenge problems may be used to benchmark different topology optimization algorithms in designing relevant photonic components. The suite includes several integrated photonic components, including a waveguide beam splitter, a waveguide mode converter, a waveguide bend, and a wavelength division multiplexer (WDM).

The code in this module was used to produce the results in the Inverse Design of Photonic Devices with Strict Foundry Fabrication Constraints paper.

Challenge problems

Waveguide bend

Waveguide bend

Beam splitter

Beam splitter

Mode converter

Mode converter

Wavelength division multiplexer (WDM)

Wavelength division multiplexer (WDM)

Installation

ceviche_challenges can be installed via pip:

pip install ceviche_challenges

Usage

ceviche_challenges provides several “prefab” component configurations, which live in the following submodules:

  • ceviche_challenges.beam_splitter.prefabs
  • ceviche_challenges.mode_converter.prefabs
  • ceviche_challenges.waveguide_bend.prefabs
  • ceviche_challenges.wdm.prefabs

Each component type (i.e. beam splitter, mode converter, etc) has an associated model class for performing simulations and returning complex-valued scattering parameters. An example using the 2 um x 2 um waveguide bend prefab is shown below.

import numpy as np
import ceviche_challenges

spec = ceviche_challenges.waveguide_bend.prefabs.waveguide_bend_2umx2um_spec()
params = ceviche_challenges.waveguide_bend.prefabs.waveguide_bend_sim_params()
model = ceviche_challenges.waveguide_bend.model.WaveguideBendModel(params, spec)

# The model class provides a convenience property, `design_variable_shape`
# which specifies the design shape it expects.
design = np.ones(model.design_variable_shape)

# The model class has a `simulate()` method which takes the design variable as
# an input and returns scattering parameters and fields.
s_params, fields = model.simulate(design)

The model class can also be used inside of an objective function to perform an optimization. Gradients and loss function automatic differentiation is supported by HIPS autograd.

import autograd
import autograd.numpy as npa

# Construct a loss function, assuming the `model` and `design` from the code
# snippet above are instantiated.

def loss_fn(x):
  """A simple loss function taking mean s11 - mean s21."""
  s_params, _ = model.simulate(x)
  s11 = npa.abs(s_params[:, 0, 0])
  s21 = npa.abs(s_params[:, 0, 1])
  return npa.mean(s11) - npa.mean(s21)

loss_value, loss_grad = autograd.value_and_grad(loss_fn)(design)

There are a number of other features in the device model class, such as returning an image of the structure. These features are best explored by reading the code and the function docstrings, as we don’t have comprehensive standalone documentation at this time.

Citation

If you find ceviche_challenges to be useful for your research, please consider citing our paper. A BibTex citation is provided below for convenience.

@article{schubert_inverse_2022,
  title = {Inverse Design of Photonic Devices with Strict Foundry Fabrication Constraints},
  author = {Schubert, Martin F. and Cheung, Alfred K. C. and Williamson, Ian A. D. and Spyra, Aleksandra and Alexander, David H.},
  journal = {ACS Photonics},
  volume = {9},
  number = {7},
  pages = {2327-2336},
  year = {2022},
  doi = {10.1021/acsphotonics.2c00313},
}

评论

暂无评论