Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix process-based non-determinism in
SparsePauliOp.to_matrix
(#13439)…
… (#13440) * Fix process-based non-determinism in `SparsePauliOp.to_matrix` The simplification step of the summed Pauli terms in `SparsePauliOp.to_matrix` had introduced a non-determinism via hash-map iteration. In practice, the base hash seed was set per initialisation of the extension module, then stayed the same. This is hard to detect from within tests, but caused unexpected numerical behaviour on different invocations of the same script. * Use ahash::RandomState --------- Co-authored-by: Kevin Hartman <[email protected]> (cherry picked from commit 74b32c9) Co-authored-by: Jake Lishman <[email protected]>
- Loading branch information