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

Returns unitary matrix of the gate.

Implementors

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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