thewalrus.fock_gradients.squeezing

fock_gradients.squeezing(r, theta, cutoff, dtype=<class 'numpy.complex128'>)

Calculates the matrix elements of the squeezing gate using a recurrence relation.

Parameters
  • r (float) – squeezing magnitude

  • theta (float) – squeezing angle

  • cutoff (int) – Fock ladder cutoff

  • dtype (data type) – Specifies the data type used for the calculation

Returns

matrix representing the squeezing gate.

Return type

array[complex]