Open
Conversation
5b8e5e9 to
ca0b8c9
Compare
|
|
||
| def diffdm_adc2_2p(mp, amplitude, intermediates): | ||
| dm = diffdm_adc1_2p(mp, amplitude, intermediates) # Get ADC(1) result | ||
| def diffdm_isr1_2p(mp, amplitude, intermediates): |
Contributor
There was a problem hiding this comment.
Should this function call isr1s to avoid the repetition for the first-order singles-singles contribution?
Comment on lines
+80
to
+82
| def _default_block_orders(cls, | ||
| method: Method | ||
| ) -> dict[str, int]: |
Contributor
There was a problem hiding this comment.
Suggested change
| def _default_block_orders(cls, | |
| method: Method | |
| ) -> dict[str, int]: | |
| def _default_block_orders(cls, method: Method) -> dict[str, int]: |
Comment on lines
+110
to
+111
| def _base_method(self) -> str: | ||
| return self._method_base_name + self.level.to_str() |
Contributor
There was a problem hiding this comment.
Suggested change
| def _base_method(self) -> str: | |
| return self._method_base_name + self.level.to_str() | |
| def _base_method(self) -> str: | |
| assert self._method_base_name is not None | |
| return self._method_base_name + self.level.to_str() |
Comment on lines
+38
to
+41
| # special levels | ||
| TWO_X = "2x" | ||
| ONE_S = "1s" | ||
| THREE_D = "3d" |
Contributor
There was a problem hiding this comment.
I think it would be good to add a comment for each special level that explains what the level means
Comment on lines
+83
to
+84
| if split and split[0] not in ["cvs"]: | ||
| raise ValueError(f"{split[0]} is not a valid method prefix") |
Contributor
There was a problem hiding this comment.
I think we also need to verify that split is at most of length 1 with cvs being the only valid entry, right?
Suggested change
| if split and split[0] not in ["cvs"]: | |
| raise ValueError(f"{split[0]} is not a valid method prefix") | |
| valid_prefixes: tuple[str, ...] = ("cvs",) | |
| if len(split) > len(valid_prefixes): | |
| raise ValueError(f"Invalid number of method prefixes provided in {split}.") | |
| if any(pref not in valid_prefixes for pref in split): | |
| raise ValueError(f"Invalid method prefix in {split}.") |
Comment on lines
+91
to
+93
| if isinstance(level.value, int): | ||
| if level.value <= self.max_level: | ||
| return |
Contributor
There was a problem hiding this comment.
Suggested change
| if isinstance(level.value, int): | |
| if level.value <= self.max_level: | |
| return | |
| if isinstance(level.value, int) and level.value <= self.max_level: | |
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor
AdcMethod.py:AdcMethod) and property calculation (IsrMethod)Include ISR(1)-d:
densities:
check_doubles_amplitudesfunction to assess whether doubles excitation are present (this function throws aValueError-> try except layout)s2s_tdm_adc2is now calleds2s_tdm_isr2)Modified transition moments and B matrix:
block_ordersneed to be explicitly set. Update_default_block_orders?no test yet for ISR(1)-d