Quantum Computing, Programming, Technology, Rust, Coding.
// Pauli-X Gate: Flips the cat's state from asleep to awake or vice versa pub fn pauli_x(&self) -> Self { Self::new(self.awake_amplitude, self.asleep_amplitude) } } Now if we perform this operation on our cat, we can see the state change from ∣Asleep⟩ to ∣Awake⟩. filename: src/main.rs use