Skip to main content

QuantumErrorEnum

Enum QuantumErrorEnum 

Source
pub enum QuantumErrorEnum {
Show 24 variants DimensionMismatch(String), MetricMismatch(String), UnsupportedMetric(String), NonFiniteValue(String), NormalizationError(String), NonPositiveOperator(String), NonUnitTrace(String), NonCptpChannel(String), PartialTraceShape(String), CommutatorNonZero { node_j: usize, node_k: usize, detail: String, }, NotFaithfullyRepresentable(String), CertificateNotInherited { node_j: usize, node_k: usize, detail: String, }, CyclicStructureUnsupported(String), HypothesisCountExceeded { n: usize, pairs: usize, }, BoundaryNotHeld(String), NotInNormalizer { generator: usize, detail: String, }, NonCliffordGate(String), NoCompositionalModel { origin: String, }, NaturalityDimensionExceeded { n: usize, k: usize, entries: u64, cap: u64, }, KrausFamilyExceeded { operators: u64, cap: u64, }, NoPropagationNormalForm { layer: usize, after: usize, }, NotParallelisable { set: usize, from: usize, to: usize, }, SectionNotInverse { entry: usize, detail: String, }, CalculationError(String),
}
Expand description

Detailed classification of quantum errors. Typed variants name the exact failure; a String payload carries the operation-specific context.

Variants§

§

DimensionMismatch(String)

Operations attempted on states or operators with incompatible dimensions/shapes.

§

MetricMismatch(String)

The operands carry different Clifford metric signatures.

§

UnsupportedMetric(String)

The Clifford metric is unsupported for the requested operation (e.g. an odd-dimensional metric for the ket↔matrix bridge), or a metric convention error surfaced from deep_causality_metric.

§

NonFiniteValue(String)

A non-finite value (NaN, ±inf) was produced or encountered.

§

NormalizationError(String)

Probability normalization failed (value < 0, > 1, or sum ≠ 1).

§

NonPositiveOperator(String)

An operator required to be positive (semi-)definite is not.

§

NonUnitTrace(String)

A density or Choi–Jamiołkowski operator does not have the required trace.

§

NonCptpChannel(String)

A channel is not completely positive and trace-preserving.

§

PartialTraceShape(String)

A partial trace was requested with an inconsistent subsystem shape.

§

CommutatorNonZero

The freeze-time quantum Markov check found a non-commuting factor pair; node_j/node_k name the offending operators by graph node index.

Fields

§node_j: usize
§node_k: usize
§detail: String
§

NotFaithfullyRepresentable(String)

The declared causal structure contains a C₃ sub-relation and therefore does not imply a unitary causally faithful decomposition in the traditional circuit paradigm (van der Lugt & Lorenz, arXiv:2508.11762, Definition 3.1 and Theorem 3.2).

“Faithfully” is the Lorenz–Barrett sense: a circuit decomposition whose connectivity equals the unitary’s causal structure, G_U = G_C. It is not Pearl’s faithfulness, where a distribution has no independences beyond those its graph implies. The structure is what is rejected; a particular unitary with that structure may still decompose faithfully (Remark 3.3), and every such unitary has a routed decomposition.

§

CertificateNotInherited

A Markov re-check on a composite’s inherited factors found a non-commuting pair. This is a failure of the certificate, not of the model: Barrett–Lorenz–Oreshkov’s representation theorem gives every composite of QCM-representable parts a Markov factorization for the induced DAG with the induced factors, and the naive product of the parts’ factors need not be it. CommutatorNonZero is reserved for factors that are the model’s own.

Fields

§node_j: usize
§node_k: usize
§detail: String
§

CyclicStructureUnsupported(String)

A structural candidate’s causal structure contains a directed cycle. Cyclic quantum causal models exist (Barrett, Lorenz & Oreshkov, arXiv:2002.12157) and the C₃ criterion does not reject them, so this is a scope decision made at build(), before any check runs, and it names the limit rather than an obstruction.

§

HypothesisCountExceeded

design was asked to cover more hypotheses than its cap. The exact cover is a dynamic program over 2^C(n,2) subsets of pairs: 2^15 at n = 6, 2^28 at n = 8, 2^45 at n = 10. Above max_hypotheses the solve is refused before the table is allocated, naming n and the pair count. A later version may supply the greedy cover with its logarithmic approximation factor reported; v1 does not.

Fields

§pairs: usize
§

BoundaryNotHeld(String)

A marginalisation was refused because its boundary warrant did not hold: the kept-factor operator Z ⊗ 1_B fails to commute with the operator being traced within the named tolerance, so nothing may be asserted about the traced commutator and no traced operator is produced. The message carries the residual, the tolerance and the amplification; Hypothesis::boundary_warrant returns them typed.

§

NotInNormalizer

A Pauli handed to the logical-equivalence predicate lies outside the code’s normalizer: it anticommutes with the stabilizer generator named by generator, so it does not preserve the code space and the question of whether it acts trivially there is not well-posed. detail says which kind of generator, Z or X.

Fields

§generator: usize
§detail: String
§

NonCliffordGate(String)

A gate in a program handed to the Clifford tableau is not Clifford, so its conjugation action on a Pauli is not a symplectic update and the program cannot be pushed through. Names the gate and its position.

§

NoCompositionalModel

An abstraction constructor was handed a process operator without its circuit. A bare ProcessFactors store is the marginal of a compositional model and not one itself (Lorenz & Tull, arXiv:2602.16612, Example 62), so it validates as in v1 and cannot enter an abstraction. Carries the subject’s origin.

Fields

§origin: String
§

NaturalityDimensionExceeded

The numeric semantics would form a composite Choi operator of 2^(2n + 2k) entries above its cap: n and k are the input and output qubit counts (rounded up from the dimensions), entries the count it would allocate, cap the limit. Refused before allocating.

Fields

§entries: u64
§cap: u64
§

KrausFamilyExceeded

The numeric semantics would carry a Kraus family (the product of the operator counts of every noise box and measurement outcome) above its cap. Refused before allocating.

Fields

§operators: u64
§cap: u64
§

NoPropagationNormalForm

A fault was asked to propagate through a program with no normal form of polynomial size: two non-Clifford layers separated by a non-diagonal Clifford. layer is the non-diagonal Clifford layer and after the non-Clifford layer whose remainder precedes it. The propagator refuses rather than expanding.

Fields

§layer: usize
§after: usize
§

NotParallelisable

An interchange query named sets that are not parallelisable: the directed path from → to joins two members of interchange set set (Lorenz & Tull §7.2).

Fields

§set: usize
§from: usize
§

SectionNotInverse

A type alignment’s section does not invert its channel: for alignment entry entry, ‖τ_X ∘ E_X − id‖_F exceeds the state tolerance; detail states the residual and the tolerance.

Fields

§entry: usize
§detail: String
§

CalculationError(String)

Numerical conversion or general calculation failure.

Trait Implementations§

Source§

impl Clone for QuantumErrorEnum

Source§

fn clone(&self) -> QuantumErrorEnum

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QuantumErrorEnum

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for QuantumErrorEnum

Source§

impl Hash for QuantumErrorEnum

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for QuantumErrorEnum

Source§

fn eq(&self, other: &QuantumErrorEnum) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QuantumErrorEnum

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<Borrowed> SampleBorrow<Borrowed> for Borrowed

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.