pub enum GateType {
}Expand description
Quantum Gate Types
This enum represents the set of supported quantum gates. It includes standard single-qubit gates (H, X, Y, Z), two-qubit gates (CX), and parameterized rotation gates (RX, RY, RZ).
§Examples
use q_rust::ir::GateType;
let h_gate = GateType::H;
let rx_gate = GateType::RX(1.57);Variants§
H
Hadamard gate
X
Pauli-X gate (NOT)
Y
Pauli-Y gate
Z
Pauli-Z gate
CX
Controlled-NOT gate
RX(f64)
Rotation around X-axis with angle theta
RY(f64)
Rotation around Y-axis with angle theta
RZ(f64)
Rotation around Z-axis with angle theta
U(f64, f64, f64)
General unitary gate U(theta, phi, lambda)
ID
Identity gate (wait)
S
S gate (sqrt(Z))
Sdg
S-dagger gate (inverse of S)
T
T gate (sqrt(S))
Tdg
T-dagger gate (inverse of T)
SWAP
Swap gate
CCX
Toffoli gate (CCX)
Custom(String)
Custom user-defined gate
Trait Implementations§
impl StructuralPartialEq for GateType
Auto Trait Implementations§
impl Freeze for GateType
impl RefUnwindSafe for GateType
impl Send for GateType
impl Sync for GateType
impl Unpin for GateType
impl UnsafeUnpin for GateType
impl UnwindSafe for GateType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more