Skip to content

Commit a1d1820

Browse files
authored
Merge pull request #4 from MesoscienceLab/update_1pt6pt1
MesoHOPS 1.6.1
2 parents 5e44fd9 + f4cc5fe commit a1d1820

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3816
-1192
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ dependencies = [
66
"scipy",
77
"numba",
88
"pytest",
9-
"pytest-level"
9+
"pytest-level",
10+
"pytest-cov"
1011
]
1112
requires-python = ">=3.12"
1213
authors = [

pytest.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
[tool:pytest]
1+
[pytest]
22
testpaths = tests
33
python_files = test_*.py
44
python_classes = Test*
55
python_functions = test_*
6+
markers =
7+
order: enforce execution order of tests
68
addopts =
79
--verbose
10+
--level=1
811
--cov=mesohops
912
--cov-report=term-missing
1013
--cov-report=html
1114
--cov-report=xml
1215
--cov-fail-under=70
13-

src/mesohops/basis/hops_aux.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class AuxiliaryVector(Mapping):
3131
'_index', # Current index
3232
'__id_string', # Unique identifier string
3333
'__mode_digits', # Number of digits per mode
34-
'__kmax', # Maximum hierarchy depth
3534

3635
# --- Cached values ---
3736
'_sum', # Cached sum of vector elements

src/mesohops/basis/hops_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ def get_Z2_noise_sparse(self, z_step):
935935
if self.off_diagonal_couplings:
936936
# Get the noise associated with system-bath projection operators that
937937
# couple states in the current basis to a different state.
938-
noise_t = (np.conj(z_step[0]) - 2j * np.real(z_step[1]))[
938+
noise_t = (np.conj(z_step[0]) - 1j * z_step[1])[
939939
self.mode.list_rel_ind_off_diag_L2]
940940
# Get the noise memory drift associated with system-bath projection
941941
# operators that couple states in the current basis to a different state.

src/mesohops/basis/hops_fluxfilters.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ def construct_filter_markov_up(self):
332332
filtered out) while False indicates otherwise
333333
(positioning is (mode, aux)).
334334
"""
335+
if len(self.mode.list_absindex_mode) == 0:
336+
return True
337+
335338
M2_mark_filtered_modes = np.array(
336339
[
337340
np.array([param[m] for m in self.mode.list_absindex_mode])
@@ -389,6 +392,9 @@ def construct_filter_triangular_up(self):
389392
filtered out) while False indicates otherwise
390393
(positioning is (mode, aux)).
391394
"""
395+
if len(self.mode.list_absindex_mode) == 0:
396+
return True
397+
392398
M2_tri_filtered_modes = np.array(
393399
[
394400
np.array([param[0][m] for m in self.mode.list_absindex_mode])
@@ -442,6 +448,9 @@ def construct_filter_longedge_up(self):
442448
filtered out) while False indicates otherwise
443449
(positioning is (mode, aux)).
444450
"""
451+
if len(self.mode.list_absindex_mode) == 0:
452+
return True
453+
445454
M2_le_filtered_modes = np.array(
446455
[
447456
np.array([param[0][m] for m in self.mode.list_absindex_mode])

src/mesohops/basis/hops_hierarchy.py

Lines changed: 107 additions & 69 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)