pub trait BatchGateOp: GateOp {
// Required method
fn apply_batch(
&self,
batch: &mut BatchStateVector,
target_qubits: &[QubitId],
) -> QuantRS2Result<()>;
// Provided method
fn has_batch_optimization(&self) -> bool { ... }
}
Expand description
Trait for batch-optimized gates
Required Methods§
Sourcefn apply_batch(
&self,
batch: &mut BatchStateVector,
target_qubits: &[QubitId],
) -> QuantRS2Result<()>
fn apply_batch( &self, batch: &mut BatchStateVector, target_qubits: &[QubitId], ) -> QuantRS2Result<()>
Apply this gate to a batch of states
Provided Methods§
Sourcefn has_batch_optimization(&self) -> bool
fn has_batch_optimization(&self) -> bool
Check if this gate has batch optimization
Implementors§
impl BatchGateOp for Hadamard
impl BatchGateOp for PauliX
Batch-optimized Pauli-X gate