#[non_exhaustive]pub enum VerifyLogicalError {
Show 19 variants
Cancelled(ComputationCancelled),
Graph(BlockGraphError),
ZX(ZXError),
OutputCorrection(OutputCorrectionError),
DuplicateBoundary(IVec3),
InvalidBoundary(IVec3),
MissingBoundary(IVec3),
MissingMeasurementValue(String),
MissingInputValue(String),
FeedbackTargetWithoutWire {
target: IVec3,
pauli: PauliBasis,
},
MeasurementPhaseUnavailable(String),
TooManySymbols,
BoundaryArityMismatch {
actual_inputs: usize,
actual_outputs: usize,
expected_inputs: usize,
expected_outputs: usize,
},
ZeroExpectedMap,
MapMismatch {
classical_state: BTreeMap<String, bool>,
},
NoVerifiedBranch {
samples: usize,
},
RuntimeBasisInitializationFailed {
source: RuntimeBasisError,
},
RuntimeBasisUpdateFailed {
pos: IVec3,
source: RuntimeBasisError,
},
OutputSurfaceUnavailable(Vec<IVec3>),
}Expand description
An error raised while building, sampling, or contracting a logical ZX map.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Cancelled(ComputationCancelled)
The caller cancelled construction or analysis.
Graph(BlockGraphError)
Block-graph construction or validation failed.
ZX(ZXError)
ZX translation or manipulation failed.
OutputCorrection(OutputCorrectionError)
Output correction surfaces could not be solved.
DuplicateBoundary(IVec3)
A logical boundary position appears more than once.
InvalidBoundary(IVec3)
A requested logical boundary is not an open port.
MissingBoundary(IVec3)
An open port is absent from the requested logical boundary order.
MissingMeasurementValue(String)
A measurement-dependent branch lacks an assigned value.
MissingInputValue(String)
An external Boolean input lacks an assigned value.
FeedbackTargetWithoutWire
A feedback target has no wire carrying the requested Pauli frame.
A measurement outcome cannot be represented as a native ZX phase.
TooManySymbols
The symbolic phase count exceeds QuiZX’s variable-ID range.
BoundaryArityMismatch
Actual and expected logical maps have different boundary arity.
Fields
ZeroExpectedMap
The caller-supplied expected logical map is identically zero.
MapMismatch
One sampled branch differs from the expected map up to scalar.
NoVerifiedBranch
Sampling found no accepted branch with a nonzero logical map.
RuntimeBasisInitializationFailed
Initial runtime-basis construction failed.
Fields
source: RuntimeBasisErrorUnderlying runtime-basis failure.
RuntimeBasisUpdateFailed
Applying one runtime selection to the basis failed.
Fields
pos: IVec3Selective-block position being updated.
source: RuntimeBasisErrorUnderlying runtime-basis failure.
Required logical-output correction surfaces are unavailable.
Trait Implementations§
Source§impl Debug for VerifyLogicalError
impl Debug for VerifyLogicalError
Source§impl Display for VerifyLogicalError
impl Display for VerifyLogicalError
Source§impl Error for VerifyLogicalError
impl Error for VerifyLogicalError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BlockGraphError> for VerifyLogicalError
impl From<BlockGraphError> for VerifyLogicalError
Source§fn from(source: BlockGraphError) -> Self
fn from(source: BlockGraphError) -> Self
Source§impl From<ComputationCancelled> for VerifyLogicalError
impl From<ComputationCancelled> for VerifyLogicalError
Source§fn from(source: ComputationCancelled) -> Self
fn from(source: ComputationCancelled) -> Self
Source§impl From<OutputCorrectionError> for VerifyLogicalError
impl From<OutputCorrectionError> for VerifyLogicalError
Source§fn from(source: OutputCorrectionError) -> Self
fn from(source: OutputCorrectionError) -> Self
Source§impl From<VerifyLogicalError> for FeedbackInferenceError
impl From<VerifyLogicalError> for FeedbackInferenceError
Source§fn from(source: VerifyLogicalError) -> Self
fn from(source: VerifyLogicalError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for VerifyLogicalError
impl !UnwindSafe for VerifyLogicalError
impl Freeze for VerifyLogicalError
impl Send for VerifyLogicalError
impl Sync for VerifyLogicalError
impl Unpin for VerifyLogicalError
impl UnsafeUnpin for VerifyLogicalError
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);