tlquantum.tt_gates.BinaryGatesUnitary

class tlquantum.tt_gates.BinaryGatesUnitary(nqubits, ncontraq, q2gate, parity, contrsets=None, random_initialization=True)[source]

A Unitary sub-class that generates a layer of a single two-qubit gates accross all qubits in a TTCircuit.

Parameters:
nqubitsint, number of qubits
ncontraqint, number of qubits to do pre-contraction over

(simplifying contraciton path/using fewer indices)

q2gatetuple of two gate instances, one for each qubit in gate.
contrsetslist of lists of ints, the indices of qubit cores to

merge in the pre-contraction path.

devicestring, device on which to run the computation.
Returns:
BinaryGatesUnitary