[][src]Struct quest_rs::qubits::QuReg

pub struct QuReg<'a> { /* fields omitted */ }

Methods

impl<'a> QuReg<'a>[src]

pub fn new(num_qubits: i32, env: &'a QuestEnv) -> Self[src]

pub fn new_density(num_qubits: i32, env: &'a QuestEnv) -> Self[src]

pub fn num_qubits(self) -> i32[src]

pub fn num_prob_amplitudes(self) -> i64[src]

pub fn clone_into(&self, target_qureg: &mut QuReg)[src]

pub fn init_blank_state(&mut self) -> &mut Self[src]

pub fn init_zero_state(&mut self) -> &mut Self[src]

pub fn init_plus_state(&mut self) -> &mut Self[src]

pub fn init_classical_state(&mut self, state_index: i64) -> &mut Self[src]

pub fn init_pure_state(&mut self, pure: &QuReg) -> &mut Self[src]

pub fn init_debug_state(&mut self) -> &mut Self[src]

pub fn init_state_from_amplitudes(
    &mut self,
    reals: Vec<QReal>,
    imags: Vec<QReal>
) -> &mut Self
[src]

pub fn set_amplitudes(
    &mut self,
    start_index: i64,
    reals: Vec<QReal>,
    imags: Vec<QReal>
) -> &mut Self
[src]

pub fn set_weighted_qureg(
    &mut self,
    factor_one: Complex,
    qureg_one: &QuReg,
    factor_two: Complex,
    qureg_two: &QuReg,
    factor_for_this_qureg: Complex
) -> &mut Self
[src]

pub fn phase_shift(&mut self, target_qubit: i32, angle: QReal) -> &mut Self[src]

pub fn controlled_phase_shift(
    &mut self,
    qubit_one: i32,
    qubit_two: i32,
    angle: QReal
) -> &mut Self
[src]

pub fn multi_controlled_phase_shift(
    &mut self,
    control_qubits: Vec<i32>,
    angle: QReal
) -> &mut Self
[src]

pub fn controlled_phase_flip(
    &mut self,
    qubit_one: i32,
    qubit_two: i32
) -> &mut Self
[src]

pub fn multi_controlled_phase_flip(
    &mut self,
    control_qubits: Vec<i32>
) -> &mut Self
[src]

pub fn apply_s_gate(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn apply_t_gate(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn environment_string(&self) -> String[src]

pub fn report_state_to_file(&self) -> &Self[src]

pub fn report_state_to_screen(&self, report_rank: i32) -> &Self[src]

pub fn report_params(&self) -> &Self[src]

pub fn copy_state_to_gpu(&mut self) -> &mut Self[src]

pub fn copy_state_from_gpu(&mut self) -> &mut Self[src]

pub fn amplitude(&self, index: i64) -> Complex[src]

pub fn real_amplitude(&self, index: i64) -> QReal[src]

pub fn imag_amplitude(&self, index: i64) -> QReal[src]

pub fn probability_amplitude(&self, index: i64) -> QReal[src]

pub fn density_amplitude(&self, row_index: i64, column_index: i64) -> Complex[src]

pub fn calculate_total_probability(&self) -> QReal[src]

pub fn calculate_purity(&self) -> QReal[src]

pub fn calculate_fidelity(&self, pure_state: &QuReg) -> QReal[src]

pub fn calculate_expected_pauli_product(
    &self,
    target_qubits: Vec<i32>,
    target_paulis: Vec<PauliOpType>,
    workspace: QuReg
) -> QReal
[src]

pub fn calculate_expected_pauli_sum(
    &self,
    pauli_operation_types: Vec<PauliOpType>,
    term_coefficients: Vec<QReal>,
    workspace: QuReg
) -> QReal
[src]

pub fn calculate_probability_of_outcome(
    &self,
    measure_qubit: i32,
    outcome: i32
) -> QReal
[src]

pub fn calculate_hilbert_schmidt_distance(
    &mut self,
    to_density_matrix: &QuReg
) -> QReal
[src]

pub fn collapse_to_outcome(&mut self, measure_qubit: i32, outcome: i32) -> QReal[src]

pub fn measure(&mut self, measure_qubit: i32) -> i32[src]

pub fn measure_with_stats(&mut self, measure_qubit: i32) -> (i32, QReal)[src]

pub fn unitary(
    &mut self,
    target_qubit: i32,
    unitary_matrix: ComplexMatrix2
) -> &mut Self
[src]

pub fn compact_unitary(
    &mut self,
    target_qubit: i32,
    alpha: Complex,
    beta: Complex
) -> &mut Self
[src]

pub fn controlled_unitary(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    unitary_matrix: ComplexMatrix2
) -> &mut Self
[src]

pub fn multi_controlled_unitary(
    &mut self,
    control_qubits: Vec<i32>,
    target_qubit: i32,
    unitary_matrix: ComplexMatrix2
) -> &mut Self
[src]

pub fn controlled_compact_unitary(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    alpha: Complex,
    beta: Complex
) -> &mut Self
[src]

pub fn two_qubit_unitary(
    &mut self,
    target_qubit_one: i32,
    target_qubit_two: i32,
    unitary_matrix: ComplexMatrix4
) -> &mut Self
[src]

pub fn controlled_two_qubit_unitary(
    &mut self,
    control_qubit: i32,
    target_qubit_one: i32,
    target_qubit_two: i32,
    unitary_matrix: ComplexMatrix4
) -> &mut Self
[src]

pub fn multi_controlled_two_qubit_unitary(
    &mut self,
    control_qubits: Vec<i32>,
    target_qubit_one: i32,
    target_qubit_two: i32,
    unitary_matrix: ComplexMatrix4
) -> &mut Self
[src]

pub fn multi_qubit_unitary(
    &mut self,
    target_qubits: Vec<i32>,
    unitary_matrix: ComplexMatrixN
) -> &mut Self
[src]

pub fn controlled_multi_qubit_unitary(
    &mut self,
    control_qubit: i32,
    target_qubits: Vec<i32>,
    unitary_matrix: ComplexMatrixN
) -> &mut Self
[src]

pub fn multi_controlled_multi_qubit_unitary(
    &mut self,
    control_qubits: Vec<i32>,
    target_qubits: Vec<i32>,
    unitary_matrix: &ComplexMatrixN
) -> &mut Self
[src]

pub fn rotate_x(&mut self, qubit_to_rotate: i32, angle: QReal) -> &mut Self[src]

pub fn rotate_y(&mut self, qubit_to_rotate: i32, angle: QReal) -> &mut Self[src]

pub fn rotate_z(&mut self, qubit_to_rotate: i32, angle: QReal) -> &mut Self[src]

pub fn rotate_around_axis(
    &mut self,
    qubit_to_rotate: i32,
    angle: QReal,
    axis: Vector
) -> &mut Self
[src]

pub fn controlled_rotate_x(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    angle: QReal
) -> &mut Self
[src]

pub fn controlled_rotate_y(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    angle: QReal
) -> &mut Self
[src]

pub fn controlled_rotate_z(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    angle: QReal
) -> &mut Self
[src]

pub fn controlled_rotate_around_axis(
    &mut self,
    control_qubit: i32,
    target_qubit: i32,
    angle: QReal,
    axis: Vector
) -> &mut Self
[src]

pub fn pauli_x(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn pauli_y(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn pauli_z(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn hadamard(&mut self, target_qubit: i32) -> &mut Self[src]

pub fn controlled_not(
    &mut self,
    control_qubit: i32,
    target_qubit: i32
) -> &mut Self
[src]

pub fn controlled_pauli_y(
    &mut self,
    control_qubit: i32,
    target_qubit: i32
) -> &mut Self
[src]

pub fn inner_product(&self, ket: QuReg) -> Complex[src]

pub fn density_inner_product(&self, other_density_matrix: QuReg) -> QReal[src]

pub fn start_recording_qasm(&mut self) -> &mut Self[src]

pub fn stop_recording_qasm(&mut self) -> &mut Self[src]

pub fn clear_recorded_qasm(&mut self) -> &mut Self[src]

pub fn print_recorded_qasm(&mut self) -> &mut Self[src]

pub fn write_recorded_qasm_to_file(&mut self, filename: &str) -> &mut Self[src]

pub fn mix_dephasing(
    &mut self,
    target_qubit: i32,
    probability: QReal
) -> &mut Self
[src]

pub fn mix_two_qubit_dephasing(
    &mut self,
    qubit_one: i32,
    qubit_two: i32,
    probability: QReal
) -> &mut Self
[src]

pub fn mix_depolarising(
    &mut self,
    target_qubit: i32,
    probability: QReal
) -> &mut Self
[src]

pub fn mix_two_qubit_depolarising(
    &mut self,
    qubit_one: i32,
    qubit_two: i32,
    probability: QReal
) -> &mut Self
[src]

pub fn mix_damping(
    &mut self,
    target_qubit: i32,
    probability: QReal
) -> &mut Self
[src]

pub fn mix_pauli(
    &mut self,
    target_qubit: i32,
    probability_x: QReal,
    probability_y: QReal,
    probability_z: QReal
) -> &mut Self
[src]

pub fn mix_density_matrix(
    &mut self,
    probability: QReal,
    other_qureg: QuReg
) -> &mut Self
[src]

pub fn mix_kraus_map(
    &mut self,
    target_qubit: i32,
    kraus_operators: Vec<ComplexMatrix2>
) -> &mut Self
[src]

pub fn mix_two_qubit_kraus_map(
    &mut self,
    target_qubit_one: i32,
    target_qubit_two: i32,
    kraus_operators: Vec<ComplexMatrix4>
) -> &mut Self
[src]

pub fn mix_multi_qubit_kraus_map(
    &mut self,
    target_qubits: Vec<i32>,
    kraus_operators: Vec<ComplexMatrixN>
) -> &mut Self
[src]

pub fn swap_gate(&mut self, qubit_one: i32, qubit_two: i32) -> &mut Self[src]

pub fn sqrt_swap_gate(&mut self, qubit_one: i32, qubit_two: i32) -> &mut Self[src]

pub fn multi_state_controlled_unitary(
    &mut self,
    control_qubits: Vec<i32>,
    control_states: Vec<i32>,
    target_qubit: i32,
    unitary_matrix: ComplexMatrix2
) -> &mut Self
[src]

pub fn multi_rotate_z(
    &mut self,
    target_qubits: Vec<i32>,
    angle: QReal
) -> &mut Self
[src]

pub fn multi_rotate_pauli(
    &mut self,
    target_qubits: Vec<i32>,
    target_paulis: Vec<PauliOpType>,
    angle: QReal
) -> &mut Self
[src]

pub fn apply_pauli_sum(
    &mut self,
    pauli_operation_types: Vec<PauliOpType>,
    term_coefficients: Vec<QReal>
) -> &mut Self
[src]

Trait Implementations

impl<'_> Clone for QuReg<'_>[src]

impl<'_> Drop for QuReg<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for QuReg<'a>

impl<'a> !Send for QuReg<'a>

impl<'a> !Sync for QuReg<'a>

impl<'a> Unpin for QuReg<'a>

impl<'a> UnwindSafe for QuReg<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.