Skip to content

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

Description

@agryman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions