Skip to main content

Module error

Module error 

Source
Expand description

Error types for the Libket quantum computing library.

All fallible operations in Libket return a Result<T>, where the error variant is a KetError. Each variant carries a human-readable description of the failure condition that is suitable for end-user display.

The enum is #[repr(i32)] so that it can be transmitted across FFI boundaries as a plain integer code. Use KetError::error_code to obtain the discriminant value and KetError::from_error_code to reconstruct the variant on the receiving side.

Enumsยง

KetError
The exhaustive set of errors that Libket operations can produce.