class ipkiss3.all.ConnectComponents

Parametric Cell for logically connecting multiple components.

The user supplies a dictionary of the instances of child cells that need to be placed through the property child_cells. This dictionary maps the instance names to the PCell objects. The same PCell object can be used for multiple instances.

child_cells={ "ring1"  : my_ring1,
              "ring2"  : my_ring2,
              "spl"    : my_splitter,
              "com"    : my_splitter # the same cell is used both for splitting and combining

The connectivity between the instances of the child cells is set by a list of tuples containing pairs of instance terms/port names. This list links is of the form instname:portname

links=[ ("spl:arm1",   "arm1:in1"),
        ("arm1:out1", "com:arm1"),
        ("spl:arm2",   "arm2:in1"),
        ("arm2:out1", "com:arm2")

All the terms of the instances are connected to outside terms. You can override the default external term names using the external_port_names property. There you can specify the individual names of the external terms. If no name is specified, the default pattern of ‘instname_termname’ will be used.

external_port_names={ "spl:in1"  : "input",
                      "com:out1" : "output"
links: list and List with type restriction, allowed types: [<class ‘’>]

list of tuples connecting the instances. Format is [(‘inst1:term1’,’inst2:term2’), …]

external_port_names: str

Map of the free instance terms/ports to the names of external terms/ports.Format is a dict {‘inst:term’ : ‘new_term_name’}.If a term/port is not listed, the format instname_portname will be used


dict to create the instances of the child cells.Format is {‘inst_name1’: PCell}

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell


"""Here we connect 2 splitters and two rings into a RLMZI
We use the splitter twice but use two different rings.
import si_fab.all as pdk  # noqa: F401
from ipkiss3 import all as i3  # noqa: F401
import numpy as np
import pylab as plt

from picazzo3.filters.ring import RingRectNotchFilter
from picazzo3.wg.splitters import WgY90Splitter

ring1 = RingRectNotchFilter()
cp = {"cross_coupling1": 0.4j, "straight_coupling1": (1 - 0.4**2) ** 0.5}
ring1.CircuitModel(coupler_parameters=[cp], ring_length=50.0)

ring2 = RingRectNotchFilter()
ring2.CircuitModel(coupler_parameters=[cp], ring_length=55.0)

splitter = WgY90Splitter()

pc = i3.ConnectComponents(
    child_cells={"spl": splitter, "com": splitter, "arm1": ring1, "arm2": ring2},
        ("spl:arm1", "arm1:in"),
        ("arm1:out", "com:arm1"),
        ("spl:arm2", "arm2:in"),
        ("arm2:out", "com:arm2"),

cm = pc.CircuitModel()

# Caphe simulation
wavelengths = np.linspace(1.50, 1.6, 2001)
R = cm.get_smatrix(wavelengths=wavelengths)

plt.plot(wavelengths, np.abs(R["spl_center", "com_center"]) ** 2, "b", label="power")
plt.title("Waveguide transmission (Power)")
plt.xlabel(r"Wavelength ($\mu m$)")
plt.ylabel("Power transmission")


class Layout
view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

static from_canvas(project_file, lib_name, cell_name, instantiation_rewrite=<function _instantiation_rewrite>)

Load a design from IPKISS Canvas and return a ConnectComponents object.

Using ConnectComponents.from_canvas, users can load an existing design created in IPKISS Canvas back into Python code. The resulting circuit is created using i3.ConnectComponents, meaning this is mostly useful for running circuit simulations.


Assumes that the *.iclib files used in the project are placed next to of the library they export. If this is not the case, automated library imports will fail, and ConnectComponents.from_canvas will be unable to resolve instances in your design.


The project filename to load the cell from

lib_name, cell_name: str

library and cell name to generate an IPKISS design for.

instantiation_rewrite: function

Allows to customize how IPKISS pcells are instantiated.


An object of the type i3.ConnectComponents