pub trait OperateGate: Operate + InvolveQubits + Substitute + Clone + PartialEq + SupportedVersion {
    // Required method
    fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>;
}
Expand description

Trait for Operations acting with a unitary gate on a set of qubits.

§Example

use ndarray::array;
use num_complex::Complex64;
use roqoqo::operations::{OperateGate, PauliX};

let paulix = PauliX::new(0);
let matrix = array![
    [Complex64::new(0.0, 0.0), Complex64::new(1.0, 0.0)],
    [Complex64::new(1.0, 0.0), Complex64::new(0.0, 0.0)]
];
assert_eq!(paulix.unitary_matrix().unwrap(), matrix);

Required Methods§

source

fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>

Returns unitary matrix of the gate.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl OperateGate for ConstantGateOperation

source§

impl OperateGate for GateOperation

source§

impl OperateGate for MultiQubitGateOperation

source§

impl OperateGate for Rotation

source§

impl OperateGate for SingleQubitGateOperation

source§

impl OperateGate for ThreeQubitGateOperation

source§

impl OperateGate for TwoQubitGateOperation

source§

impl OperateGate for Bogoliubov

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for CNOT

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ComplexPMInteraction

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledControlledPauliZ

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledControlledPhaseShift

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledPauliY

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledPauliZ

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledPhaseShift

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledRotateX

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ControlledRotateXY

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for EchoCrossResonance

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for FSwap

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for Fsim

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for GPi2

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for GPi

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for GivensRotation

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for GivensRotationLittleEndian

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for Hadamard

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for ISwap

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for Identity

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for InvSqrtISwap

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for InvSqrtPauliX

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for MolmerSorensenXX

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for MultiQubitMS

source§

impl OperateGate for MultiQubitZZ

source§

impl OperateGate for PMInteraction

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PauliX

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PauliY

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PauliZ

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PhaseShiftState0

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PhaseShiftState1

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PhaseShiftedControlledPhase

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for PhaseShiftedControlledZ

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for Qsim

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for RotateAroundSphericalAxis

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for RotateX

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for RotateXY

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for RotateY

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for RotateZ

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SGate

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SWAP

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SingleQubitGate

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SpinInteraction

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SqrtISwap

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for SqrtPauliX

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for TGate

Trait for all operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for Toffoli

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for VariableMSXX

Trait for all Operations acting with a unitary gate on a set of qubits.

source§

impl OperateGate for XY

Trait for all Operations acting with a unitary gate on a set of qubits.