interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / plans / atemporal / AT0_RESULT_V1.md

145 lines · 13304 bytes Raw Blame History Source

AT0_RESULT_V1: AT-0 result interchange contract

Contract: AT0_RESULT_V1. Domain tags: omega.at0.verdict.v1 (verdict identity), omega.at0.evidence.v1 (evidence digest). Status: FROZEN on merge of the pull request that adds this file. After that, any change to this file is a contract change and requires AT0_RESULT_V2 (charter section 8). Owner: Agent 0 (charter section 7). Program status: NOT_RUN.

A result records one execution of one AT0_CASE_V1 case: the computed numbers, how precise they are, the verdict, and where everything came from. It keeps two things apart:

1. File shape

The byte rules and encodings of AT0_CASE_V1 sections 1 and 2 apply unchanged, with one addition: the f64: value token of section 2 below. Lines appear in exactly this order:

OMEGA-AT0-RESULT v1
domain omega.at0.result.v1
contract AT0_RESULT_V1
case_contract AT0_CASE_V1
case_name <name>
<the case's semantic block, byte-identical, begin semantic .. end semantic>
<the case's acceptance block, byte-identical, begin acceptance .. end acceptance>
case_id <digest>
acceptance_id <digest>
case_file_sha256 <digest>
begin numerics
arithmetic <BINARY64|BINARY64_INTERVAL|BINARY64_COMPENSATED|NONE>
bound_kind <RIGOROUS|ESTIMATED|NONE>
threads 1
end numerics
begin values
physical_state_kernel_dim <integer>
constraint_residual <value> <bound>
povm_residual <value> <bound>
label <k> <label> <DEFINED|UNDEFINED|INDETERMINATE>        (repeated, k = 0 .. M-1)
clock_probability <k> <value> <bound>                     (repeated)
pauli <k> <AXIS> <SIGN> <value> <bound>                    (repeated)
reference <k> <AXIS> <SIGN> <value> <bound>                (repeated)
end values
begin verdict
check <check_name> <PASS|FAIL|INDETERMINATE|NOT_EVALUATED> (repeated, fixed order of section 4)
outcome <PASS|FAIL|ERROR|NOT_RUN>
failure_codes <code>,<code>,... | none
error_code <code> | none
expectation_met <YES|NO|NOT_APPLICABLE>
end verdict
verdict_id <digest>
begin provenance
source_repo <owner/name>
source_commit <40 lowercase hex>
source_tree_clean <YES|NO>
contract_commit <40 lowercase hex>
engine_sha256 <digest>
oracle_repo <owner/name>
oracle_commit <40 lowercase hex>
oracle_sha256 <digest>
build_cc <text>
build_flags <text>
host <text>
run_started_utc <YYYY-MM-DDTHH:MM:SSZ>
run_finished_utc <YYYY-MM-DDTHH:MM:SSZ>
artifact <path> <digest>                                   (repeated, sorted by path bytewise; may be absent)
end provenance
evidence_digest <digest>
end

AXIS is X, Y or Z; SIGN is PLUS or MINUS. The pauli and reference lines are ordered by k, then axis X, Y, Z, then PLUS, MINUS. For a label whose status is not DEFINED, its six pauli lines carry the value token undefined and bound 0@0, and its six reference lines are still written (the reference does not depend on the label being reachable). <text> is 1 to 200 bytes of 0x20..0x7E with no leading or trailing space.

case_name, the two blocks, case_id and acceptance_id are copied from the case. A writer must refuse to emit a result whose blocks do not reproduce the copied identities.

2. Numbers in a result

3. Quantities

All quantities refer to the exact definitions in AT0_CASE_V1 section 3. Let Psi be the physical state and Psi_hat = Psi / ||Psi||.

No result field is a deviation or a sum. Those are derived by the checker from the values above (section 4), so they cannot disagree with them.

4. Checks, in this fixed order

