pub struct QubitSized<T> { /* private fields */ }
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.

Applies this process to the given qubits in a 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 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}$.

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

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());

Returns a copy of this state, represented as a mixed state.

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

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.