quantrs2_sim/automatic_parallelization/autoparallelengine_gates_share_qubits_group.rs
1//! # AutoParallelEngine - gates_share_qubits_group Methods
2//!
3//! This module contains method implementations for `AutoParallelEngine`.
4//!
5//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
6
7use quantrs2_core::qubit::QubitId;
8use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque};
9
10use super::autoparallelengine_type::AutoParallelEngine;
11
12impl AutoParallelEngine {
13 /// Check if gates share qubits
14 pub(super) fn gates_share_qubits(
15 qubits1: &HashSet<QubitId>,
16 qubits2: &HashSet<QubitId>,
17 ) -> bool {
18 !qubits1.is_disjoint(qubits2)
19 }
20}