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§

source

fn target(&self) -> &usize

Returns target qubit of three qubit Operation.

source

fn control_0(&self) -> &usize

Returns control_0 qubit of three qubit Operation.

source

fn control_1(&self) -> &usize

Returns control_1 qubit of three qubit Operation.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl OperateThreeQubit for ThreeQubitGateOperation

Trait for Operations acting on exactly three qubits.

source§

impl OperateThreeQubit for ThreeQubitOperation

Trait for Operations acting on exactly three qubits.

source§

impl OperateThreeQubit for ControlledControlledPauliZ

Trait for Operations acting on exactly three qubits.

source§

impl OperateThreeQubit for ControlledControlledPhaseShift

Trait for Operations acting on exactly three qubits.

source§

impl OperateThreeQubit for Toffoli

Trait for Operations acting on exactly three qubits.