Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions | Variables
end_to_end_trace_validation Namespace Reference

Functions

def _enrich_end_to_end_case (case, workflow_contract)
 
def _enrich_trace_artifact (trace_artifact, workflow_contract)
 
def _extract_mandatory_cases (workflow_bundle, workflow_contract)
 
def _load_json
 
def _load_workflow_contract
 
def build_artifact_bundle (workflow_contract, workflow_bundle, trace_artifact)
 
def build_case_identity_summary (cases, mandatory_case_names, mandatory_qubits)
 
def build_mandatory_end_to_end_case_names (workflow_contract)
 
def build_requirement_metadata (workflow_contract)
 
def build_threshold_metadata (workflow_contract, workflow_bundle)
 
def get_required_end_to_end_qubits (workflow_contract)
 
def get_required_trace_case_name (workflow_contract)
 
def main ()
 
def parse_args ()
 
def run_validation
 
def validate_artifact_bundle (bundle)
 
def validate_end_to_end_case_payload (case)
 
def validate_trace_artifact (trace_artifact)
 
def write_artifact_bundle
 

Variables

tuple ARTIFACT_CORE_FIELDS
 
string ARTIFACT_FILENAME = "end_to_end_trace_bundle.json"
 
string CANONICAL_END_TO_END_PARAMETER_SET_ID = "set_00"
 
 DEFAULT_OUTPUT_DIR = WORKFLOW_EVIDENCE_OUTPUT_DIR
 
tuple MANDATORY_END_TO_END_CASE_NAMES = ("exact_regime_4q_set_00", "exact_regime_6q_set_00")
 
tuple MANDATORY_END_TO_END_QUBITS = (4, 6)
 
 REPO_ROOT = Path(__file__).resolve().parents[3]
 
string SUITE_NAME = "end_to_end_trace_validation"
 
string TRACE_CASE_NAME = "optimization_trace_4q"
 
tuple VALIDATION_TRACE_ARTIFACT_PATH
 
tuple VALIDATION_WORKFLOW_BASELINE_PATH
 
 WORKFLOW_CONTRACT_PATH = DEFAULT_OUTPUT_DIR / WORKFLOW_CONTRACT_ARTIFACT_FILENAME
 

Detailed Description

Validation: end-to-end workflow plus trace gate.

Builds the end-to-end execution gate from:
- the emitted canonical workflow contract,
- the committed validation workflow baseline bundle, from which the canonical 4q
  and 6q end-to-end cases are selected,
- and the committed validation trace artifact.

This layer is intentionally thin:
- it freezes one 4q case, one 6q case, and one required trace as the mandatory
  gate,
- it ties those evidence items to the workflow-contract identity,
- and it makes missing or malformed required evidence fail explicitly.

Run with:
    python benchmarks/density_matrix/workflow_evidence/end_to_end_trace_validation.py

Function Documentation

◆ _enrich_end_to_end_case()

def end_to_end_trace_validation._enrich_end_to_end_case (   case,
  workflow_contract 
)
private

Definition at line 262 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ _enrich_trace_artifact()

def end_to_end_trace_validation._enrich_trace_artifact (   trace_artifact,
  workflow_contract 
)
private

Definition at line 271 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ _extract_mandatory_cases()

def end_to_end_trace_validation._extract_mandatory_cases (   workflow_bundle,
  workflow_contract 
)
private

Definition at line 280 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _load_json()

def end_to_end_trace_validation._load_json (   path)
private

Definition at line 87 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ _load_workflow_contract()

def end_to_end_trace_validation._load_workflow_contract (   path)
private

Definition at line 91 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_artifact_bundle()

def end_to_end_trace_validation.build_artifact_bundle (   workflow_contract,
  workflow_bundle,
  trace_artifact 
)

Definition at line 293 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_case_identity_summary()

def end_to_end_trace_validation.build_case_identity_summary (   cases,
  mandatory_case_names,
  mandatory_qubits 
)

Definition at line 225 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ build_mandatory_end_to_end_case_names()

def end_to_end_trace_validation.build_mandatory_end_to_end_case_names (   workflow_contract)

Definition at line 110 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_requirement_metadata()

def end_to_end_trace_validation.build_requirement_metadata (   workflow_contract)

Definition at line 117 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_threshold_metadata()

def end_to_end_trace_validation.build_threshold_metadata (   workflow_contract,
  workflow_bundle 
)

Definition at line 136 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_required_end_to_end_qubits()

def end_to_end_trace_validation.get_required_end_to_end_qubits (   workflow_contract)

Definition at line 100 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ get_required_trace_case_name()

def end_to_end_trace_validation.get_required_trace_case_name (   workflow_contract)

