Skip to content
Snippets Groups Projects
Commit 2bb9ff6d authored by Joseph Weston's avatar Joseph Weston
Browse files

Merge branch 'fixup/qsymm' into 'stable'

fix a bug in kwant.qsymm

See merge request kwant/kwant!325
parents e2227fbb 8a4aa2e5
No related branches found
No related tags found
No related merge requests found
Pipeline #22987 passed
...@@ -45,7 +45,7 @@ a NumPy-like Python package optimized for very small arrays, ...@@ -45,7 +45,7 @@ a NumPy-like Python package optimized for very small arrays,
The following software is highly recommended though not strictly required: The following software is highly recommended though not strictly required:
* `matplotlib <http://matplotlib.org/>`_ 1.5.1 or newer, for the module `kwant.plotter` and the tutorial, * `matplotlib <http://matplotlib.org/>`_ 1.5.1 or newer, for the module `kwant.plotter` and the tutorial,
* `SymPy <http://sympy.org/>`_ 0.7.6 or newer, for the subpackage `kwant.continuum`. * `SymPy <http://sympy.org/>`_ 0.7.6 or newer, for the subpackage `kwant.continuum`.
* `Qsymm <https://pypi.org/project/qsymm/>`_ 1.1.0 or newer, for the subpackage `kwant.qsymm`. * `Qsymm <https://pypi.org/project/qsymm/>`_ 1.2.4 or newer, for the subpackage `kwant.qsymm`.
* `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library * `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library
that will in many cases speed up Kwant several times and reduce the memory that will in many cases speed up Kwant several times and reduce the memory
footprint. (Kwant uses only the sequential, single core version footprint. (Kwant uses only the sequential, single core version
......
...@@ -323,8 +323,8 @@ def model_to_builder(model, norbs, lat_vecs, atom_coords, *, coeffs=None): ...@@ -323,8 +323,8 @@ def model_to_builder(model, norbs, lat_vecs, atom_coords, *, coeffs=None):
# Keep track of the hoppings and onsites by storing those # Keep track of the hoppings and onsites by storing those
# which have already been set. # which have already been set.
hopping_dict = defaultdict(dict) hopping_dict = defaultdict(lambda: 0)
onsites_dict = defaultdict(dict) onsites_dict = defaultdict(lambda: 0)
# Iterate over all terms in the model. # Iterate over all terms in the model.
for key, hop_mat in model.items(): for key, hop_mat in model.items():
......
...@@ -481,7 +481,7 @@ def test_find_cons_law(): ...@@ -481,7 +481,7 @@ def test_find_cons_law():
isinstance(symm, qsymm.ContinuousGroupGenerator) and symm.R is None] isinstance(symm, qsymm.ContinuousGroupGenerator) and symm.R is None]
mham = builder_to_model(syst) mham = builder_to_model(syst)
assert all([symm.apply(mham).allclose(0, atol=1e-6) for symm in onsites]) assert all([symm.apply(mham).allclose(0, atol=1e-6) for symm in onsites])
def test_basis_ordering(): def test_basis_ordering():
symm_class = ['AI', 'D', 'AIII', 'BDI'] symm_class = ['AI', 'D', 'AIII', 'BDI']
......
...@@ -588,7 +588,7 @@ def main(): ...@@ -588,7 +588,7 @@ def main():
'plotting': 'matplotlib >= 1.5.1', 'plotting': 'matplotlib >= 1.5.1',
'continuum': 'sympy >= 0.7.6', 'continuum': 'sympy >= 0.7.6',
# qsymm is only packaged on PyPI # qsymm is only packaged on PyPI
'qsymm': 'qsymm >= 1.1.2', 'qsymm': 'qsymm >= 1.2.4',
}, },
classifiers=[c.strip() for c in classifiers.split('\n')]) classifiers=[c.strip() for c in classifiers.split('\n')])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment