Trait roqoqo::operations::OperateGate
source · [−]pub trait OperateGate: Operate + InvolveQubits + Substitute + Clone + PartialEq {
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
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
Returns unitary matrix of the gate.
Implementors
impl OperateGate for ConstantGateOperation
impl OperateGate for GateOperation
impl OperateGate for MultiQubitGateOperation
impl OperateGate for Rotation
impl OperateGate for SingleQubitGateOperation
impl OperateGate for TwoQubitGateOperation
impl OperateGate for Bogoliubov
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for CNOT
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for ComplexPMInteraction
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for ControlledPauliY
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for ControlledPauliZ
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for ControlledPhaseShift
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for FSwap
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for Fsim
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for GivensRotation
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for GivensRotationLittleEndian
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for Hadamard
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for ISwap
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for InvSqrtISwap
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for InvSqrtPauliX
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for MolmerSorensenXX
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for MultiQubitMS
impl OperateGate for MultiQubitZZ
impl OperateGate for PMInteraction
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for PauliX
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for PauliY
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for PauliZ
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for PhaseShiftState0
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for PhaseShiftState1
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for PhaseShiftedControlledZ
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for Qsim
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for RotateAroundSphericalAxis
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for RotateX
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for RotateY
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for RotateZ
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for SGate
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for SWAP
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for SingleQubitGate
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for SpinInteraction
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for SqrtISwap
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for SqrtPauliX
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for TGate
Trait for all operations acting with a unitary gate on a set of qubits.
impl OperateGate for VariableMSXX
Trait for all Operations acting with a unitary gate on a set of qubits.
impl OperateGate for XY
Trait for all Operations acting with a unitary gate on a set of qubits.