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

Functions

def _assert_channel_native_motif_fused_region (fr)
 
def _assert_dense_same_support_motif_fused_region (fr)
 
def _assert_multi_noise_entangler_motif_fused_region (fr)
 
def _compose_kraus_step_sequence
 
def _descriptor_set_for_invariant_tests ()
 
def _find_partition_with_span
 
def _local_qbit_to_kernel_index
 
def test_phase31_channel_native_apply_helper_2q_kron_matches_product_embed ()
 
def test_phase31_channel_native_apply_helper_embeds_1q_bundle_into_2q_density ()
 
def test_phase31_channel_native_apply_helper_identity_2q_leaves_2q_density ()
 
def test_phase31_channel_native_apply_helper_rejects_4x4_bundle_with_1q_support ()
 
def test_phase31_channel_native_apply_helper_rejects_support_above_2q ()
 
def test_phase31_channel_native_cnot_both_orientations_lower_consistently ()
 
def test_phase31_channel_native_cnot_lowering_matches_embed_cnot_oracle ()
 
def test_phase31_channel_native_descriptor_order_matters_for_fusion ()
 
def test_phase31_channel_native_invariants_accept_2q_identity_bundle ()
 
def test_phase31_channel_native_invariants_accept_kron_two_unitaries ()
 
def test_phase31_channel_native_invariants_reject_non_trace_preserving_4x4 ()
 
def test_phase31_channel_native_ordered_fusion_matches_sequential_on_2q_cnot_microcase ()
 
def test_phase31_channel_native_public_2q_cnot_microcase_matches_sequential ()
 
def test_phase31_channel_native_public_4q_smoke_matches_sequential ()
 
def test_phase31_channel_native_public_rejects_motif_span_over_two_local_qubits ()
 
def test_phase31_channel_native_public_rejects_non_phase3_gate_on_relaxed_surface ()
 
def test_phase31_channel_native_public_rejects_partition_without_noise ()
 
def test_phase31_channel_native_public_rejects_unsupported_noise_on_relaxed_surface ()
 
def test_phase31_local_support_q4_smoke_partitions_two_disjoint_pairs ()
 
def test_phase31_s06_e01_counted_2q_fused_kraus_bundle_satisfies_invariants ()
 
def test_phase31_s10_e01_counted_2q_dense_same_support_motif_matches_sequential ()
 
def test_phase31_s10_e01_counted_2q_multi_noise_entangler_chain_matches_sequential ()
 
def test_phase31_s10_e01_dense_same_support_motif_fused_kraus_bundle_satisfies_invariants ()
 
def test_phase31_s10_e01_multi_noise_entangler_fused_kraus_bundle_satisfies_invariants ()
 

Variables

 REPO_ROOT
 

Detailed Description

Phase 3.1 channel-native second slice: helper substrate, public runtime, correctness gate, boundaries.

**Helper / E01–E02 substrate:** imports private helpers from
``noisy_runtime_channel_native`` for bundle shape, invariants, support-aware
application, and (``P31-S04-E02``) CNOT / 2-local Kraus composition vs. the
sequential reference.

**Public runtime (``P31-S05-E01``):** ``execute_partitioned_density_channel_native``
admits bounded mixed motifs per partition via local-support validation in
``_validate_whole_partition_motif`` (no whole-workload single-qubit gate).

**Public positives (``P31-S05``):** integration tests assert runtime path,
fused-region audit fields, and density vs. sequential reference.

**Public boundary (``P31-S05-E02``):** negative matrix for span, noise presence,
and non-channel-native gates on surfaces built with
``strict_phase3_support=False``.

**Public correctness gates:** counted 2q closure includes ``P31-S06-E01``
(``phase31_microcase_2q_cnot_local_noise_pair``) and ``P31-S10-E01`` (remaining
strict counted microcases below) vs. sequential oracle with Frobenius/max-abs,
``trace_deviation``, ``rho_is_valid``; Kraus bundle invariant checks on fused 2q
blocks. Non-counted ``phase31_local_support_q4_spectator_embedding_smoke`` remains
a larger-workload smoke.

**Hybrid continuity** (``phase2_xxz_hea_q4_continuity``, ``phase2_xxz_hea_q6_continuity``)
lives in ``test_partitioned_channel_native_phase31_hybrid_slice.py``.

**Still deferred:** Qiskit Aer on the frozen external slice (``P31-ADR-011``);
versioned ``correctness_evidence`` / ``channel_invariants`` / route-summary
packaging (``P31-S10-E02``, ``P31-ADR-013``); counted structured performance cases
(``P31-ADR-010``); Task 4 performance matrix.

The first-slice file ``test_partitioned_channel_native_phase31_slice.py`` remains
the unchanged 1q public regression anchor.

Function Documentation

◆ _assert_channel_native_motif_fused_region()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._assert_channel_native_motif_fused_region (   fr)
private

Definition at line 548 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the caller graph for this function:

◆ _assert_dense_same_support_motif_fused_region()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._assert_dense_same_support_motif_fused_region (   fr)
private

Definition at line 684 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the caller graph for this function:

◆ _assert_multi_noise_entangler_motif_fused_region()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._assert_multi_noise_entangler_motif_fused_region (   fr)
private

