You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for providing this code. To get it to compile I had to make some changes to the cmake file and I had to switch to the master branch on the pybind11 module, but I managed to get it compiled.
which, if I understand correctly, corresponds to finding the minimum energy of a spin glass -1 s1 - 0.01 s2 - 0.001 s3 + 1.5 s1*s2 + s1*s2*s3 where si can take values of +1 or -1. The resulting resultDict is
I struggle to understand this output. Following the linear energies (resultDict['energy_distr'][1]) it is apparent that s1=1, s2=1 and s3=-1 to get -0.1-0.01+0.001=-0.109. This would also agree with resultDict['state'] if we assume that it gives a list of spins that are -1 in the output (here 2, i.e. the third spin). For the quadratic term resultDict['energy_distr'][2]=-1.5 we need s1*s2 = -1 to get the contribution of 1.5.s1*s2=-1.5, which violates what we found for the linear term, for the cubic term resultDict['energy_distr'][3]=-1 we need s1*s2*s3 = -1 which agrees with the linear term if we take s1 = s2 = -s3 = 1.
Running some of these smaller experiments it seems like the quadratic terms in the spin glass are multiplied by -1 in the optimization so that for example for the above example we optimized -1 s1 - 0.01 s2 - 0.001 s3 - 1.5 s1*s2 + s1*s2*s3 and not the original input.
Am I misunderstanding the way to use this library or is this a bug?
The text was updated successfully, but these errors were encountered:
Hey, thanks for providing this code. To get it to compile I had to make some changes to the cmake file and I had to switch to the master branch on the pybind11 module, but I managed to get it compiled.
I then take the following file
which, if I understand correctly, corresponds to finding the minimum energy of a spin glass -1 s1 - 0.01 s2 - 0.001 s3 + 1.5 s1*s2 + s1*s2*s3 where si can take values of +1 or -1. The resulting resultDict is
I struggle to understand this output. Following the linear energies (
resultDict['energy_distr'][1]
) it is apparent that s1=1, s2=1 and s3=-1 to get -0.1-0.01+0.001=-0.109. This would also agree withresultDict['state']
if we assume that it gives a list of spins that are -1 in the output (here 2, i.e. the third spin). For the quadratic termresultDict['energy_distr'][2]=-1.5
we need s1*s2 = -1 to get the contribution of 1.5.s1*s2=-1.5, which violates what we found for the linear term, for the cubic termresultDict['energy_distr'][3]=-1
we need s1*s2*s3 = -1 which agrees with the linear term if we take s1 = s2 = -s3 = 1.Running some of these smaller experiments it seems like the quadratic terms in the spin glass are multiplied by -1 in the optimization so that for example for the above example we optimized -1 s1 - 0.01 s2 - 0.001 s3 - 1.5 s1*s2 + s1*s2*s3 and not the original input.
Am I misunderstanding the way to use this library or is this a bug?
The text was updated successfully, but these errors were encountered: