finesse.components.workspace module

class finesse.components.workspace.ConnectionSetting(*values)[source]

Bases: __Pyx_FlexibleEnumBase

DIAGONAL = 1[source]
DISABLED = 0[source]
MATRIX = 2[source]
class finesse.components.workspace.Connections[source]

Bases: object

This is a container object for storing the connection submatrices defined by a component. This is used in the default case where no optimised C class is provided.

class finesse.components.workspace.ConnectorCallbacks(*values)[source]

Bases: __Pyx_FlexibleEnumBase

FILL_INPUT_NOISE = 8[source]
FILL_MATRIX = 1[source]
FILL_NOISE = 4[source]
FILL_RHS = 2[source]
class finesse.components.workspace.ConnectorMatrixSimulationInfo(connections=None, noise_sources=None)[source]

Bases: object

add_fill_function(self, callback, bool refill)[source]

This adds a callback function that will be used by the model to fill the matrix elements. This can either be a Python function or cdef wrapped with FillFuncWrapper.

Parameters

callbackCallable or FillFuncWrapper

Callback for fill function

refillboolean

Flags that this fill function will need to be called multiple times during simulation to refill the simulation matrix

callback_flag
connection_settings
connections
noise_sources
set_fill_noise_function(self, noise_type, callback)[source]

This sets the callback function that will be used by the model to fill the noise matrix elements. This can either be a Python function, which accepts a

set_fill_quantum_noise_input_function(self, callback)[source]

This sets the callback function that will be used by the model to fill the quantum noise matrix elements due to input nodes.

set_fill_rhs_fn(self, callback)[source]

This sets the callback function that will be used by the model to fill the RHS vector elements. This can either be a Python function or cdef wrapped with FillFuncWrapper.

class finesse.components.workspace.ConnectorWorkspace(owner, sim, carrier_connections=None, signal_connections=None, values=None, noise_sources=None)[source]

Bases: ABCDWorkspace

This workspace represents the basic container for storing details for modelling Connector elements - those which form edges and nodes in a model.

carrier
input_noise
output_noise
signal
class finesse.components.workspace.FillFuncWrapper[source]

Bases: object

Helper class for wrapping a C fill function that can be referenced from Python by objects. This allows a direct C call to the function from other cdef functions.

Examples

Create a C function then wrap it using this class:

>>> cdef void c_fill(ConnectorWorkspace ptr_ws) noexcept:
>>>    cdef MirrorWorkspace ws = <MirrorWorkspace>ptr_ws
>>>    ...
>>>
>>> fill = FillFuncWrapper.make_from_ptr(c_fill)
class finesse.components.workspace.NoiseInfo(int num_nodes, int num_frequencies)[source]

Bases: object

class finesse.components.workspace.NoiseSources[source]

Bases: object

This is a container object for storing the noise submatrices defined by a component. This is used in the default case where no optimised C class is provided.