[BUG] measure
assumes all LinearCombination
objects provide a sparse matrix
#6264
Closed
1 task done
Labels
bug 🐛
Something isn't working
Expected behavior
I would expect
measure
to usesum_of_terms
,full_dot_product
, orstate_diagonalizing_gates
when the observable does not provide a sparse matrix. Choice between methods is dependent on performance heuristics. But at least one that does not error out.Actual behavior
It always chooses
csr_dot_products
when we don't need to differentiate theLinearCombination
. Even when the observable doesn't support one.Additional information
We should be following the same logic for both
LinearCombination
andSum
. Though this probably will probably also occur forSum
when the measurement process has overlapping wires and more than 7 wires.Source code
Tracebacks
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: