Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
test_planner_descriptor_matrices.py
Go to the documentation of this file.
1 """Benchmark validation matrices for planner descriptor / unsupported-case evidence."""
2 
3 from pathlib import Path
4 import sys
5 
6 REPO_ROOT = Path(__file__).resolve().parents[3]
7 if str(REPO_ROOT) not in sys.path:
8  sys.path.insert(0, str(REPO_ROOT))
9 
10 from benchmarks.density_matrix.planner_surface.unsupported_descriptor_validation import (
11  build_unsupported_descriptor_cases,
12 )
13 
14 
17  expected_categories = {
18  "partition_qubits_too_small": "partition_span",
19  "dropped_operation": "dropped_operations",
20  "hidden_noise_placement": "hidden_noise_placement",
21  "incomplete_remapping": "incomplete_remapping",
22  "ambiguous_parameter_routing": "ambiguous_parameter_routing",
23  "reordering_across_noise_boundaries": "reordering_across_noise_boundaries",
24  }
25 
26  assert {case["case_name"] for case in cases} == set(expected_categories)
27  for case in cases:
28  assert case["status"] == "unsupported"
29  assert case["unsupported_category"] == expected_categories[case["case_name"]]
30  assert case["supported_descriptor_case_recorded"] is False