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

Functions

def _build_validation_bundle_artifact_entry (artifact_id, artifact_class, mandatory, path, status, expected_statuses, purpose, generation_command, summary=None)
 
def build_case_metadata
 
def build_exact_density_validation_bundle
 
def build_exact_regime_bridge_metadata
 
def build_exact_regime_parameter_sets
 
def build_exact_regime_threshold_metadata
 
def build_exact_regime_workflow_bundle
 
def build_hamiltonian_metadata ()
 
def build_initial_parameters
 
def build_open_chain_topology
 
def build_optimizer_config ()
 
def build_reference_bridge_metadata (vqe)
 
def build_reference_noise ()
 
def build_software_metadata ()
 
def build_squander_density_from_qiskit_circuit (base_circuit, density_noise)
 
def build_unsupported_state_vector_density_noise_vqe
 
def build_vqe
 
def capture_case
 
def capture_exact_regime_workflow_case
 
def classify_bridge_unsupported_reason
 
def density_energy (hamiltonian, density_matrix)
 
def generate_exact_density_validation_bundle
 
def get_git_revision ()
 
def insert_reference_noise
 
def main ()
 
def print_exact_density_validation_bundle_summary (bundle)
 
def print_exact_regime_workflow_summary (bundle)
 
def run_exact_regime_workflow_case
 
def run_exact_regime_workflow_matrix
 
def run_fixed_parameter_case
 
def run_optimization_trace ()
 
def run_unsupported_state_vector_density_noise_case ()
 
def trace_distance
 
def validate_artifact_payload (payload)
 
def validate_exact_density_validation_bundle
 
def validate_exact_regime_workflow_bundle (bundle)
 
def write_exact_density_validation_bundle
 
def write_exact_regime_workflow_bundle
 
def write_json
 

Variables

tuple ARTIFACT_CORE_FIELDS
 
string DEFAULT_ANSATZ = "HEA"
 
int DEFAULT_INNER_BLOCKS = 1
 
int DEFAULT_LAYERS = 1
 
tuple EXACT_DENSITY_VALIDATION_BUNDLE_FIELDS
 
string EXACT_DENSITY_VALIDATION_BUNDLE_FILENAME = "exact_density_validation_bundle.json"
 
int EXACT_REGIME_OBSERVABLE_IMAG_TOL = 1e-10
 
int EXACT_REGIME_PARAMETER_SET_COUNT = 10
 
int EXACT_REGIME_TRACE_TOL = 1e-10
 
int EXACT_REGIME_VALIDITY_TOL = 1e-10
 
tuple EXACT_REGIME_WORKFLOW_BUNDLE_FIELDS
 
string EXACT_REGIME_WORKFLOW_BUNDLE_FILENAME = "exact_regime_workflow_bundle.json"
 
int EXACT_REGIME_WORKFLOW_ERROR_TOL = 1e-8
 
tuple EXACT_REGIME_WORKFLOW_QUBITS = (4, 6, 8, 10)
 
tuple FIXED_PARAMETER_QUBITS = (4, 6)
 
string OPTIMIZATION_TRACE_ARTIFACT_FILENAME = "optimization_trace_4q.json"
 
string PRIMARY_BACKEND = "density_matrix"
 
string REFERENCE_BACKEND = "qiskit_aer_density_matrix"
 
 REPO_ROOT = Path(__file__).resolve().parents[3]
 
dictionary REQUIRED_BRIDGE_GATE_NAMES = {"U3", "CNOT"}
 
dictionary REQUIRED_BRIDGE_NOISE_NAMES
 
dictionary SUPPORTED_BACKEND_LABELS = {PRIMARY_BACKEND, "state_vector"}
 

Detailed Description

Exact-density VQE validation for canonical anchor cases.

Runs the foundational exact density-matrix evidence used by the higher-level
Phase 2 bundles:
- fixed-parameter 4-qubit and 6-qubit XXZ anchor comparisons against Qiskit Aer,
- one bounded 4-qubit density-backed optimization trace,
- an exact-regime workflow matrix,
- and a compact validation bundle tying those artifacts together.

Unsupported cases are emitted as structured negative evidence instead of
crashing or silently disappearing.

Function Documentation

◆ _build_validation_bundle_artifact_entry()

def exact_density_vqe_validation._build_validation_bundle_artifact_entry (   artifact_id,
  artifact_class,
  mandatory,
  path,
  status,
  expected_statuses,
  purpose,
  generation_command,
  summary = None 
)
private

Definition at line 872 of file exact_density_vqe_validation.py.

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

◆ build_case_metadata()

def exact_density_vqe_validation.build_case_metadata (   backend)

Definition at line 222 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_exact_density_validation_bundle()

def exact_density_vqe_validation.build_exact_density_validation_bundle (   output_dir)

Definition at line 887 of file exact_density_vqe_validation.py.

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

◆ build_exact_regime_bridge_metadata()

def exact_density_vqe_validation.build_exact_regime_bridge_metadata (   vqe,
  execution_ready 
)

Definition at line 383 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_exact_regime_parameter_sets()

def exact_density_vqe_validation.build_exact_regime_parameter_sets (   param_num)

Definition at line 189 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_exact_regime_threshold_metadata()

def exact_density_vqe_validation.build_exact_regime_threshold_metadata (   qubit_sizes = EXACT_REGIME_WORKFLOW_QUBITS,
  parameter_set_count 
)

Definition at line 175 of file exact_density_vqe_validation.py.

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

◆ build_exact_regime_workflow_bundle()

def exact_density_vqe_validation.build_exact_regime_workflow_bundle (   results,
  qubit_sizes = EXACT_REGIME_WORKFLOW_QUBITS,
  parameter_set_count 
)

Definition at line 722 of file exact_density_vqe_validation.py.

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

◆ build_hamiltonian_metadata()

def exact_density_vqe_validation.build_hamiltonian_metadata ( )

Definition at line 155 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_initial_parameters()

def exact_density_vqe_validation.build_initial_parameters (   param_num)

Definition at line 151 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_open_chain_topology()

def exact_density_vqe_validation.build_open_chain_topology (   qbit_num)

Definition at line 139 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_optimizer_config()

def exact_density_vqe_validation.build_optimizer_config ( )

Definition at line 143 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_reference_bridge_metadata()

def exact_density_vqe_validation.build_reference_bridge_metadata (   vqe)

Definition at line 304 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_reference_noise()

def exact_density_vqe_validation.build_reference_noise ( )

Definition at line 116 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ build_software_metadata()

def exact_density_vqe_validation.build_software_metadata ( )

Definition at line 164 of file exact_density_vqe_validation.py.

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

◆ build_squander_density_from_qiskit_circuit()

def exact_density_vqe_validation.build_squander_density_from_qiskit_circuit (   base_circuit,
  density_noise 
)

Definition at line 496 of file exact_density_vqe_validation.py.

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

◆ build_unsupported_state_vector_density_noise_vqe()

def exact_density_vqe_validation.build_unsupported_state_vector_density_noise_vqe (   qbit_num)

Definition at line 421 of file exact_density_vqe_validation.py.

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

◆ build_vqe()

def exact_density_vqe_validation.build_vqe (   qbit_num)

Definition at line 274 of file exact_density_vqe_validation.py.

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

◆ capture_case()

def exact_density_vqe_validation.capture_case (   case_name)

Definition at line 1278 of file exact_density_vqe_validation.py.

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

◆ capture_exact_regime_workflow_case()

def exact_density_vqe_validation.capture_exact_regime_workflow_case (   qbit_num)

Definition at line 656 of file exact_density_vqe_validation.py.

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

◆ classify_bridge_unsupported_reason()

def exact_density_vqe_validation.classify_bridge_unsupported_reason (   reason)

Definition at line 325 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ density_energy()

def exact_density_vqe_validation.density_energy (   hamiltonian,
  density_matrix 
)

Definition at line 485 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ generate_exact_density_validation_bundle()

def exact_density_vqe_validation.generate_exact_density_validation_bundle (   output_dir)

Definition at line 1114 of file exact_density_vqe_validation.py.

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

◆ get_git_revision()

def exact_density_vqe_validation.get_git_revision ( )

Definition at line 206 of file exact_density_vqe_validation.py.

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

◆ insert_reference_noise()

