tlquantum.tt_gates.O4LR

class tlquantum.tt_gates.O4LR(position, phases=None, dtype=torch.complex64, device=None)[source]

Left and right core of the two-qubit O4 phase gate.

Parameters:
phaseslist of floats, the four phases to be imparted to the quantum states
devicestring, device on which to run the computation.
Returns:
Two-qubit unitary with general phase rotations for O4.

Methods

forward()

Prepares the left or right qubit of the SO4 two-qubit rotation gate for forward contraction by calling the forward method and preparing the tt-factorized form of matrix representation.

reinitialize

forward()[source]

Prepares the left or right qubit of the SO4 two-qubit rotation gate for forward contraction by calling the forward method and preparing the tt-factorized form of matrix representation. Update is based on theta (which is typically updated every epoch through backprop via Pytorch Autograd).

Returns:
Gate tensor for general forward pass.