Error Types

OpenQuantum provides comprehensive error handling with contextual information:

Error Types

Error TypeDescription
ParseErrorInput parsing errors with line numbers
BasisErrorBasis set loading/parsing errors
ScfErrorSCF convergence and calculation errors
LinalgErrorLinear algebra errors with condition numbers
IoErrorFile I/O errors with file paths
NumericalErrorNumerical issues (NaN, Inf, singularity)

Error Hierarchy

All errors implement the std::error::Error trait and provide:

  • Human-readable description
  • Source error chain (when applicable)
  • Contextual information (line numbers, file paths, condition numbers)