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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
CalculationError(String)
Numerical conversion or general calculation failure.
Trait Implementations§
Source§impl Clone for QuantumErrorEnum
impl Clone for QuantumErrorEnum
Source§fn clone(&self) -> QuantumErrorEnum
fn clone(&self) -> QuantumErrorEnum
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more