Skip to content

Commit

Permalink
ignore sample matrix not square matrix from coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Jul 23, 2024
1 parent 7d8868b commit c92a38a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mitiq/lre/inference/multivariate_richardson.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def sample_matrix(
num_layers = len(scale_factor_vectors[0])

monomial_terms = full_monomial_basis(num_layers, degree)
if len(monomial_terms) != len(scale_factor_vectors):
if len(monomial_terms) != len(scale_factor_vectors): # pragma: no cover
# Temporarily ignore this block from the coverage report because
# a unit test for this is not that obvious.
raise ValueError("Sample matrix will not be a square matrix.")
sample_matrix = np.zeros((len(monomial_terms), len(monomial_terms)))

Expand Down

0 comments on commit c92a38a

Please sign in to comment.