Definition at line 667 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the caller graph for this function:

◆ _compose_kraus_step_sequence()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._compose_kraus_step_sequence (   steps)
private

Definition at line 121 of file test_partitioned_channel_native_phase31_second_slice.py.

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

◆ _descriptor_set_for_invariant_tests()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._descriptor_set_for_invariant_tests ( )
private

Definition at line 98 of file test_partitioned_channel_native_phase31_second_slice.py.

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

◆ _find_partition_with_span()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._find_partition_with_span (   descriptor_set)
private

Definition at line 105 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the caller graph for this function:

◆ _local_qbit_to_kernel_index()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice._local_qbit_to_kernel_index (   local_support)
private

Definition at line 116 of file test_partitioned_channel_native_phase31_second_slice.py.

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

◆ test_phase31_channel_native_apply_helper_2q_kron_matches_product_embed()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_apply_helper_2q_kron_matches_product_embed ( )
Kraus matrix for U0 on global 0 and U1 on global 1 matches product embed.

``_embed_two_qubit_operator_on_globals`` uses subsystem index ``b_g0 + 2*b_g1``
(g0 LSB). NumPy ``np.kron(A, B)`` places the first factor on the more
significant index bit, so the 4×4 operator is ``np.kron(U1, U0)``.

Definition at line 225 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_apply_helper_embeds_1q_bundle_into_2q_density()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_apply_helper_embeds_1q_bundle_into_2q_density ( )

Definition at line 176 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_apply_helper_identity_2q_leaves_2q_density()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_apply_helper_identity_2q_leaves_2q_density ( )

Definition at line 202 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_apply_helper_rejects_4x4_bundle_with_1q_support()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_apply_helper_rejects_4x4_bundle_with_1q_support ( )

Definition at line 274 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_apply_helper_rejects_support_above_2q()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_apply_helper_rejects_support_above_2q ( )

Definition at line 258 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_cnot_both_orientations_lower_consistently()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_cnot_both_orientations_lower_consistently ( )

Definition at line 344 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_cnot_lowering_matches_embed_cnot_oracle()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_cnot_lowering_matches_embed_cnot_oracle ( )

Definition at line 290 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_descriptor_order_matters_for_fusion()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_descriptor_order_matters_for_fusion ( )

Definition at line 462 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_invariants_accept_2q_identity_bundle()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_invariants_accept_2q_identity_bundle ( )

Definition at line 142 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_invariants_accept_kron_two_unitaries()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_invariants_accept_kron_two_unitaries ( )

Definition at line 152 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_invariants_reject_non_trace_preserving_4x4()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_invariants_reject_non_trace_preserving_4x4 ( )

Definition at line 164 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_ordered_fusion_matches_sequential_on_2q_cnot_microcase()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_ordered_fusion_matches_sequential_on_2q_cnot_microcase ( )

Definition at line 399 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_2q_cnot_microcase_matches_sequential()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_2q_cnot_microcase_matches_sequential ( )

Definition at line 561 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_4q_smoke_matches_sequential()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_4q_smoke_matches_sequential ( )
Non-counted larger-workload smoke; full 4q state vs sequential oracle.

Definition at line 588 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_rejects_motif_span_over_two_local_qubits()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_rejects_motif_span_over_two_local_qubits ( )

Definition at line 842 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_rejects_non_phase3_gate_on_relaxed_surface()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_rejects_non_phase3_gate_on_relaxed_surface ( )

Definition at line 870 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_rejects_partition_without_noise()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_rejects_partition_without_noise ( )

Definition at line 851 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_channel_native_public_rejects_unsupported_noise_on_relaxed_surface()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_channel_native_public_rejects_unsupported_noise_on_relaxed_surface ( )

Definition at line 900 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_local_support_q4_smoke_partitions_two_disjoint_pairs()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_local_support_q4_smoke_partitions_two_disjoint_pairs ( )

Definition at line 541 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_s06_e01_counted_2q_fused_kraus_bundle_satisfies_invariants()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_s06_e01_counted_2q_fused_kraus_bundle_satisfies_invariants ( )

Definition at line 622 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_s10_e01_counted_2q_dense_same_support_motif_matches_sequential()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_s10_e01_counted_2q_dense_same_support_motif_matches_sequential ( )

Definition at line 728 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_s10_e01_counted_2q_multi_noise_entangler_chain_matches_sequential()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_s10_e01_counted_2q_multi_noise_entangler_chain_matches_sequential ( )

Definition at line 701 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_s10_e01_dense_same_support_motif_fused_kraus_bundle_satisfies_invariants()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_s10_e01_dense_same_support_motif_fused_kraus_bundle_satisfies_invariants ( )

Definition at line 797 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

◆ test_phase31_s10_e01_multi_noise_entangler_fused_kraus_bundle_satisfies_invariants()

def tests.partitioning.test_partitioned_channel_native_phase31_second_slice.test_phase31_s10_e01_multi_noise_entangler_fused_kraus_bundle_satisfies_invariants ( )

Definition at line 755 of file test_partitioned_channel_native_phase31_second_slice.py.

Here is the call graph for this function:

Variable Documentation

◆ REPO_ROOT

tests.partitioning.test_partitioned_channel_native_phase31_second_slice.REPO_ROOT