tlquantum.tt_operators.binary_hamiltonian

tlquantum.tt_operators.binary_hamiltonian(op, nqubits, qubits1, qubits2, weights)[source]

Generates tt-tensor classical Ising model Hamiltonian (two-qubit interaction terms in a single basis). Hamiltonian of the form:

H = sum_i omega_i sigma_ind1(i) sigma_ind2(i)

where omega_i are the Hamiltonian weights, sigma is the operator specified by op, and ind1, ind2 are the qubit numbers specified of index i.

spins and weight values.

Parameters:
optt-tensor, single-qubit operator to encode MaxCut graph
nqubitsint, number of qubits (vertices) to encode in MaxCut problem
qubits1List/tensor of ints, qubit indices
qubits2List/tensor of ints, qubit indices
weightsList/tensor of real floats, graph weights
Returns:
Hamiltonian encoding specified classical Ising model graph.