Skip to main content

quantrs2_sim/automatic_parallelization/
autoparallelengine_predicates.rs

1//! # AutoParallelEngine - predicates Methods
2//!
3//! This module contains method implementations for `AutoParallelEngine`.
4//!
5//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
6
7use super::autoparallelengine_type::AutoParallelEngine;
8use quantrs2_core::gate::GateOp;
9
10impl AutoParallelEngine {
11    /// Check if a gate is a rotation gate
12    pub(super) fn is_rotation_gate(gate: &dyn GateOp) -> bool {
13        let gate_str = format!("{gate:?}");
14        gate_str.contains("RX") || gate_str.contains("RY") || gate_str.contains("RZ")
15    }
16}