Skip to content

Commit

Permalink
Include new error check
Browse files Browse the repository at this point in the history
  • Loading branch information
LeanderReascos authored Dec 16, 2024
1 parent af21b4a commit 7a51047
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sympt/solver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

"""
Title: Solver for sympt package
Date: 13 December 2024
Date: 16 December 2024
Authors:
- Giovanni Francesco Diotallevi
- Irving Leander Reascos Valencia
Expand Down Expand Up @@ -300,7 +300,9 @@ def __checks_and_prepare_solver(self, method, mask, max_order=2):

# Add the structure of the bosonic subspaces to the mask
mask.add_structure(self.__structure)

elif (method == 'ACE' or method == 'LA') and mask is None:
raise ValueError(f'The mask must be provided for the {method} method.')

# Compute the perturbative expression for the Hamiltonian
Hs_aux = get_perturbative_expression(
self.__H_old, self.__structure, self.subspaces)
Expand Down

0 comments on commit 7a51047

Please sign in to comment.