PolarizationSplitterRotatorModel

class photonforge.PolarizationSplitterRotatorModel(*, s00=0, s01=0, s02=1, s03=0, s04=0, s05=0, s11=0, s12=0, s13=0, s14=1, s15=0, s22=0, s23=0, s24=0, s25=0, s33=0, s34=0, s35=0, s44=0, s45=0, s55=0, output_mode=0, ports=None)[source]

Data model for a polarization splitter rotator.

Two types of PSR models are supported: a 4-port model that assumes a 2-mode input port and 2 single-mode outputs; and a 6-port model that assumes all 3 ports support 2 modes.

The full 6-port S matrix is represented by the usual coefficients:

\[\begin{split}S_{6p} = \begin{bmatrix} s_{00} & s_{01} & \cdots & s_{05} \\ s_{01} & s_{11} & \cdots & s_{15} \\ \vdots & \vdots & \ddots & \vdots \\ s_{05} & s_{15} & \cdots & s_{55} \\ \end{bmatrix}\end{split}\]

The 4-port version drops the coefficients related to the unused mode in the output ports. Using output_mode = 0 (default):

\[\begin{split}S_{4p} = \begin{bmatrix} s_{00} & s_{01} & s_{02} & s_{04} \\ s_{01} & s_{11} & s_{12} & s_{14} \\ s_{02} & s_{12} & s_{22} & s_{24} \\ s_{04} & s_{14} & s_{24} & s_{44} \\ \end{bmatrix}\end{split}\]

and using output_mode = 1:

\[\begin{split}S'_{4p} = \begin{bmatrix} s_{00} & s_{01} & s_{03} & s_{05} \\ s_{01} & s_{11} & s_{13} & s_{15} \\ s_{03} & s_{13} & s_{33} & s_{35} \\ s_{05} & s_{15} & s_{35} & s_{55} \\ \end{bmatrix}\end{split}\]
Parameters:
  • s00 (complex | Sequence[complex]) – Reflection for first mode on input port.

  • s01 (complex | Sequence[complex]) – Inter-mode reflection for input port.

  • s02 (complex | Sequence[complex]) – Transmission for first mode on input port to first mode on first output port.

  • s03 (complex | Sequence[complex]) – Transmission for first mode on input port to second mode on first output port.

  • s04 (complex | Sequence[complex]) – Transmission for first mode on input port to first mode on second output port.

  • s05 (complex | Sequence[complex]) – Transmission for first mode on input port to second mode on second output port.

  • s11 (complex | Sequence[complex]) – Reflection for second mode on input port.

  • s12 (complex | Sequence[complex]) – Transmission for second mode on input port to first mode on first output port.

  • s13 (complex | Sequence[complex]) – Transmission for second mode on input port to second mode on first output port.

  • s14 (complex | Sequence[complex]) – Transmission for second mode on input port to first mode on second output port.

  • s15 (complex | Sequence[complex]) – Transmission for second mode on input port to second mode on second output port.

  • s22 (complex | Sequence[complex]) – Reflection for first mode on first output port.

  • s23 (complex | Sequence[complex]) – Inter-mode reflection for the first output port.

  • s24 (complex | Sequence[complex]) – Leakage (isolation) between the first mode on the first output port and the first mode on the second output port.

  • s25 (complex | Sequence[complex]) – Leakage (isolation) between the first mode on the first output port and the second mode on the second output port.

  • s33 (complex | Sequence[complex]) – Reflection for second mode on first output port.

  • s34 (complex | Sequence[complex]) – Leakage (isolation) between the second mode on the first output port and the first mode on the second output port.

  • s35 (complex | Sequence[complex]) – Leakage (isolation) between the second mode on the first output port and the second mode on the second output port.

  • s44 (complex | Sequence[complex]) – Reflection for first mode on second output port.

  • s45 (complex | Sequence[complex]) – Inter-mode reflection for the second output port.

  • s55 (complex | Sequence[complex]) – Reflection for second mode on second output port.

  • output_mode (Literal[0, 1]) – Mode number used in output ports in the 4-port version.

  • ports (Annotated[Sequence[str], maxItems=3, minItems=3] | None) – List of port names. If not set, the sorted list of port names from the component is used.

Notes

Dispersion can be included in the model by setting the coefficients to 1D arrays with the length of the frequencies vector to be used in the computation.

Methods

black_box_component([port_spec, ...])

Create a black-box component using this model for testing.

estimate_cost(*args, **kwargs)

Estimate the cost for S matrix computation.

s_matrix(component, frequencies[, ...])

Compute the S matrix for a component using this model.

setup_time_stepper(component, time_step[, ...])

Obtain a time stepper for a component using this model.

start(component, frequencies, **kwargs)

Start computing the S matrix response from a component.

update(*args, **kwargs)

Update this model.

Attributes

parametric_function

Function used to update a parametric component.

parametric_kwargs

Keyword arguments used to update a parametric component.

properties

Object properties.

random_variables

Random variables associated to this modles's parameters.

time_stepper

Time stepper associated with this model.

black_box_component(port_spec=None, output_port_spec=None, technology=None, name=None)[source]

Create a black-box component using this model for testing.

Parameters:
  • port_spec (str | PortSpec | None) – Port specification used in the component. If None, look for "port_spec" in config.default_kwargs.

  • output_port_spec (str | PortSpec | None) – Port specification used for the output ports in the component. If None, use the same as port_spec.

  • technology (Technology | None) – Component technology. If None, the default technology is used.

  • name (str | None) – Component name. If None a default is used.

Returns:

Component with ports and model.

Return type:

Component

start(component, frequencies, **kwargs)[source]

Start computing the S matrix response from a component.

Parameters:
  • component (Component) – Component from which to compute the S matrix.

  • frequencies (Sequence[float]) – Sequence of frequencies at which to perform the computation.

  • **kwargs (Any) – Unused.

Returns:

Model result with attributes status and s_matrix.

Return type:

SMatrix