Download jacobian-formal/src/Core/ErrorCode.agda from Snapkitty/sov-kernel-monster: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/jacobian-formal/src/Core/ErrorCode.agda
- Command line
-
hf download hf://Snapkitty/sov-kernel-monster/jacobian-formal/src/Core/ErrorCode.agda
-
curl -L -o ErrorCode.agda https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/jacobian-formal/src/Core/ErrorCode.agda
1.9 kB
| -- BOB Quantum Kernel Error Status (WORM-sealed) | |
| -- Phase 2: Loop Invariant Formalization | |
| -- Status: Observable error codes tied to WORM logs (bookkeeping only) | |
| module Core.ErrorCode where | |
| open import Data.Nat using (β) | |
| -- Error status codes (copied from bob_errors.f90 enum) | |
| data ErrorCode : Set where | |
| BOB_SUCCESS : ErrorCode -- 0 (no error) | |
| BOB_ERROR_ALLOCATION : ErrorCode -- Memory allocation failure | |
| BOB_ERROR_INVALID_STATE : ErrorCode -- Invalid quantum state | |
| BOB_ERROR_INVALID_GATE : ErrorCode -- Invalid gate operation | |
| BOB_ERROR_NOT_UNITARY : ErrorCode -- Matrix is not unitary | |
| BOB_ERROR_INVALID_ARGUMENT : ErrorCode -- Bad argument | |
| BOB_ERROR_DIMENSION_MISMATCH : ErrorCode -- Dimension mismatch | |
| BOB_ERROR_OTHER : ErrorCode -- Other error | |
| -- Decidable equality for error codes | |
| _==β_ : ErrorCode β ErrorCode β Set | |
| BOB_SUCCESS ==β BOB_SUCCESS = Set | |
| BOB_SUCCESS ==β _ = β₯ | |
| BOB_ERROR_ALLOCATION ==β BOB_ERROR_ALLOCATION = Set | |
| BOB_ERROR_ALLOCATION ==β _ = β₯ | |
| BOB_ERROR_INVALID_STATE ==β BOB_ERROR_INVALID_STATE = Set | |
| BOB_ERROR_INVALID_STATE ==β _ = β₯ | |
| BOB_ERROR_INVALID_GATE ==β BOB_ERROR_INVALID_GATE = Set | |
| BOB_ERROR_INVALID_GATE ==β _ = β₯ | |
| BOB_ERROR_NOT_UNITARY ==β BOB_ERROR_NOT_UNITARY = Set | |
| BOB_ERROR_NOT_UNITARY ==β _ = β₯ | |
| BOB_ERROR_INVALID_ARGUMENT ==β BOB_ERROR_INVALID_ARGUMENT = Set | |
| BOB_ERROR_INVALID_ARGUMENT ==β _ = β₯ | |
| BOB_ERROR_DIMENSION_MISMATCH ==β BOB_ERROR_DIMENSION_MISMATCH = Set | |
| BOB_ERROR_DIMENSION_MISMATCH ==β _ = β₯ | |
| BOB_ERROR_OTHER ==β BOB_ERROR_OTHER = Set | |
| BOB_ERROR_OTHER ==β _ = β₯ | |
| -- Predicate: no error occurred | |
| isSuccess : ErrorCode β Set | |
| isSuccess BOB_SUCCESS = Set | |
| isSuccess _ = β₯ | |