Models#

Model definitions for qpdk.

qpdk.models.bend_circular(*args, **kwargs)[source]#

S-parameter model for a circular bend, wrapped to to straight().

Parameters:
  • args (Array | ndarray | bool | number | bool | int | float | complex | MediaCallable)

  • kwargs (Unpack[StraightModelKwargs])

Return type:

dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]]

qpdk.models.bend_euler(*args, **kwargs)[source]#

S-parameter model for an Euler bend, wrapped to to straight().

Parameters:
  • args (Array | ndarray | bool | number | bool | int | float | complex | MediaCallable)

  • kwargs (Unpack[StraightModelKwargs])

Return type:

dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]]

qpdk.models.bend_s(*args, **kwargs)[source]#

S-parameter model for an S-bend, wrapped to to straight().

Parameters:
  • args (Array | ndarray | bool | number | bool | int | float | complex | MediaCallable)

  • kwargs (Unpack[StraightModelKwargs])

Return type:

dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.singlemode.val_port, json_schema_input_type=~typing.Any)], int]] | dict[tuple[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)]], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)]] | tuple[Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array | ndarray, signedinteger, 1, PlainValidator(func=~sax.saxtypes.core.val_int_array_1d, json_schema_input_type=~typing.Any)], Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]] | tuple[Annotated[Array, complexfloating, PlainValidator(func=~sax.saxtypes.core.val_complex_array, json_schema_input_type=~typing.Any)], dict[Annotated[str, PlainValidator(func=~sax.saxtypes.multimode.val_port_mode, json_schema_input_type=~typing.Any)], int]]

qpdk.models.capacitor(f=Array([5.e+09], dtype=float64), capacitance=1e-15, z0=50)[source]#

Ideal capacitor () Sax model.

See [MP12] for details.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • capacitance (float) – Capacitance in Farads

  • z0 (int | float | complex) – Reference impedance in Ω. This may be retrieved from a scikit-rf Media object using z0 = media.z0.

Returns:

S-parameters dictionary

Return type:

sax.SType

qpdk.models.coupler_straight(f=Array([5.e+09], dtype=float64), length=20.0, gap=0.27, media=functools.partial(<class 'skrf.media.cpw.CPW'>, w=9.999999999999999e-06, s=6e-06, h=0.0005, t=1.9999999999999996e-07, ep_r=11.45, rho=1e-100, tand=0, has_metal_backside=False))[source]#

S-parameter model for two coupled coplanar waveguides, coupler_straight().

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • length (int | float) – Physical length of coupling section in µm

  • gap (int | float) – Gap between the coupled waveguides in µm

  • media (MediaCallable) – Function returning a scikit-rf Media object after called with frequency=f. If None, uses default CPW media.

Returns:

S-parameters dictionary

Return type:

sax.SType

o2──────▲───────o3
        │gap
o1──────▼───────o4
qpdk.models.gamma_0_load(f=Array([5.e+09], dtype=float64), gamma_0=0, n_ports=1)[source]#

Connection with given reflection coefficient.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • gamma_0 (int | float | complex) – Reflection coefficient Γ₀ of connection

  • n_ports (int) – Number of ports in component. The diagonal ports of the matrix are set to Γ₀ and the off-diagonal ports to 0.

Returns:

S-parameters dictionary where \(S = \Gamma_0I_\text{n\_ports}\)

Return type:

sax.SType

qpdk.models.inductor(f=Array([5.e+09], dtype=float64), inductance=1e-12, z0=50)[source]#

Ideal inductor (󱡌) Sax model.

See [MP12] for details.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • inductance (float) – Inductance in Henries

  • z0 (int | float | complex) – Reference impedance in Ω. This may be retrieved from a scikit-rf Media object using z0 = media.z0.

Returns:

S-parameters dictionary

Return type:

sax.SType

qpdk.models.open(f=Array([5.e+09], dtype=float64), n_ports=1)[source]#

Electrical open connection Sax model.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • n_ports (int) – Number of ports to set as opened

Returns:

S-parameters dictionary where \(S = I_\text{n\_ports}\)

