{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://eigenosquantum.com/schemas/eql-manifest-v0.1.json",
  "title": "EQL Quantum Experiment Manifest v0.1",
  "description": "Versioned experiment manifest for timing-aware quantum network experiment provenance. Designed to interface with White Rabbit timing data without requiring WR Collaboration membership. Public domain, no fee required to use.",
  "version": "0.1.0",
  "type": "object",
  "required": [
    "manifest_version",
    "experiment_id",
    "device_versions",
    "timing_source",
    "calibration",
    "instrument_settings",
    "data_gaps",
    "reproduction"
  ],
  "properties": {
    "manifest_version": {
      "type": "string",
      "description": "EQL manifest schema version (semver)",
      "pattern": "^\\d+\\.\\d+\\.\\d+$",
      "examples": ["0.1.0"]
    },
    "experiment_id": {
      "type": "string",
      "description": "Unique experiment identifier (UUIDv4 or institution-specific)",
      "examples": ["exp-2026-10-19-pilot1-t001"]
    },
    "experiment_description": {
      "type": "string",
      "description": "Human-readable description of the experiment",
      "minLength": 10
    },
    "owner": {
      "type": "object",
      "required": ["organisation", "contact"],
      "properties": {
        "organisation": {"type": "string", "examples": ["EigenOS Quantum"]},
        "contact": {"type": "string", "format": "email", "examples": ["partnerships@eigenosquantum.com"]},
        "operator": {"type": "string", "description": "Person who ran the experiment"}
      }
    },
    "device_versions": {
      "type": "object",
      "description": "Device + firmware versions for full reproducibility",
      "required": ["device_id", "model", "firmware_version", "gateware_version"],
      "properties": {
        "device_id": {"type": "string"},
        "model": {"type": "string", "examples": ["WRS-3RU-1G", "OPNT-DAC-100"]},
        "vendor": {"type": "string", "examples": ["Seven Solutions", "OPNT", "CERN-OpenHardware"]},
        "firmware_version": {"type": "string", "examples": ["5.2.1"]},
        "gateware_version": {"type": "string", "examples": ["1.4.0"]},
        "hardware_revision": {"type": "string", "examples": ["rev-3"]},
        "serial_number": {"type": "string"}
      }
    },
    "timing_source": {
      "type": "object",
      "description": "Where timing/clock data comes from. Required for WR-aware experiments.",
      "required": ["source_type", "protocol_profile", "lock_status"],
      "properties": {
        "source_type": {
          "type": "string",
          "enum": [
            "white-rabbit-ptp",
            "ieee-1588-2019-high-accuracy",
            "ptpv2",
            "gps",
            "rubidium-clock",
            "csac",
            "synthetic-test-only",
            "none"
          ],
          "description": "Type of timing source. WR-PTP, IEEE 1588-2019, GPS, atomic clock, or synthetic for test data."
        },
        "protocol_profile": {
          "type": "string",
          "description": "Specific protocol profile (CRITICAL: WR-PTP and IEEE 1588-2019 High Accuracy are NOT protocol-compatible per WR FAQ, even on same hardware)",
          "examples": [
            "wr-spec-2.0",
            "ieee-1588-2019-default",
            "ieee-1588-2019-ha-beta",
            "ptpv2-default"
          ]
        },
        "lock_status": {
          "type": "string",
          "enum": ["locked", "tracking", "holdover", "unlocked", "unknown"],
          "description": "Whether timing source is in lock with reference"
        },
        "synchronization_accuracy_ns": {
          "type": "number",
          "description": "Measured synchronization accuracy in nanoseconds. WR spec is sub-ns; GPS is ~100ns.",
          "minimum": 0
        },
        "synchronization_precision_ps": {
          "type": "number",
          "description": "Measured synchronization precision in picoseconds (TDEV RMS)",
          "minimum": 0
        },
        "reference_clock": {
          "type": "string",
          "description": "What the timing source is locked to (e.g., UTC(VSL) for VU Amsterdam, or GPS for portable)"
        },
        "link_asymmetry_ns": {
          "type": "number",
          "description": "Calibrated link asymmetry (critical for sub-ns accuracy)"
        },
        "calibration_date": {"type": "string", "format": "date"}
      }
    },
    "calibration": {
      "type": "object",
      "description": "Calibration metadata for full reproduction",
      "properties": {
        "calibration_id": {"type": "string", "description": "Identifier of calibration dataset"},
        "calibration_date": {"type": "string", "format": "date"},
        "calibration_protocol": {"type": "string", "examples": ["single-qubit-randomized-benchmarking", "cross-entropy-benchmarking"]},
        "fidelity_metrics": {
          "type": "object",
          "description": "Per-component fidelity at calibration time",
          "additionalProperties": {"type": "number", "minimum": 0, "maximum": 1}
        },
        "drift_since_calibration_hours": {"type": "number", "minimum": 0}
      }
    },
    "instrument_settings": {
      "type": "object",
      "description": "All instrument settings during the experiment",
      "additionalProperties": true
    },
    "data_gaps": {
      "type": "array",
      "description": "Recording gaps, lost packets, or configuration changes during experiment",
      "items": {
        "type": "object",
        "required": ["start_time", "duration_seconds", "reason"],
        "properties": {
          "start_time": {"type": "string", "format": "date-time", "description": "ISO 8601 with time scale"},
          "duration_seconds": {"type": "number", "minimum": 0},
          "reason": {"type": "string", "enum": ["sync-loss", "packet-loss", "config-change", "calibration-interrupt", "power-event", "scheduled", "other"]},
          "description": {"type": "string"}
        }
      }
    },
    "configuration_changes": {
      "type": "array",
      "description": "Any configuration changes during the experiment (firmware reload, parameter change, etc.)",
      "items": {
        "type": "object",
        "required": ["timestamp", "change_type", "before", "after"],
        "properties": {
          "timestamp": {"type": "string", "format": "date-time"},
          "change_type": {"type": "string"},
          "before": {"type": "object", "additionalProperties": true},
          "after": {"type": "object", "additionalProperties": true}
        }
      }
    },
    "timestamp_metadata": {
      "type": "object",
      "description": "Metadata about how timestamps are encoded in the data",
      "required": ["time_scale"],
      "properties": {
        "time_scale": {
          "type": "string",
          "enum": ["TAI", "UTC", "GPS-time", "local", "experiment-clock", "synthetic"],
          "description": "Time scale used for all timestamps in this experiment"
        },
        "leap_seconds_handling": {"type": "string"},
        "timestamp_resolution_ns": {"type": "number", "minimum": 0}
      }
    },
    "uncertainty_estimates": {
      "type": "object",
      "description": "Where available, measurement uncertainty estimates",
      "properties": {
        "synchronization_uncertainty_ns": {"type": "number", "minimum": 0},
        "fidelity_uncertainty": {"type": "number", "minimum": 0, "maximum": 1},
        "measurement_count_uncertainty": {"type": "number", "minimum": 0}
      }
    },
    "reproduction": {
      "type": "object",
      "description": "Reproduction instructions and limitations",
      "required": ["instructions_url", "limitations"],
      "properties": {
        "instructions_url": {"type": "format": "uri", "description": "URL to reproduction guide"},
        "code_repository": {"type": "format": "uri"},
        "data_availability": {"type": "string", "enum": ["public", "on-request", "embargoed", "private", "synthetic-only"]},
        "limitations": {"type": "string", "description": "Known limitations, hardware constraints, etc."}
      }
    },
    "eql_modules_used": {
      "type": "array",
      "description": "Which EigenOS modules were used in this experiment",
      "items": {
        "type": "string",
        "enum": ["BSaaS", "T5.4", "QORCH", "QUOTA", "Discovery", "EQL", "UCS", "PCAI", "EQML"]
      }
    },
    "results_summary": {
      "type": "object",
      "description": "Optional summary of key results (for paper-ready artifacts)",
      "properties": {
        "primary_metric": {"type": "string"},
        "primary_metric_value": {"type": "number"},
        "primary_metric_uncertainty": {"type": "number"},
        "n_shots": {"type": "number", "minimum": 0},
        "experiment_duration_seconds": {"type": "number", "minimum": 0},
        "p_value": {"type": "number", "minimum": 0, "maximum": 1}
      }
    }
  },
  "examples": [
    {
      "manifest_version": "0.1.0",
      "experiment_id": "exp-2026-11-15-pilot1-t001",
      "experiment_description": "Pilot 1 timing-aware provenance: simulate WR-PTP sync loss during entanglement distribution, measure effect on event matching yield",
      "owner": {
        "organisation": "EigenOS Quantum",
        "contact": "partnerships@eigenosquantum.com",
        "operator": "Nicks Seringian"
      },
      "device_versions": {
        "device_id": "wrs-sim-001",
        "model": "WRS-3RU-1G",
        "vendor": "Seven Solutions",
        "firmware_version": "5.2.1",
        "gateware_version": "1.4.0",
        "hardware_revision": "rev-3",
        "serial_number": "synthetic-001"
      },
      "timing_source": {
        "source_type": "white-rabbit-ptp",
        "protocol_profile": "wr-spec-2.0",
        "lock_status": "locked",
        "synchronization_accuracy_ns": 0.5,
        "synchronization_precision_ps": 12,
        "reference_clock": "synthetic-UTC",
        "link_asymmetry_ns": 0,
        "calibration_date": "2026-10-19"
      },
      "calibration": {
        "calibration_id": "cal-2026-10-19-pilot1",
        "calibration_date": "2026-10-19",
        "calibration_protocol": "synthetic-RB",
        "fidelity_metrics": {
          "single_qubit_avg": 0.999,
          "two_qubit_avg": 0.985
        },
        "drift_since_calibration_hours": 0
      },
      "instrument_settings": {
        "photon_source_rate_hz": 80000000,
        "detector_efficiency": 0.85,
        "filter_bandwidth_nm": 1.2,
        "exposure_ms": 100
      },
      "data_gaps": [
        {
          "start_time": "2026-11-15T10:30:00Z",
          "duration_seconds": 5.0,
          "reason": "sync-loss",
          "description": "Injected sync loss to test detection capability"
        }
      ],
      "configuration_changes": [],
      "timestamp_metadata": {
        "time_scale": "TAI",
        "leap_seconds_handling": "applied",
        "timestamp_resolution_ns": 1
      },
      "uncertainty_estimates": {
        "synchronization_uncertainty_ns": 0.5,
        "fidelity_uncertainty": 0.003,
        "measurement_count_uncertainty": 100
      },
      "reproduction": {
        "instructions_url": "https://github.com/eigenos-quantum/pilot1-timing-aware-provenance/blob/main/README.md",
        "code_repository": "https://github.com/eigenos-quantum/pilot1-timing-aware-provenance",
        "data_availability": "synthetic-only",
        "limitations": "SYNTHETIC DATA ONLY in v0.1. Real hardware validation requires WR member partner or shared testbed."
      },
      "eql_modules_used": ["EQL", "BSaaS", "T5.4"],
      "results_summary": {
        "primary_metric": "valid_event_yield",
        "primary_metric_value": 0.91,
        "primary_metric_uncertainty": 0.01,
        "n_shots": 10000,
        "experiment_duration_seconds": 300,
        "p_value": 0.001
      }
    }
  ],
  "$comment": "EigenOS EQL Manifest v0.1 - Public Domain - Free to use. Designed to provide timing-aware provenance for quantum network experiments WITHOUT requiring White Rabbit Collaboration membership. WR can be used under LGPL-2.1+ without joining. The 'timing_source.protocol_profile' field explicitly distinguishes WR-PTP from IEEE 1588-2019 High Accuracy (which are NOT protocol-compatible per WR FAQ). Atlas 19.10.26."
}
