Skip to content

Commit 23ba5f4

Browse files
committed
Use ahash::RandomState
1 parent e0a2688 commit 23ba5f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/accelerate/src/sparse_pauli_op.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// copyright notice, and modified files need to carry a notice indicating
1111
// that they have been altered from the originals.
1212

13+
use ahash::RandomState;
1314
use pyo3::exceptions::{PyRuntimeError, PyValueError};
1415
use pyo3::prelude::*;
1516
use pyo3::types::PyTuple;
@@ -299,7 +300,11 @@ impl MatrixCompressedPaulis {
299300
/// explicitly stored operations, if there are duplicates. After the summation, any terms that
300301
/// have become zero are dropped.
301302
pub fn combine(&mut self) {
302-
let mut hash_table = IndexMap::<(u64, u64), Complex64>::with_capacity(self.coeffs.len());
303+
let mut hash_table =
304+
IndexMap::<(u64, u64), Complex64, RandomState>::with_capacity_and_hasher(
305+
self.coeffs.len(),
306+
RandomState::new(),
307+
);
303308
for (key, coeff) in self
304309
.x_like
305310
.drain(..)

0 commit comments

Comments
 (0)