Return type:

sax.SType

qpdk.models.quarter_wave_resonator_coupled_to_probeline(media, f=None, coupling_capacitance=1.5e-14, length=4000)[source]#

Model for a quarter-wave coplanar waveguide resonator coupled to a probeline.

Parameters:
  • media (Callable[[Frequency], Media]) – skrf media object defining the CPW (or other) properties.

  • f (Number | Sequence[Number] | ndarray | Any | None) – Frequency in Hz at which to evaluate the S-parameters.

  • coupling_capacitance (float) – Coupling capacitance in Farads.

  • length (float) – Length of the resonator in μm.

Returns:

S-parameters dictionary

Return type:

sax.SDict

qpdk.models.resonator_frequency(length, media, is_quarter_wave=True)[source]#

Calculate the resonance frequency of a quarter-wave resonator.

\[f &= \frac{v_p}{4L} \text{ (quarter-wave resonator)} \\ f &= \frac{v_p}{2L} \text{ (half-wave resonator)}\]

There is some variation according to the frequency range specified for media due to how \(v_p\) is calculated in skrf. The phase velocity is given by \(v_p = i \cdot \omega / \gamma\), where \(\gamma\) is the complex propagation constant and \(\omega\) is the angular frequency.

See [MP12, Sim01] for details.

Parameters:
  • length (float) – Length of the resonator in μm.

  • media (Media) – skrf media object defining the CPW (or other) properties.

  • is_quarter_wave (bool) – If True, calculates for a quarter-wave resonator; if False, for a half-wave resonator. default is True.

Returns:

Resonance frequency in Hz.

Return type:

float

qpdk.models.short(f=Array([5.e+09], dtype=float64), n_ports=1)[source]#

Electrical short connections Sax model.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • n_ports (int) – Number of ports to set as shorted

Returns:

S-parameters dictionary where \(S = -I_\text{n\_ports}\)

Return type:

sax.SType

qpdk.models.single_admittance_element(y=0.02)[source]#

Single admittance element Sax model.

See [MP12] for details.

Parameters:

y (int | float | complex) – Admittance

Returns:

S-parameters dictionary

Return type:

sax.SType

qpdk.models.single_impedance_element(z=50, z0=50)[source]#

Single impedance element Sax model.

See [MP12] for details.

Parameters:
  • z (int | float | complex) – Impedance in Ω

  • z0 (int | float | complex) – Reference impedance in Ω. This may be retrieved from a scikit-rf Media object using z0 = media.z0.

Returns:

S-parameters dictionary

Return type:

sax.SType

qpdk.models.straight(f=Array([5.e+09], dtype=float64), length=1000, media=functools.partial(<class 'skrf.media.cpw.CPW'>, w=9.999999999999999e-06, s=6e-06, h=0.0005, t=1.9999999999999996e-07, ep_r=11.45, rho=1e-100, tand=0, has_metal_backside=False))[source]#

S-parameter model for a straight waveguide.

See scikit-rf for details on analytical formulæ.

Parameters:
  • f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

  • length (int | float) – Physical length in µm

  • media (MediaCallable) – Function returning a scikit-rf Media object after called with frequency=f. If None, uses default CPW media.

Returns:

S-parameters dictionary

Return type:

sax.SType

qpdk.models.tee(f=Array([5.e+09], dtype=float64))[source]#

Ideal 3-port power divider/combiner (T-junction).

Parameters:

f (Array | ndarray | bool | number | bool | int | float | complex) – Array of frequency points in Hz

Returns:

S-parameters dictionary

Return type:

sax.SType

References#

[MP12] (1,2,3,4,5)

David M. Pozar. Microwave Engineering. John Wiley & Sons, Inc., 4 edition, 2012. ISBN 978-0-470-63155-3.

[Sim01]

Rainee Simons. Coplanar Waveguide Circuits, Components, and Systems. Number v. 165 in Wiley Series in Microwave and Optical Engineering. Wiley Interscience, New York, 2001. ISBN 978-0-471-22475-4 978-0-471-46393-1. doi:10.1002/0471224758.