pub struct Tableau { /* private fields */ }
Expand description

Represents a stabilizer group with logical dimension 1; that is, a single stabilizer state expressed in terms of the generators of its stabilizer group, and those generators of the Pauli group that anticommute with each stabilizer generator (colloquially, the destabilizers of the represented state).

Implementations

Returns a new stabilizer tableau representing the $\ket{00\cdots 0}$ state of an $n$-qubit register.

Asserts whether a hypothetical single-qubit $Z$-basis measurement would agree with an expected result.

If the assertion would pass, Ok(()) is returned, otherwise an Err describing the assertion failure is returned.

Applies a Hadamard operation in-place to the given qubit.

Applies a phase operation ($S$) in-place to the given qubit.

Applies a controlled-NOT operation in-place, given control and target qubits.

Applies a Pauli $X$ operation in-place to the given qubit.

Applies an adjoint phase operation ($S^{\dagger}$) in-place to the given qubit.

Applies a Pauli $Y$ operation in-place to the given qubit.

Applies a Pauli $Z$ operation in-place to the given qubit.

Applies a SWAP operation in-place between two qubits.

Measures a single qubit in the Pauli $Z$-basis, returning the result, and updating the stabilizer tableau in-place.

Trait Implementations

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

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.