def exact_density_vqe_validation.insert_reference_noise (   base_circuit)

Definition at line 443 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ main()

def exact_density_vqe_validation.main ( )

Definition at line 1306 of file exact_density_vqe_validation.py.

Here is the call graph for this function:

◆ print_exact_density_validation_bundle_summary()

def exact_density_vqe_validation.print_exact_density_validation_bundle_summary (   bundle)

Definition at line 1091 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ print_exact_regime_workflow_summary()

def exact_density_vqe_validation.print_exact_regime_workflow_summary (   bundle)

Definition at line 837 of file exact_density_vqe_validation.py.

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

◆ run_exact_regime_workflow_case()

def exact_density_vqe_validation.run_exact_regime_workflow_case (   qbit_num)

Definition at line 544 of file exact_density_vqe_validation.py.

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

◆ run_exact_regime_workflow_matrix()

def exact_density_vqe_validation.run_exact_regime_workflow_matrix (   qubit_sizes = EXACT_REGIME_WORKFLOW_QUBITS,
  parameter_set_count 
)

Definition at line 706 of file exact_density_vqe_validation.py.

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

◆ run_fixed_parameter_case()

def exact_density_vqe_validation.run_fixed_parameter_case (   qbit_num)

Definition at line 1169 of file exact_density_vqe_validation.py.

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

◆ run_optimization_trace()

def exact_density_vqe_validation.run_optimization_trace ( )

Definition at line 1213 of file exact_density_vqe_validation.py.

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

◆ run_unsupported_state_vector_density_noise_case()

def exact_density_vqe_validation.run_unsupported_state_vector_density_noise_case ( )

Definition at line 1258 of file exact_density_vqe_validation.py.

Here is the call graph for this function:

◆ trace_distance()

def exact_density_vqe_validation.trace_distance (   rho1)

Definition at line 490 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ validate_artifact_payload()

def exact_density_vqe_validation.validate_artifact_payload (   payload)

Definition at line 251 of file exact_density_vqe_validation.py.

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

◆ validate_exact_density_validation_bundle()

def exact_density_vqe_validation.validate_exact_density_validation_bundle (   bundle,
  bundle_dir 
)

Definition at line 1048 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ validate_exact_regime_workflow_bundle()

def exact_density_vqe_validation.validate_exact_regime_workflow_bundle (   bundle)

Definition at line 810 of file exact_density_vqe_validation.py.

Here is the caller graph for this function:

◆ write_exact_density_validation_bundle()

def exact_density_vqe_validation.write_exact_density_validation_bundle (   output_path)

Definition at line 1085 of file exact_density_vqe_validation.py.

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

◆ write_exact_regime_workflow_bundle()

def exact_density_vqe_validation.write_exact_regime_workflow_bundle (   output_path)

Definition at line 831 of file exact_density_vqe_validation.py.

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

◆ write_json()

def exact_density_vqe_validation.write_json (   output_path)

Definition at line 1300 of file exact_density_vqe_validation.py.

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

Variable Documentation

◆ ARTIFACT_CORE_FIELDS

tuple exact_density_vqe_validation.ARTIFACT_CORE_FIELDS
Initial value:
1 = (
2  "case_name",
3  "status",
4  "backend",
5  "qbit_num",
6  "topology",
7  "ansatz",
8  "layers",
9  "inner_blocks",
10  "density_noise",
11 )

Definition at line 103 of file exact_density_vqe_validation.py.

◆ DEFAULT_ANSATZ

string exact_density_vqe_validation.DEFAULT_ANSATZ = "HEA"

Definition at line 63 of file exact_density_vqe_validation.py.

◆ DEFAULT_INNER_BLOCKS

int exact_density_vqe_validation.DEFAULT_INNER_BLOCKS = 1

Definition at line 65 of file exact_density_vqe_validation.py.

◆ DEFAULT_LAYERS

int exact_density_vqe_validation.DEFAULT_LAYERS = 1

Definition at line 64 of file exact_density_vqe_validation.py.

◆ EXACT_DENSITY_VALIDATION_BUNDLE_FIELDS

