{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Optimize an optical readout based on ring resonators" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import torch\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from tqdm.notebook import tqdm, trange\n", "from numpy.fft import fft, ifft, fftfreq\n", "from scipy.signal import butter, lfilter\n", "\n", "import photontorch as pt\n", "\n", "torch.manual_seed(33)\n", "np.random.seed(34)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Parameters" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
key | \n", "value | \n", "description | \n", "
---|---|---|
name | env | name of the environment |
t | 0.000e+00 | [s] full 1D time array. |
t0 | 0.000e+00 | [s] starting time of the simulation. |
t1 | None | [s] ending time of the simulation. |
num_t | 1 | number of timesteps in the simulation. |
dt | None | [s] timestep of the simulation |
samplerate | None | [1/s] samplerate of the simulation. |
bitrate | None | [1/s] bitrate of the signal. |
bitlength | None | [s] bitlength of the signal. |
wl | [1.549e-06, 1.549e-06, ..., 1.551e-06] | [m] full 1D wavelength array. |
wl0 | 1.549e-06 | [m] start of wavelength range. |
wl1 | 1.551e-06 | [m] end of wavelength range. |
num_wl | 10000 | number of independent wavelengths in the simulation |
dwl | 2.000e-13 | [m] wavelength step sizebetween wl0 and wl1. |
f | [1.935e+14, 1.935e+14, ..., 1.933e+14] | [1/s] full 1D frequency array. |
f0 | 1.935e+14 | [1/s] start of frequency range. |
f1 | 1.933e+14 | [1/s] end of frequency range. |
num_f | 10000 | number of independent frequencies in the simulation |
df | -2.499e+07 | [1/s] frequency step between f0 and f1. |
c | 2.998e+08 | [m/s] speed of light used during simulations. |
freqdomain | True | only do frequency domain calculations. |
grad | False | track gradients during the simulation |