Commands

Commands set some properties of the model or its elements. Some commands may only be specified once per model, others multiple times.

fsig

This element represents the signal frequency (fsig) used in a model. It is a unique element, which means only one can be added to any given model. This is done automatically with the name fsig. It has a single parameter f for the frequency of the signal.

The signal frequency must be set by the user to enable transfer functions and noise projections to be simulated.

Syntax
fsig(f)
Required

f: Signal frequency to use in a model [Hz]. If set to None then no signal frequencies will be modelled in the simulation.

lambda
Syntax
lambda(value)

Connect multiple components together in one quick command. In many models a collection of components just need to be connected together without having to specify each port exactly. This command accepts multiple components as arguments, each is connected to the next. Interally the link command is creating spaces and wires between components but giving them automatically generated names. Therefore, the link command is useful when you are not interested in what the spaces or wires are called, which is often the case in readout paths or signal feedback loops.

This command will try to connect components in the “obvious” way. For example, a collection of two-port optical components will be connected one after another, the second port of the first item connected to the first port of the second component, etc. Explicit ports can also be provided if exact connections are required. For example, at a beamsplitter, if you want to link through on transmission then use …, BS.p1, BS.p3, …. Using just BS here would result in using the first and second ports, a reflection. Links can contain a mix of optical and signal nodes. When going from optical to signal nodes they must be specified verbosely. For example, a DC readout component PD, you would need to specify …, PD, PD.DC, ….

Syntax
link(*args, verbose=false)
Required

*args: Separate arguments of either components or ports. A float value will create a space or wire with the provided length or time delay.

Optional

verbose: Print out what the link command is doing

See Also

space

modes

Select the HOM indices to include in the model.

See Selecting the modes to model for examples on using this method.

Syntax
modes(modes=none, maxtem=none, include=none, remove=none)
Optional

modes: Identifier for the mode indices to generate. This can be: - An iterable of mode indices, where each element in the iterable must unpack to two integer convertible values. - A string identifying the type of modes to include, must be one of “off”, “even”, “odd”, “x” or “y”.

maxtem: Optional maximum mode order.

include: A single mode index pair, or an iterable of mode indices, to include. Each element must unpack to two integer convertible values.

remove: A single mode index pair, or an iterable of mode indices, to remove. Each element must unpack to two integer convertible values.

Note: at least one of modes, maxtem, include and exclude must be specified.

phase_config

Coupling coefficient and Gouy phase scaling:

  • phase_level 3 == zero_k00=True, zero_tem00_gouy=True - phase_level 2 == zero_k00=False, zero_tem00_gouy=True - phase_level 1 == zero_k00=True, zero_tem00_gouy=False - phase_level 0 == zero_k00=False, zero_tem00_gouy=False See also Phase configuration settings This can be used to change the computation of light field phases in the Hermite-Gauss mode. In general, in the presence of higher order modes, the “macroscopic length” of a space is no longer an integer number of wavelengths for the TEM00 mode because of the Gouy phase. Furthermore, the coupling coefficients \(k_{nmnm}\) contribute to the phase when there is a mode mismatch. For correct analysis these effects have to be taken into account. On the other hand, these extra phase offsets make it very difficult to set a resonance condition or operating point intuitively. In most cases another phase offset can be added to all modes so that the phase of the TEM00 becomes zero. This method allows setting these phase offsets for the propagation through free space, for the coupling coefficients, or both. Regardless of the setting, the phases for all higher modes are changed accordingly such that the relative phases remain correct.

Syntax
phase_config(zero_k00=false, zero_tem00_gouy=true)
Optional

zero_k00: Scale phase for k0000 (TEM00 to TEM00) coupling coefficients to 0. Defaults to True.

zero_tem00_gouy: Ensure that all Gouy phases for TEM00 are 0. Defaults to True.

tem

Distributes power into the mode HGnm.

Syntax
tem(laser, n, m, factor, phase=0.0)
Required

laser: The laser to set mode power for.

n, m: Mode indices.

factor: Relative power factor, modes with equal factor will have equivalent power distributed to them.

Optional

phase: Phase offset for the field, in degrees.