Skip to content

ppvm_tableau::tableau_like

tableau_like

ppvm_tableau::tableau_like

[`TableauLike`](tableau_like::TableauLike) — shared trait for stabilizer-tableau backends. [`TableauLike`](crate::tableau_like::TableauLike) trait: shared interface for stabilizer-tableau backends.

Any type implementing TableauLike gets default implementations of single- and two-qubit Pauli noise channels (Depolarizing, PauliError, Depolarizing2, TwoQubitPauliError). New tableau backends only need to provide TableauLike::rng_mut and (optionally) override TableauLike::is_qubit_lost.

classTableauLikesource

ppvm_tableau::tableau_like::TableauLike

Rust trait. A stabilizer-tableau-like backend that supports Clifford gates and an RNG.

pub trait TableauLike: Clifford

Associated items

NameTypeDescription
Coefftype Coeff: Coefficient + PartialOrd<f64>associated type. Coefficient type used for probabilities.
Rngtype Rng: Rng + RngExtassociated type. RNG type backing the stochastic channels.

Implementing this trait grants default implementations of the Pauli noise channels via TableauLike::depolarize_impl and friends. The associated `Rng` type lets each backend choose its own RNG; nothing in this trait depends on `SmallRng`.

source

methoddepolarize2_implsource

ppvm_tableau::tableau_like::TableauLike::depolarize2_impl

Signature
fn depolarize2_impl(&mut self, addr0: usize, addr1: usize, p: <Self as >::Coeff)

Parameters

NameTypeDescription
addr0usize
addr1usize
p&lt;Self as &gt;::Coeff

Two-qubit depolarizing channel: spreads `p` over the 15 non-identity two-qubit Pauli errors.

source

methoddepolarize_implsource

ppvm_tableau::tableau_like::TableauLike::depolarize_impl

fn depolarize_impl(&mut self, addr0: usize, p: <Self as >::Coeff)

Parameters

NameTypeDescription
addr0usize
p&lt;Self as &gt;::Coeff

Single-qubit depolarizing channel.

RNG is consumed unconditionally; the selected Clifford gate is expected to no-op on lost qubits. This preserves seeded RNG sequences across loss events.

source

methodis_qubit_lostsource

ppvm_tableau::tableau_like::TableauLike::is_qubit_lost

fn is_qubit_lost(&self, _addr: usize) -> bool

Parameters

NameTypeDescription
_addrusize

Returns

bool

Whether the qubit at `addr` is lost. Default: never lost.

source

methodpauli_error_implsource

ppvm_tableau::tableau_like::TableauLike::pauli_error_impl

fn pauli_error_impl(&mut self, addr0: usize, p: [<Self as >::Coeff; 3])

Parameters

NameTypeDescription
addr0usize
p[&lt;Self as &gt;::Coeff; 3]

Single-qubit Pauli-error channel (X, Y, Z with given probabilities).

RNG is consumed unconditionally; the selected Clifford gate is expected to no-op on lost qubits. This preserves seeded RNG sequences across loss events.

source

methodrng_mutsource

ppvm_tableau::tableau_like::TableauLike::rng_mut

fn rng_mut(&mut self) -> &mut <Self as >::Rng

Returns

&mut <Self as >::Rng

Mutable access to the backend’s RNG.

source

methodtwo_qubit_pauli_error_implsource

ppvm_tableau::tableau_like::TableauLike::two_qubit_pauli_error_impl

Signature
fn two_qubit_pauli_error_impl(&mut self, addr0: usize, addr1: usize, p: [<Self as >::Coeff; 15])

Parameters

NameTypeDescription
addr0usize
addr1usize
p[&lt;Self as &gt;::Coeff; 15]

Two-qubit Pauli-error channel (15 non-identity Pauli combinations).

source