tlquantum.tt_operators.unary_hamiltonian

tlquantum.tt_operators.unary_hamiltonian(op, nqubits, qubits, weights)[source]

Generates tt-tensor unitary of one single-qubit operator per qubit.

Parameters:
optt-tensor, single-qubit operator
nqubitsint, number of qubits (vertices) to encode in MaxCut problem
qubitsList/tensor of ints, qubit indices
weightsList/tensor of real floats, graph weights
Returns:
Unitary of one single-qubit operator per qubit in tt-tensor format