Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hashbrown::HashSet instead of ahash::HashSet (#12951)
In the `target_transpiler/mod.rs` module we were using ahash::HashSet for a hash set implementation, but the rest of Qiskit has standardized on using hashbrown for the `HashSet` and `HashMap` types. Hashbrown uses ahash for it's hashing algorithm but it also provides other advantages. To ensure that hash sets are compatible across the library we should be using the same library for everything. To support this goal, this commit also adds a clippy rule that raises a warning if the std library hashmap or hashset is used, or the versions from ahash. This means with our current dependency set the only allowed hashset types are `hashbrown::HashMap`/`HashSet` and `indexmap::IndexMap`/`IndexSet` (for where we need to maintain insertion order). Ideally we'd have a rule that forces the use of ahash with `IndexMap` and `IndexSet` (see #12935) but I don't think clippy exposes an option to enable something like that.
- Loading branch information