thewalrus.fock_gradients.grad_beamsplitter

fock_gradients.grad_beamsplitter(T, theta, phi)

Calculates the gradients of the beamsplitter gate with respect to the transmissivity angle and reflection phase

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

  • theta (float) – transmissivity angle of the beamsplitter. The transmissivity is \(t=\cos(\theta)\)

  • phi (float) – reflection phase of the beamsplitter

Returns

The gradient of the beamsplitter gate with respect to theta and phi

Return type

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