Type Alias Process

Source
pub type Process = QubitSized<ProcessData>;
Expand description

A linear function from quantum states to quantum states.

§Remarks

A process that is completely positive and trace preserving is a channel.

Aliased Type§

pub struct Process { /* private fields */ }

Implementations§

Source§

impl Process

Source

pub fn apply(&self, state: &State) -> Result<State, String>

Applies this process to a quantum register with a given state, returning the new state of that register.

Source

pub fn apply_to( &self, idx_qubits: &[usize], state: &State, ) -> Result<State, String>

Applies this process to the given qubits in a register with a given state, returning the new state of that register.

Source§

impl Process

Source

pub fn new_pauli_channel<T: IntoPauliMixture>(data: T) -> Self

Returns a new Pauli channel, given a mixture of Pauli operators.

Source

pub fn as_json(&self) -> String

Returns a serialization of this quantum process as a JSON object.

Source

pub fn extend_one_to_n(&self, idx_qubit: usize, n_qubits: usize) -> Process

Returns a copy of this process that applies to registers of a given size.

Source

pub fn extend_two_to_n( &self, idx_qubit1: usize, idx_qubit2: usize, n_qubits: usize, ) -> Process

Returns a copy of this process that applies to registers of a given size.

Trait Implementations§

Source§

impl Add<&QubitSized<ProcessData>> for &Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Process) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&QubitSized<ProcessData>> for Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Process) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<QubitSized<ProcessData>> for &Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Process) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Process) -> Self::Output

Performs the + operation. Read more
Source§

impl Mul<&QubitSized<ProcessData>> for &Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Process) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&QubitSized<ProcessData>> for Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Process) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<QubitSized<ProcessData>> for &Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Process) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Process

Source§

type Output = QubitSized<ProcessData>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Process) -> Self::Output

Performs the * operation. Read more