to_unitary#

method

static QuantumSim.to_unitary(s_params)[source]#

This method converts s-parameters into a unitary transform by adding vacuum ports.

The original ports maintain their index while new vacuum ports will always be the last n_ports.

Parameters

s_params (ArrayLike) – s-parameters in the shape of (n_freq, n_ports, n_ports).

Returns

unitary – The unitary s-parameters of the shape (n_freq, 2*n_ports, 2*n_ports).

Return type

Array