It would be helpful to give more information in errors thrown in EmulationConfig.__init__ such that it is easier to identify which particular argument fails.
For example, I am getting the following error:
File "pulser/backend/config.py", line 276, in __init__
raise TypeError(
TypeError: All entries in 'observables' must be instances of Observable. Instead, got instance of type <class 'str'>.
This requires a bit of work to identify the problematic observable. Changing the test on line 275 to:
if not isinstance(obs, Observable):
raise TypeError(
"All entries in 'observables' must be instances of "
f"Observable. Instead, got instance of type {type(obs)}. "
f"for observable {obs}."
)
makes it much easier to identify the problem. Similar improvements can be done to other tests.
It would be helpful to give more information in errors thrown in
EmulationConfig.__init__such that it is easier to identify which particular argument fails.For example, I am getting the following error:
This requires a bit of work to identify the problematic observable. Changing the test on line 275 to:
makes it much easier to identify the problem. Similar improvements can be done to other tests.