Skip to content

Commit

Permalink
⬆️ Initial spice environment upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Jun 8, 2024
1 parent 7630e8f commit efec66a
Show file tree
Hide file tree
Showing 34 changed files with 1,678 additions and 526 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "environment/nix/nix-eda"]
path = environment/nix/nix-eda
url = [email protected]:daquintero/nix-eda.git
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
rev: ad3ff374e97e29ca87c94b5dc7eccdd29adc6296
hooks:
- id: codespell
args: ["-L TE,TE/TM,te,ba,FPR,fpr_spacing,ro,nd,donot,schem,Synopsys,ket,inout" ]
args: ["-L TE,TE/TM,te,ba,FPR,fpr_spacing,ro,nd,donot,schem,Synopsys,ket,inout,astroid" ]
additional_dependencies:
- tomli

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/examples/03b_optical_function_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
print(pi_phase_circuit)
print(piel.round_complex_array(pi_phase_circuit[0]))


# ```python
# (Array([[ 1.000000e+00+6.123234e-17j, 6.123234e-17+0.000000e+00j],
# [ 6.123234e-17+0.000000e+00j, -1.000000e+00-6.123234e-17j]], dtype=complex128), ('o2', 'o1'))
Expand Down Expand Up @@ -574,11 +575,13 @@
)
chain_mode_3, chain_mode_3_switch_position_list


# Let's consider the "X" state can only have two possible states, cross and bar which are represented by the angle applied, (0 -> 0, bar) and (1 -> $\pi$, cross).
#
# If we have a fock state `[[1], [0], [0]]` inputted onto the switch lattice, we want it to route out the photon accordingly at the bottom mode index 2, third waveguide. Accordingly, the top-most switch needs to cross and the bottom most needs to bar in order to achieve this function.
#
#

# We can try a little analytical simulator accordingly. Each "switch" state gets replaced by a 2x2 transmission matrix for each specific state, and concatenated to build the corresponding state of the system.

piel.models.logic.electro_optic.get_state_phase_transitions(
Expand Down
23 changes: 18 additions & 5 deletions docs/examples/04_spice_cosimulation/04_spice_cosimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import piel
import sax
import sys
from gdsfactory.generic_tech import get_generic_pdk

get_generic_pdk().activate()

# ## Start from `gdsfactory`

Expand Down Expand Up @@ -36,16 +39,26 @@

# ```python
# {'component': 'straight_heater_metal_undercut',
# 'info': {'resistance': None},
# 'settings': {'cross_section': 'strip',
# 'length': 200.0,
# 'with_undercut': False}}
# 'info': {'resistance': 0},
# 'settings': {'length': 200,
# 'length_undercut_spacing': 0,
# 'length_undercut': 5,
# 'length_straight': 0.1,
# 'length_straight_input': 0.1,
# 'cross_section': 'xs_sc',
# 'cross_section_heater': 'xs_heater_metal',
# 'cross_section_waveguide_heater': 'xs_sc_heater_metal',
# 'cross_section_heater_undercut': 'xs_sc_heater_metal_undercut',
# 'with_undercut': False,
# 'via_stack': 'via_stack_heater_mtop',
# 'heater_taper_length': 5.0,
# 'straight': {'function': 'straight'}}}
# ```

# So this top heater instance `info` instance definition, it already includes a `resistance` field. However, in the default component definition, it is defined as `None`. Let us give some more details about our circuit, and this would normally be provided by the PDK information of your foundry.

# +
from piel import straight_heater_metal_simple
from gdsfactory.components import straight_heater_metal_simple
import functools

# Defines the resistance parameters
Expand Down
Loading

0 comments on commit efec66a

Please sign in to comment.