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

Functions

def _augment_backend_mismatch_case (raw_case)
 
def _enrich_case (case)
 
def _load_end_to_end_trace_bundle
 
def _load_json
 
def _load_matrix_baseline_bundle
 
def _load_workflow_contract
 
def build_artifact_bundle (workflow_contract, end_to_end_trace_bundle, matrix_baseline_bundle, unsupported_noise_bundle, backend_mismatch_case)
 
def build_requirement_metadata (unsupported_noise_bundle, workflow_contract)
 
def get_required_unsupported_case_fields (workflow_contract)
 
def main ()
 
def parse_args ()
 
def run_validation
 
def validate_artifact_bundle (bundle)
 
def validate_case_payload (case, required_fields)
 
def write_artifact_bundle
 

Variables

tuple ARTIFACT_CORE_FIELDS
 
string ARTIFACT_FILENAME = "unsupported_workflow_bundle.json"
 
string BACKEND_MISMATCH_CASE_NAME = "unsupported_state_vector_density_noise"
 
tuple BACKEND_MISMATCH_CASE_PATH
 
 DEFAULT_OUTPUT_DIR = WORKFLOW_EVIDENCE_OUTPUT_DIR
 
 END_TO_END_TRACE_BUNDLE_PATH = DEFAULT_OUTPUT_DIR / END_TO_END_TRACE_ARTIFACT_FILENAME
 
 MATRIX_BASELINE_BUNDLE_PATH = DEFAULT_OUTPUT_DIR / MATRIX_BASELINE_ARTIFACT_FILENAME
 
 REPO_ROOT = Path(__file__).resolve().parents[3]
 
string SUITE_NAME = "unsupported_workflow_validation"
 
tuple UNSUPPORTED_NOISE_BUNDLE_PATH
 
 WORKFLOW_CONTRACT_PATH = DEFAULT_OUTPUT_DIR / WORKFLOW_CONTRACT_ARTIFACT_FILENAME
 

Detailed Description

Validation: unsupported workflow boundaries.

Builds the unsupported-boundary evidence layer from:
- the emitted canonical workflow contract,
- the emitted end-to-end trace bundle,
- the emitted matrix baseline bundle,
- the committed unsupported/deferred noise bundle,
- and the committed backend-mismatch unsupported case.

This layer is intentionally thin:
- it keeps unsupported and deferred cases explicit and machine-readable,
- it binds them to the same canonical workflow identity as the positive-path
  bundles,
- and it fails explicitly when negative evidence is incomplete or ambiguous.

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

Function Documentation

◆ _augment_backend_mismatch_case()

def unsupported_workflow_validation._augment_backend_mismatch_case (   raw_case)
private

Definition at line 169 of file unsupported_workflow_validation.py.

Here is the caller graph for this function:

◆ _enrich_case()

def unsupported_workflow_validation._enrich_case (   case)
private

Definition at line 192 of file unsupported_workflow_validation.py.

Here is the caller graph for this function:

◆ _load_end_to_end_trace_bundle()

def unsupported_workflow_validation._load_end_to_end_trace_bundle (   path)
private

Definition at line 112 of file unsupported_workflow_validation.py.

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

◆ _load_json()

def unsupported_workflow_validation._load_json (   path)
private

Definition at line 99 of file unsupported_workflow_validation.py.

Here is the caller graph for this function:

◆ _load_matrix_baseline_bundle()

def unsupported_workflow_validation._load_matrix_baseline_bundle (   path)
private

Definition at line 121 of file unsupported_workflow_validation.py.

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

◆ _load_workflow_contract()

def unsupported_workflow_validation._load_workflow_contract (   path)
private

Definition at line 103 of file unsupported_workflow_validation.py.

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

◆ build_artifact_bundle()

def unsupported_workflow_validation.build_artifact_bundle (   workflow_contract,
  end_to_end_trace_bundle,
  matrix_baseline_bundle,
  unsupported_noise_bundle,
  backend_mismatch_case 
)

Definition at line 217 of file unsupported_workflow_validation.py.

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

◆ build_requirement_metadata()

def unsupported_workflow_validation.build_requirement_metadata (   unsupported_noise_bundle,
  workflow_contract 
)

Definition at line 134 of file unsupported_workflow_validation.py.

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

◆ get_required_unsupported_case_fields()

