pub trait QuantumGates {
// Required methods
fn gate_identity() -> Self;
fn gate_x() -> Self;
fn gate_y() -> Self;
fn gate_z() -> Self;
fn gate_hadamard() -> Self;
fn gate_s() -> Self;
fn gate_t() -> Self;
}Expand description
A suite of standard Quantum Gates (Unitary Operators). These are constructed as elements of the algebra (End(A)).
Mapping logic for Cl(0, n) metric:
- Pauli X ~ i * Gamma_1
- Pauli Y ~ i * Gamma_2
- Pauli Z ~ i * Gamma_1 * Gamma_2
(The factor of ‘i’ is required because Gamma^2 = -1 in Spin(10), but Pauli Matrices must square to +1).
Required Methods§
Sourcefn gate_identity() -> Self
fn gate_identity() -> Self
The Identity Operator (No-op)
Sourcefn gate_hadamard() -> Self
fn gate_hadamard() -> Self
Hadamard Gate (H). Creates Superposition: |0> -> (|0> + |1>)/sqrt(2). Definition: H = (X + Z) / sqrt(2).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.