def METHOD_NAME(theta, psi0):
    w = variational_wfn(theta, psi0)
    wl = tc.backend.conj(w)
    wr = tc.backend.stop_gradient(w)
    wl = tc.backend.reshape(wl, [1, -1])
    wr = tc.backend.reshape(wr, [-1, 1])
    e = wl @ h @ wr  # <\partial psi0|H| psi0>
    return tc.backend.real(e)[0, 0]