Commit 679f7dc4 authored by Pablo Piskunow's avatar Pablo Piskunow Committed by Joseph Weston
Browse files

remove use of 'vector_factory' when calculating spectral bounds

Instead, use a random phase vector. Now 'vector_factory' is used
exclusively to generate the vectors used in the KPM calculation
parent a88fda3a
......@@ -173,7 +173,7 @@ class SpectralDensity:
self._vector_factory = vector_factory or \
(lambda n: np.exp(2j * np.pi * rng.random_sample(n)))
# store this vector for reproducibility
self._v0 = self._vector_factory(hamiltonian.shape[0])
self._v0 = np.exp(2j * np.pi * rng.random_sample(hamiltonian.shape[0]))
self._rand_vect_list = []
# Hamiltonian rescaled as in Eq. (24)
self.hamiltonian, (self._a, self._b) = _rescale(hamiltonian,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment