From babbbab94866bf291589f02d4859a22d1767202a Mon Sep 17 00:00:00 2001 From: Purva Thakre Date: Sun, 21 Jul 2024 10:28:10 -0500 Subject: [PATCH] docstring cleanup: vincent's comments --- mitiq/lre/inference/multivariate_richardson.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mitiq/lre/inference/multivariate_richardson.py b/mitiq/lre/inference/multivariate_richardson.py index e63d8bf32..ff7b85d8f 100644 --- a/mitiq/lre/inference/multivariate_richardson.py +++ b/mitiq/lre/inference/multivariate_richardson.py @@ -46,12 +46,12 @@ def _create_variable_combinations(num_layers: int, degree: int) -> List[Any]: variables = _get_variables(num_layers) variable_combinations = [] for i in range(degree, -1, -1): - # Generate combinations for the current degree - # Ranges from max degree, max degree -1, ...0. + # Generate combinations for the current degree. + # Ranges from max degree, max degree -1, ..., 0. combos = list(combinations_with_replacement(variables, i)) variable_combinations.append(combos) - # return a flattened list + # Return a flattened list. return list(chain(*variable_combinations)) @@ -71,7 +71,7 @@ def full_monomial_basis(num_layers: int, degree: int) -> List[str]: Returns: Monomial basis terms required for multivariate - extrapolation upto max degree + extrapolation up to max degree """ variable_combinations = _create_variable_combinations(num_layers, degree)