Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
evidence_io.py
Go to the documentation of this file.
1 """Lightweight JSON artifact helpers for density-matrix evidence (no runtime imports)."""
2 
3 from __future__ import annotations
4 
5 import json
6 from pathlib import Path
7 from typing import Any
8 
9 
11  bundle: dict[str, Any], output_dir: Path, artifact_filename: str
12 ) -> Path:
13  output_dir.mkdir(parents=True, exist_ok=True)
14  output_path = output_dir / artifact_filename
15  output_path.write_text(json.dumps(bundle, indent=2, sort_keys=True) + "\n")
16  return output_path
def write_artifact_bundle
Definition: evidence_io.py:11