Struct qdk_sim::QubitSized [−][src]
pub struct QubitSized<T> { /* fields omitted */ }
Expand description
Represents that a given type has a size that can be measured in terms
of a number of qubits (e.g.: State
).
Implementations
Applies this process to a quantum register with a given state, returning the new state of that register.
Returns a new Pauli channel, given a mixture of Pauli operators.
Returns a serialization of this quantum process as a JSON object.
Returns a copy of this process that applies to registers of a given size.
Returns a new mixed state on a given number of qubits. By convention, new mixed states start off in the “all-zeros” state, $\rho = \ket{00\cdots 0}\bra{00\cdots 0}$.
Returns a new stabilizer state on a given number of qubits. By convention, new stabilizer states start off in the “all-zeros” state, $\left\langle Z_0, Z_1, \dots, Z_{n - 1} \right\rangle$.
Returns a new pure state on a given number of qubits. By convention, new pure states start off in the “all-zeros” state, $\ket{\psi} = \ket{00\cdots 0}$.
Extends this state to be a state on n_qubits
additional qubits.
New qubits are added “to the right,” e.g.: $\left|\psi\right\rangle$
is extended to $\left|\psi 0\right\rangle$.
Example
let rho = State::new_mixed(2);
assert_eq!(5, rho.extend(3).get_n_qubits());
If the given state can be represented by a stabilizer tableau, returns that tableau.
Returns the number of qubits that this value relates to.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for QubitSized<T> where
T: RefUnwindSafe,
impl<T> Send for QubitSized<T> where
T: Send,
impl<T> Sync for QubitSized<T> where
T: Sync,
impl<T> Unpin for QubitSized<T> where
T: Unpin,
impl<T> UnwindSafe for QubitSized<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more