def unsupported_workflow_validation.get_required_unsupported_case_fields (   workflow_contract)

Definition at line 130 of file unsupported_workflow_validation.py.

Here is the caller graph for this function:

◆ main()

def unsupported_workflow_validation.main ( )

Definition at line 494 of file unsupported_workflow_validation.py.

Here is the call graph for this function:

◆ parse_args()

def unsupported_workflow_validation.parse_args ( )

Definition at line 448 of file unsupported_workflow_validation.py.

Here is the caller graph for this function:

◆ run_validation()

def unsupported_workflow_validation.run_validation (   workflow_contract_path)

Definition at line 408 of file unsupported_workflow_validation.py.

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

◆ validate_artifact_bundle()

def unsupported_workflow_validation.validate_artifact_bundle (   bundle)

Definition at line 363 of file unsupported_workflow_validation.py.

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

◆ validate_case_payload()

def unsupported_workflow_validation.validate_case_payload (   case,
  required_fields 
)

Definition at line 201 of file unsupported_workflow_validation.py.

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

◆ write_artifact_bundle()

def unsupported_workflow_validation.write_artifact_bundle (   output_path)

Definition at line 398 of file unsupported_workflow_validation.py.

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

Variable Documentation

◆ ARTIFACT_CORE_FIELDS

tuple unsupported_workflow_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 )

Definition at line 82 of file unsupported_workflow_validation.py.

◆ ARTIFACT_FILENAME

string unsupported_workflow_validation.ARTIFACT_FILENAME = "unsupported_workflow_bundle.json"

Definition at line 60 of file unsupported_workflow_validation.py.

◆ BACKEND_MISMATCH_CASE_NAME

string unsupported_workflow_validation.BACKEND_MISMATCH_CASE_NAME = "unsupported_state_vector_density_noise"

Definition at line 81 of file unsupported_workflow_validation.py.

◆ BACKEND_MISMATCH_CASE_PATH

tuple unsupported_workflow_validation.BACKEND_MISMATCH_CASE_PATH
Initial value:
1 = (
2  REPO_ROOT
3  / "benchmarks"
4  / "density_matrix"
5  / "artifacts"
6  / "exact_density_validation"
7  / "unsupported_state_vector_density_noise.json"
8 )

Definition at line 73 of file unsupported_workflow_validation.py.

◆ DEFAULT_OUTPUT_DIR

unsupported_workflow_validation.DEFAULT_OUTPUT_DIR = WORKFLOW_EVIDENCE_OUTPUT_DIR

Definition at line 61 of file unsupported_workflow_validation.py.

◆ END_TO_END_TRACE_BUNDLE_PATH

unsupported_workflow_validation.END_TO_END_TRACE_BUNDLE_PATH = DEFAULT_OUTPUT_DIR / END_TO_END_TRACE_ARTIFACT_FILENAME

Definition at line 63 of file unsupported_workflow_validation.py.

◆ MATRIX_BASELINE_BUNDLE_PATH

unsupported_workflow_validation.MATRIX_BASELINE_BUNDLE_PATH = DEFAULT_OUTPUT_DIR / MATRIX_BASELINE_ARTIFACT_FILENAME

Definition at line 64 of file unsupported_workflow_validation.py.

◆ REPO_ROOT

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

Definition at line 29 of file unsupported_workflow_validation.py.

◆ SUITE_NAME

string unsupported_workflow_validation.SUITE_NAME = "unsupported_workflow_validation"

Definition at line 59 of file unsupported_workflow_validation.py.

◆ UNSUPPORTED_NOISE_BUNDLE_PATH

tuple unsupported_workflow_validation.UNSUPPORTED_NOISE_BUNDLE_PATH
Initial value:
1 = (
2  REPO_ROOT
3  / "benchmarks"
4  / "density_matrix"
5  / "artifacts"
6  / "noise_support"
7  / "unsupported_noise_bundle.json"
8 )

Definition at line 65 of file unsupported_workflow_validation.py.

◆ WORKFLOW_CONTRACT_PATH

unsupported_workflow_validation.WORKFLOW_CONTRACT_PATH = DEFAULT_OUTPUT_DIR / WORKFLOW_CONTRACT_ARTIFACT_FILENAME

Definition at line 62 of file unsupported_workflow_validation.py.