Utils

Some utils for the qosst_sim module.

qosst_sim.utils.kron(i: int, j: int) int

Kronecker’s delta on int

Parameters:
  • i (int) – first int,

  • j (int) – second int.

Returns:

1 if i=j and 0 otherwise.

Return type:

int

qosst_sim.utils.g(x: float) float

Function of the Von Neumann entropy of a thermal state

Parameters:

x (float) – input.

Returns:

output of the g function.

Return type:

float

qosst_sim.utils.delta(v: float, w: float, z: float) float

Coeficent needed to compute the sympleptic values of the 2-modes covariance matrix

Parameters:
  • V (float) – coefficient of the first diagonal block of the covariance matrix.

  • W (float) – coefficient of the second diagonal block of the covariance matrix.

  • Z (float) – coefficient of the antidiagonal blocks of the covariance matrix.

Returns:

delta coefficient needed to compute the symplectic values.

Return type:

float

qosst_sim.utils.gamma(v: float, w: float, z: float) float

Coeficent needed to compute the sympleptic values of the 2-modes covariance matrix

Parameters:
  • V (float) – coefficient of the first diagonal block of the covariance matrix.

  • W (float) – coefficient of the second diagonal block of the covariance matrix.

  • Z (float) – coefficient of the antidiagonal blocks of the covariance matrix.

Returns:

gamma coefficient needed to compute the symplectic values.

Return type:

float

qosst_sim.utils.transmission(distance: float) float

Transmission as a function of the distance in usual optical fiber.

This assumes an attenuation coefficient of 0.2 dB/km.

Parameters:

distance (float) – distance in km.

Returns:

associated ttenuation.

Return type:

float