thewalrus.fock_gradients.grad_squeezing

fock_gradients.grad_squeezing(T, r, phi)

Calculates the gradients of the squeezing gate with respect to the squeezing magnitude and angle

Parameters
  • T (array[complex]) – array representing the gate

  • r (float) – squeezing magnitude

  • phi (float) – squeezing angle

Returns

The gradient of the squeezing gate with respect to the r and phi

Return type

tuple[array[complex], array[complex]]