tuple exact_density_vqe_validation.EXACT_DENSITY_VALIDATION_BUNDLE_FIELDS
Initial value:
1 = (
2  "suite_name",
3  "status",
4  "backend",
5  "reference_backend",
6  "software",
7  "provenance",
8  "summary",
9  "artifacts",
10 )

Definition at line 86 of file exact_density_vqe_validation.py.

◆ EXACT_DENSITY_VALIDATION_BUNDLE_FILENAME

string exact_density_vqe_validation.EXACT_DENSITY_VALIDATION_BUNDLE_FILENAME = "exact_density_validation_bundle.json"

Definition at line 85 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_OBSERVABLE_IMAG_TOL

int exact_density_vqe_validation.EXACT_REGIME_OBSERVABLE_IMAG_TOL = 1e-10

Definition at line 72 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_PARAMETER_SET_COUNT

int exact_density_vqe_validation.EXACT_REGIME_PARAMETER_SET_COUNT = 10

Definition at line 68 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_TRACE_TOL

int exact_density_vqe_validation.EXACT_REGIME_TRACE_TOL = 1e-10

Definition at line 71 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_VALIDITY_TOL

int exact_density_vqe_validation.EXACT_REGIME_VALIDITY_TOL = 1e-10

Definition at line 70 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_WORKFLOW_BUNDLE_FIELDS

tuple exact_density_vqe_validation.EXACT_REGIME_WORKFLOW_BUNDLE_FIELDS
Initial value:
1 = (
2  "suite_name",
3  "status",
4  "backend",
5  "reference_backend",
6  "thresholds",
7  "software",
8  "summary",
9  "cases",
10 )

Definition at line 75 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_WORKFLOW_BUNDLE_FILENAME

string exact_density_vqe_validation.EXACT_REGIME_WORKFLOW_BUNDLE_FILENAME = "exact_regime_workflow_bundle.json"

Definition at line 73 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_WORKFLOW_ERROR_TOL

int exact_density_vqe_validation.EXACT_REGIME_WORKFLOW_ERROR_TOL = 1e-8

Definition at line 69 of file exact_density_vqe_validation.py.

◆ EXACT_REGIME_WORKFLOW_QUBITS

tuple exact_density_vqe_validation.EXACT_REGIME_WORKFLOW_QUBITS = (4, 6, 8, 10)

Definition at line 67 of file exact_density_vqe_validation.py.

◆ FIXED_PARAMETER_QUBITS

tuple exact_density_vqe_validation.FIXED_PARAMETER_QUBITS = (4, 6)

Definition at line 66 of file exact_density_vqe_validation.py.

◆ OPTIMIZATION_TRACE_ARTIFACT_FILENAME

string exact_density_vqe_validation.OPTIMIZATION_TRACE_ARTIFACT_FILENAME = "optimization_trace_4q.json"

Definition at line 74 of file exact_density_vqe_validation.py.

◆ PRIMARY_BACKEND

string exact_density_vqe_validation.PRIMARY_BACKEND = "density_matrix"

Definition at line 61 of file exact_density_vqe_validation.py.

◆ REFERENCE_BACKEND

string exact_density_vqe_validation.REFERENCE_BACKEND = "qiskit_aer_density_matrix"

Definition at line 62 of file exact_density_vqe_validation.py.

◆ REPO_ROOT

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

Definition at line 38 of file exact_density_vqe_validation.py.

◆ REQUIRED_BRIDGE_GATE_NAMES

dictionary exact_density_vqe_validation.REQUIRED_BRIDGE_GATE_NAMES = {"U3", "CNOT"}

Definition at line 97 of file exact_density_vqe_validation.py.

◆ REQUIRED_BRIDGE_NOISE_NAMES

dictionary exact_density_vqe_validation.REQUIRED_BRIDGE_NOISE_NAMES
Initial value:
1 = {
2  "local_depolarizing",
3  "amplitude_damping",
4  "phase_damping",
5 }

Definition at line 98 of file exact_density_vqe_validation.py.

◆ SUPPORTED_BACKEND_LABELS

dictionary exact_density_vqe_validation.SUPPORTED_BACKEND_LABELS = {PRIMARY_BACKEND, "state_vector"}

Definition at line 96 of file exact_density_vqe_validation.py.