Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ dependencies = [
"scipy",
"numba",
"pytest",
"pytest-level"
"pytest-level",
"pytest-cov"
]
requires-python = ">=3.12"
authors = [
Expand Down
6 changes: 4 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
[tool:pytest]
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
markers =
order: enforce execution order of tests
addopts =
--verbose
--level=1
--cov=mesohops
--cov-report=term-missing
--cov-report=html
--cov-report=xml
--cov-fail-under=70

1 change: 0 additions & 1 deletion src/mesohops/basis/hops_aux.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class AuxiliaryVector(Mapping):
'_index', # Current index
'__id_string', # Unique identifier string
'__mode_digits', # Number of digits per mode
'__kmax', # Maximum hierarchy depth

# --- Cached values ---
'_sum', # Cached sum of vector elements
Expand Down
2 changes: 1 addition & 1 deletion src/mesohops/basis/hops_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def get_Z2_noise_sparse(self, z_step):
if self.off_diagonal_couplings:
# Get the noise associated with system-bath projection operators that
# couple states in the current basis to a different state.
noise_t = (np.conj(z_step[0]) - 2j * np.real(z_step[1]))[
noise_t = (np.conj(z_step[0]) - 1j * z_step[1])[
self.mode.list_rel_ind_off_diag_L2]
# Get the noise memory drift associated with system-bath projection
# operators that couple states in the current basis to a different state.
Expand Down
9 changes: 9 additions & 0 deletions src/mesohops/basis/hops_fluxfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ def construct_filter_markov_up(self):
filtered out) while False indicates otherwise
(positioning is (mode, aux)).
"""
if len(self.mode.list_absindex_mode) == 0:
return True

M2_mark_filtered_modes = np.array(
[
np.array([param[m] for m in self.mode.list_absindex_mode])
Expand Down Expand Up @@ -389,6 +392,9 @@ def construct_filter_triangular_up(self):
filtered out) while False indicates otherwise
(positioning is (mode, aux)).
"""
if len(self.mode.list_absindex_mode) == 0:
return True

M2_tri_filtered_modes = np.array(
[
np.array([param[0][m] for m in self.mode.list_absindex_mode])
Expand Down Expand Up @@ -442,6 +448,9 @@ def construct_filter_longedge_up(self):
filtered out) while False indicates otherwise
(positioning is (mode, aux)).
"""
if len(self.mode.list_absindex_mode) == 0:
return True

M2_le_filtered_modes = np.array(
[
np.array([param[0][m] for m in self.mode.list_absindex_mode])
Expand Down
176 changes: 107 additions & 69 deletions src/mesohops/basis/hops_hierarchy.py

Large diffs are not rendered by default.

Loading