Remove `EdResult` and streamline ED interface
Created by: femtobit
The existence of the EdResult
class was purely for reasons of backwards compatibility with the old C++ interface. The step to version 3.0 provides the ideal oportunity to remove it.
Directly returning the array of eigenvalues and, optionally, eigenvectors is in line with Numpy and Scipy and makes the NetKet interface more comfortable to use. (It is just a thin convenience wrapper anyways.)
Further, AbstractOperator.to_dense
returns numpy.ndarray
now, instead of numpy.matrix
, because the use of numpy.matrix
is no longer recommended according to the official documentation and can lead to surprising errors when used in code that expects to deal with ndarray
s. (For example: Using numpy.vdot(v[:, 0], op(v[:, 0]))
to compute an expectation value of the 0
th eigenvector works with ndarray
but not with matrix
due to differences in how slicing works.)