grove
grove copied to clipboard
Inconsistent energy in maxcut_qaoa depending on samples argument
The energy output during the optimisation in maxcut_qaoa.get_angles()
(the line E => ...
) approaches very different values for samples=None
or setting a number of samples (e.g. samples=1000
). The displayed value with samples=None
doesn't seem to be the true expectation value of the cost Hamiltonian, whereas it matches the expected cost Hamiltonian when specifying a number of samples .