| |
| |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| export enum ArtifactType {
|
| FortranModule = "FortranModule",
|
| CmmModule = "CmmModule",
|
| MLIRModule = "MLIRModule",
|
| LLVMModule = "LLVMModule",
|
| PulseSchedule = "PulseSchedule",
|
| IsabelleTheorem = "IsabelleTheorem",
|
| ProofCertificate = "ProofCertificate",
|
| ConfigFile = "ConfigFile",
|
| BinaryELF = "BinaryELF",
|
| WASMModule = "WASMModule",
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export type VerificationStatus =
|
| | "Unverified"
|
| | "TypeChecked"
|
| | { Alive2Verified: string[] }
|
| | "IsabelleProven"
|
| | "QuantumValidated";
|
|
|
|
|
|
|
|
|
|
|
| export enum Realm {
|
| Hamiltonian = "Hamiltonian",
|
| Trotter = "Trotter",
|
| Pulse = "Pulse",
|
| Verification = "Verification",
|
| QuantumIR = "QuantumIR",
|
| Runtime = "Runtime",
|
| WORM = "WORM",
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface QuantumProperties {
|
| entanglementEntropy?: number;
|
| fidelity?: number;
|
| purity?: number;
|
| correlationLength?: number;
|
| energyExpectation?: number;
|
| phDecay?: number;
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface ArtifactMetadata {
|
| timestamp: number;
|
| team: string;
|
| verificationStatus: VerificationStatus;
|
| quantumProps: QuantumProperties;
|
| sizeBytes: number;
|
| isImmutable: boolean;
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface QArtifact {
|
| hash: string;
|
| type: ArtifactType;
|
| realm: Realm;
|
| team: string;
|
| content: Uint8Array | string;
|
| metadata: ArtifactMetadata;
|
| dependencies: Map<string, string>;
|
| wormAnchor?: string;
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface WORMTx {
|
| hash: string;
|
| timestamp: number;
|
| signature: string;
|
| artifactType: ArtifactType;
|
| height: number;
|
| }
|
|
|
| export interface WORMChain {
|
| genesis: WORMTx;
|
| blocks: WORMTx[];
|
| height: number;
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface ArtifactStore {
|
| artifacts: Map<string, QArtifact>;
|
| wormChain: WORMChain;
|
| proofCache: Map<string, boolean>;
|
| capabilityStore: Map<string, Permission>;
|
| }
|
|
|
| export enum Permission {
|
| Read = "Read",
|
| Write = "Write",
|
| Verify = "Verify",
|
| Calibrate = "Calibrate",
|
| Deploy = "Deploy",
|
| Attest = "Attest",
|
| Admin = "Admin",
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export enum PipelineStage {
|
| Fortran = "Fortran",
|
| Cmm = "Cmm",
|
| MLIR = "MLIR",
|
| LLVM = "LLVM",
|
| Alive2 = "Alive2",
|
| Isabelle = "Isabelle",
|
| QuantumVerify = "QuantumVerify",
|
| PulseCompile = "PulseCompile",
|
| WASM = "WASM",
|
| Native = "Native",
|
| Custom = "Custom",
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface QPManifest {
|
| version: string;
|
| name: string;
|
| stages: PipelineStageConfig[];
|
| inputs: ArtifactReference[];
|
| outputs: ArtifactReference[];
|
| wormAttest: boolean;
|
| timeout: number;
|
| }
|
|
|
| export interface PipelineStageConfig {
|
| stage: PipelineStage;
|
| enabled: boolean;
|
| config: Record<string, unknown>;
|
| }
|
|
|
| export interface ArtifactReference {
|
| name: string;
|
| hash: string;
|
| type: ArtifactType;
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface Claim {
|
| level: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
| property: string;
|
| proven: boolean;
|
| }
|
|
|
| export interface RefinementType {
|
| base: string;
|
| predicate: string;
|
| claims: Claim[];
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface IsabelleSession {
|
| sessionId: string;
|
| workdir: string;
|
| theorems: Map<string, IsabelleProof>;
|
| }
|
|
|
| export interface IsabelleProof {
|
| theorem: string;
|
| proof: string;
|
| status: "Unproven" | "Pending" | "Success" | "Failed";
|
| timestamp: number;
|
| }
|
|
|
| export interface GraniteModel {
|
| modelId: string;
|
| version: string;
|
| context: number;
|
| vocabSize: number;
|
| quantization: "Q4_K" | "Q8_0" | "F16" | "BF16" | "F32";
|
| parameters: Record<string, unknown>;
|
| }
|
|
|
| export interface WebGPUDevice {
|
| deviceId: string;
|
| backend: "Metal" | "Vulkan" | "DirectX12" | "OpenGL";
|
| maxComputeWorkgroups: [number, number, number];
|
| maxWorkgroupSize: number;
|
| }
|
|
|
| export interface TerminalSession {
|
| sessionId: string;
|
| rows: number;
|
| cols: number;
|
| backend: "WinConsole" | "UnixPTY" | "VirtualTerminal";
|
| history: string[];
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface QuantumGovernance {
|
| stateTransitions: Map<string, string>;
|
| capabilityTokens: Map<string, Permission>;
|
| quantumMonad: RefinementType;
|
| }
|
|
|
| export interface ResonanceGraph {
|
| vertices: Map<string, unknown>;
|
| edges: Array<[string, string]>;
|
| phi: number;
|
| topologicalOrder: string[];
|
| }
|
|
|
|
|
|
|
|
|
|
|
| export interface ArtifactPipeline {
|
| manifest: QPManifest;
|
| store: ArtifactStore;
|
| wormChain: WORMChain;
|
| stages: Map<PipelineStage, QArtifact[]>;
|
| finalArtifact: QArtifact;
|
| }
|
|
|