You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SampleMP.process_samples does not raise an error when the observable is multiplied by a complex coefficient (#8271)
**Context:** If an observable is multiplied by a complex coefficient,
the `indices` array created within `process_raw_samples` as `indices =
samples @ powers_of_two` might be created with complex values. This
creates issues when we try to use them as actual indices.
**Description of the Change:** We move the conversion to the requested
`dtype` selected by the user just before returning, so we avoid any
possible implicit casting unintentionally performed under the hood in
the execution workflow.
**Benefits:** `process_samples` works with complex values when the
`dtype` argument is specified
**Possible Drawbacks:** None that I can think of.
**Related GitHub Issues:** None
0 commit comments