QOKit
QOKit copied to clipboard
Objective function of a general QUBO problem
In you example "Simulation of QAOA applied to a general problem", you gave an example specified by 'terms' below:
N = 4 np.random.seed(10) terms = [(np.random.normal(), spin_pair) for spin_pair in combinations(range(N), r=2)]
I wonder how to get the objective function in order to optimize this general Hamiltonian. Many thanks.