tequila.circuit.gates.GeneralizedRotation

tequila.circuit.gates.GeneralizedRotation(angle: Union[List[collections.abc.Hashable], List[numbers.Real]], generator: tequila.hamiltonian.qubit_hamiltonian.QubitHamiltonian, control: Union[list, int] = None, shift: float = 0.5, steps: int = 1) → tequila.circuit.circuit.QCircuit[source]

Convenience rotation gate.

Notes

A gates which is shift-rule differentiable
  • its generator only has two distinguishable eigenvalues

  • it is then differentiable by the shift rule

  • shift needs to be given upon initialization (otherwise its default is 1/2)

  • the generator will not be verified to fullfill the properties

Compiling will be done in analogy to a trotterized gate with steps=1 as default

The gate will act in the same way as rotations and exppauli gates

\[U_{G}(\text{angle}) = e^{-i\frac{\text{angle}}{2} G}\]
Parameters
  • angle

  • generator

  • control

  • shift

  • steps

Returns

Return type

The gate wrapped in a circuit