Each comparison is decided in exact real arithmetic on the written values: a binary64 value is an exact rational and a scaled decimal is an exact rational, so a checker never compares floats. Two comparison forms are used, for a quantity v with bound b and tolerance tol. Absolute form (residuals, sums, deviations): PASS if |v| + b <= tol; FAIL if |v| - b > tol; otherwise INDETERMINATE. Signed form (range limits only): PASS if v + b <= tol; FAIL if v - b > tol; otherwise INDETERMINATE. Derived quantities carry the summed bounds of their parts. A check whose input contains nonfinite or undefined is NOT_EVALUATED for that input (check 2 and check 9 already report those cases).

#check_namequantity compared with its tolerancefailure code on FAIL
1bound_kind_sufficientbound_kind at least min_bound_kind (order NONE < ESTIMATED < RIGOROUS)BOUND_KIND_INSUFFICIENT
2values_finiteno nonfinite token anywhereNONFINITE_VALUE
3physical_state_nontrivialphysical_state_kernel_dim >= 1 and Psi nonzero (exact, no tolerance)TRIVIAL_PHYSICAL_STATE
4constraint_residualconstraint_residual vs tol_constraint_residualCONSTRAINT_RESIDUAL_EXCEEDED
5povm_normalizationpovm_residual vs tol_povm_residualPOVM_NORMALIZATION_EXCEEDED
6clock_probability_sumsum_k p(k) - 1 vs tol_probabilityPROBABILITY_SUM_EXCEEDED
7probability_rangeevery written probability p, signed form: -p vs tol_probability and p - 1 vs tol_probabilityPROBABILITY_OUT_OF_RANGE
8pauli_pair_sumfor each defined label and axis, PLUS + MINUS - 1 vs tol_probabilityPROBABILITY_SUM_EXCEEDED
9conditional_definedno label UNDEFINEDCONDITIONAL_UNDEFINED
10schrodinger_agreementfor each defined label, axis and sign, pauli - reference vs tol_schrodingerSCHRODINGER_DEVIATION_EXCEEDED

A check that cannot be evaluated because an earlier check removed its input (for example check 4 with a trivial kernel) is NOT_EVALUATED and contributes no failure code. Any INDETERMINATE check or label adds failure code PRECISION_INSUFFICIENT. A check that is FAIL for several items adds its code once.

5. Outcome, codes and expectation

Failure codes (closed set for V1): BOUND_KIND_INSUFFICIENT, CONDITIONAL_UNDEFINED, CONSTRAINT_RESIDUAL_EXCEEDED, NONFINITE_VALUE, POVM_NORMALIZATION_EXCEEDED, PRECISION_INSUFFICIENT, PROBABILITY_OUT_OF_RANGE, PROBABILITY_SUM_EXCEEDED, SCHRODINGER_DEVIATION_EXCEEDED, TRIVIAL_PHYSICAL_STATE.

Refusal codes (closed set for V1): CASE_PARSE_ERROR, CASE_NONCANONICAL, CASE_UNSUPPORTED_VERSION, CASE_INVALID_PARAMETER, CASE_IRRATIONAL_SPECTRUM, CASE_ID_MISMATCH. A case that fails AT0_CASE_V1 section 4 cannot be copied into a result, so no result file is written: the tool prints exactly one line AT0_CASE_REFUSED <code> to standard error and exits with status 2.

Run error codes (closed set for V1, written as error_code): ORACLE_UNAVAILABLE, RESOURCE_LIMIT, INTERNAL_ERROR.

expectation_met: NOT_APPLICABLE when the outcome is ERROR or NOT_RUN. Otherwise YES exactly when the outcome equals expected_outcome and failure_codes equals expected_failure_codes as a set; else NO. A negative control therefore succeeds only when it fails for the stated reasons and no others: a verifier may not normalize a discrepancy away (Postulate v1.1, "Negative controls").

6. Identity and evidence

7. Provenance rules