Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RWC_alam() returns largest root, not the root that minimized the expectation value #6

Open
agryman opened this issue May 17, 2022 · 0 comments

Comments

@agryman
Copy link
Owner

agryman commented May 17, 2022

The function RWC_alam(B, c1, c2, v) is supposed to return an optimal pair (a, lambda) that minimizes the expectation value of the Hamiltonian defined by (B,c1,c2) on the ground state. It does this by finding the zeroes of the expectation value regarded as a function of a.

However, the code actually returns the maximum value of a0 where a0 is a zero of the derivative of the expectation value.

aa0:=max(fsolve(RWC2(A,muf(A))=0,A))

It SHOULD evaluate the expectation value at each zero and then pick the zero that minimizes the expectation value.

In practice, this probably doesn't make much difference since there is probably always just one zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant