diff --git a/INSTALL.rst b/INSTALL.rst index 336dd2db0ddbe2fa067559f79884ba910f00fbbc..fb98e3ea122f57544e28383814d70cc09688100c 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -45,7 +45,7 @@ a NumPy-like Python package optimized for very small arrays, 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, * `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 that will in many cases speed up Kwant several times and reduce the memory footprint. (Kwant uses only the sequential, single core version diff --git a/kwant/qsymm.py b/kwant/qsymm.py index bb752e19314a18cbc7ec53e53eb163df5bf17f80..728dd2b738373eff85099e073e75b5fb5bb9c802 100644 --- a/kwant/qsymm.py +++ b/kwant/qsymm.py @@ -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 # which have already been set. - hopping_dict = defaultdict(dict) - onsites_dict = defaultdict(dict) + hopping_dict = defaultdict(lambda: 0) + onsites_dict = defaultdict(lambda: 0) # Iterate over all terms in the model. for key, hop_mat in model.items(): diff --git a/kwant/tests/test_qsymm.py b/kwant/tests/test_qsymm.py index d3f028a32ff4755b19f9c9a9305bd8945ddb38db..bf7e45d31286b30e5dcbd12247db96bbc279b6b0 100644 --- a/kwant/tests/test_qsymm.py +++ b/kwant/tests/test_qsymm.py @@ -481,7 +481,7 @@ def test_find_cons_law(): isinstance(symm, qsymm.ContinuousGroupGenerator) and symm.R is None] mham = builder_to_model(syst) assert all([symm.apply(mham).allclose(0, atol=1e-6) for symm in onsites]) - + def test_basis_ordering(): symm_class = ['AI', 'D', 'AIII', 'BDI'] diff --git a/setup.py b/setup.py index 5d4c30873c1a420bbf9221ec2c4f239991e3044d..f292fc7dd633cd465f95393ea43c4e1ddbce819e 100755 --- a/setup.py +++ b/setup.py @@ -588,7 +588,7 @@ def main(): 'plotting': 'matplotlib >= 1.5.1', 'continuum': 'sympy >= 0.7.6', # 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')])