ipkiss3.all.CompactModel

class ipkiss3.all.CompactModel(**kwargs)

Base class to define a circuit model.

import ipkiss3.all as i3

class MyModel(i3.CompactModel):

    # list all the parameters that are used in your model
    parameters = [
        'width',
        'transmission'
    ]

    # you can provide defaults for the parameters:
    width = 1.0

    # list the terms of your model
    terms = [
        i3.OpticalTerm(name='in', n_modes=2),
        i3.OpticalTerm(name='out', n_modes=2),
    ]

    # When you're defining a stateful model,
    # list the states here.
    states = [
        'some_state'
    ]

    def calculate_smatrix(parameters, env, S):
        # in calculate_smatrix you can define the
        # frequency response of your model
        S['in', 'out'] = 1.0

    def calculate_signals(parameters, env, output_signals, y, t, input_signals):
        pass

    def calculate_dydt(parameters, env, dydt, y, t, input_signals):
        pass
calculate_dydt = None
calculate_signals = None
calculate_smatrix = None
netlist = <Netlist with 0 terms, 0 nets and 0 instances
parameters = []
states = []
terms = []