Trait roqoqo::operations::OperateThreeQubit
source · pub trait OperateThreeQubit: Operate + InvolveQubits + Substitute + Clone + PartialEq {
// Required methods
fn target(&self) -> &usize;
fn control_0(&self) -> &usize;
fn control_1(&self) -> &usize;
}
Expand description
Trait for Operations acting on exactly three qubits.
§Example
use roqoqo::operations::{ControlledControlledPauliZ, OperateThreeQubit};
let ccz = ControlledControlledPauliZ::new(0, 1, 2);
assert_eq!(ccz.control_0(), &0_usize);
assert_eq!(ccz.control_1(), &1_usize);
assert_eq!(ccz.target(), &2_usize);
Required Methods§
Object Safety§
This trait is not object safe.
Implementors§
impl OperateThreeQubit for ThreeQubitGateOperation
Trait for Operations acting on exactly three qubits.
impl OperateThreeQubit for ThreeQubitOperation
Trait for Operations acting on exactly three qubits.
impl OperateThreeQubit for ControlledControlledPauliZ
Trait for Operations acting on exactly three qubits.
impl OperateThreeQubit for ControlledControlledPhaseShift
Trait for Operations acting on exactly three qubits.
impl OperateThreeQubit for Toffoli
Trait for Operations acting on exactly three qubits.