Definition at line 104 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ main()

def end_to_end_trace_validation.main ( )

Definition at line 567 of file end_to_end_trace_validation.py.

Here is the call graph for this function:

◆ parse_args()

def end_to_end_trace_validation.parse_args ( )

Definition at line 533 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ run_validation()

def end_to_end_trace_validation.run_validation (   workflow_contract_path)

Definition at line 511 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_artifact_bundle()

def end_to_end_trace_validation.validate_artifact_bundle (   bundle)

Definition at line 435 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ validate_end_to_end_case_payload()

def end_to_end_trace_validation.validate_end_to_end_case_payload (   case)

Definition at line 162 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ validate_trace_artifact()

def end_to_end_trace_validation.validate_trace_artifact (   trace_artifact)

Definition at line 194 of file end_to_end_trace_validation.py.

Here is the caller graph for this function:

◆ write_artifact_bundle()

def end_to_end_trace_validation.write_artifact_bundle (   output_path)

Definition at line 501 of file end_to_end_trace_validation.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ARTIFACT_CORE_FIELDS

tuple end_to_end_trace_validation.ARTIFACT_CORE_FIELDS
Initial value:
1 = (
2  "suite_name",
3  "status",
4  "workflow_id",
5  "contract_version",
6  "backend",
7  "reference_backend",
8  "requirements",
9  "thresholds",
10  "software",
11  "provenance",
12  "summary",
13  "required_artifacts",
14  "cases",
15  "trace_artifact",
16 )

Definition at line 69 of file end_to_end_trace_validation.py.

◆ ARTIFACT_FILENAME

string end_to_end_trace_validation.ARTIFACT_FILENAME = "end_to_end_trace_bundle.json"

Definition at line 46 of file end_to_end_trace_validation.py.

◆ CANONICAL_END_TO_END_PARAMETER_SET_ID

string end_to_end_trace_validation.CANONICAL_END_TO_END_PARAMETER_SET_ID = "set_00"

Definition at line 68 of file end_to_end_trace_validation.py.

◆ DEFAULT_OUTPUT_DIR

end_to_end_trace_validation.DEFAULT_OUTPUT_DIR = WORKFLOW_EVIDENCE_OUTPUT_DIR

Definition at line 47 of file end_to_end_trace_validation.py.

◆ MANDATORY_END_TO_END_CASE_NAMES

tuple end_to_end_trace_validation.MANDATORY_END_TO_END_CASE_NAMES = ("exact_regime_4q_set_00", "exact_regime_6q_set_00")

Definition at line 65 of file end_to_end_trace_validation.py.

◆ MANDATORY_END_TO_END_QUBITS

tuple end_to_end_trace_validation.MANDATORY_END_TO_END_QUBITS = (4, 6)

Definition at line 66 of file end_to_end_trace_validation.py.

◆ REPO_ROOT

end_to_end_trace_validation.REPO_ROOT = Path(__file__).resolve().parents[3]

Definition at line 28 of file end_to_end_trace_validation.py.

◆ SUITE_NAME

string end_to_end_trace_validation.SUITE_NAME = "end_to_end_trace_validation"

Definition at line 45 of file end_to_end_trace_validation.py.

◆ TRACE_CASE_NAME

string end_to_end_trace_validation.TRACE_CASE_NAME = "optimization_trace_4q"

Definition at line 67 of file end_to_end_trace_validation.py.

◆ VALIDATION_TRACE_ARTIFACT_PATH

tuple end_to_end_trace_validation.VALIDATION_TRACE_ARTIFACT_PATH
Initial value:
1 = (
2  REPO_ROOT
3  / "benchmarks"
4  / "density_matrix"
5  / "artifacts"
6  / "validation_evidence"
7  / "optimization_trace_4q.json"
8 )

Definition at line 57 of file end_to_end_trace_validation.py.

◆ VALIDATION_WORKFLOW_BASELINE_PATH

tuple end_to_end_trace_validation.VALIDATION_WORKFLOW_BASELINE_PATH
Initial value:
1 = (
2  REPO_ROOT
3  / "benchmarks"
4  / "density_matrix"
5  / "artifacts"
6  / "validation_evidence"
7  / "workflow_baseline_bundle.json"
8 )

Definition at line 49 of file end_to_end_trace_validation.py.

◆ WORKFLOW_CONTRACT_PATH

end_to_end_trace_validation.WORKFLOW_CONTRACT_PATH = DEFAULT_OUTPUT_DIR / WORKFLOW_CONTRACT_ARTIFACT_FILENAME

Definition at line 48 of file end_to_end_trace_validation.py.