==============================================================================
(L1) exact rational example: P=[[1,0],[0,0]], Q=[[1/2,1/2],[1/2,1/2]]
==============================================================================
PQ = [[Fraction(1, 2), Fraction(1, 2)], [Fraction(0, 1), Fraction(0, 1)]]   (PQ)(PQ)^*(PQ) = [[Fraction(1, 4), Fraction(1, 4)], [Fraction(0, 1), Fraction(0, 1)]]   partial isometry: False
[P,Q] = PQ-QP = [[Fraction(0, 1), Fraction(1, 2)], [Fraction(-1, 2), Fraction(0, 1)]]

==============================================================================
(L1) numeric: all pairs of entries in several non-commuting magic unitaries
==============================================================================
  quantum Latin square N=5: alternating orthonormalisation defect 9.1e-14 after 169 sweeps
  quantum Latin square N=6: alternating orthonormalisation defect 9.9e-14 after 793 sweeps
block N=4 (M_2)                         : magic OK; max||[p_ab,p_cd]||=0.707; pairs with (pi-defect=0, comm=0): 224, (both >0): 32, mismatches: 0
block 2+2+1 N=5 (M_2)                   : magic OK; max||[p_ab,p_cd]||=0.707; pairs with (pi-defect=0, comm=0): 593, (both >0): 32, mismatches: 0
Pauli N=4, 3 random points (M_12)       : magic OK; max||[p_ab,p_cd]||=1.200; pairs with (pi-defect=0, comm=0): 112, (both >0): 144, mismatches: 0
quantum Latin square N=5 (M_5)          : magic OK; max||[p_ab,p_cd]||=0.707; pairs with (pi-defect=0, comm=0): 225, (both >0): 400, mismatches: 0
quantum Latin square N=6 (M_6)          : magic OK; max||[p_ab,p_cd]||=0.707; pairs with (pi-defect=0, comm=0): 396, (both >0): 900, mismatches: 0

==============================================================================
(L2) random partial isometries V, W: VW is a partial isometry iff [V^*V, WW^*] = 0
==============================================================================
  commuting : max pi-defect(VW) = 1.92e-15, min = 2.09e-16;  max ||[V*V,WW*]|| = 1.17e-15, min = 3.48e-16
  generic   : max pi-defect(VW) = 5.43e-01, min = 1.85e-01;  max ||[V*V,WW*]|| = 1.09e+00, min = 5.81e-01

==============================================================================
(L3) canonical assignment u -> p violates G^2_{1_N} (level 2): exhibit p_ab p_cd
==============================================================================
  block N=4 (M_2): p_11 p_33 has pi-defect 0.3536  (exactly: p_11 = P, p_33 = Q above, and PQ is not a partial isometry)
  block 2+2+1 N=5 (M_2): p_11 p_33 has pi-defect 0.3536  (exactly: p_11 = P, p_33 = Q above, and PQ is not a partial isometry)

==============================================================================
(L4) triage sketch, N=4, case 'D_4-monomial': w = H p H^T with H the Hadamard basis
==============================================================================
  block N=4 (M_2): pi-defects of the 16 entries of H p H^T:
[[0.  0.  0.  0. ]
 [0.  0.  0.  0. ]
 [0.  0.  0.5 0.5]
 [0.  0.  0.5 0.5]]
   ||entry(1,1) - 1|| = 0.0 , ||entry(2,2) - 1|| = 0.0 , ||entry(3,3) - (P+Q-1)|| = 0.0
  Pauli N=4, 3 random points (M_12): pi-defects of the 16 entries of H p H^T:
[[5.751e-16 6.844e-17 1.166e-16 1.411e-16]
 [1.529e-16 9.483e-01 1.080e+00 7.964e-01]
 [8.011e-17 1.243e+00 1.210e+00 1.120e+00]
 [1.255e-16 1.263e+00 1.272e+00 1.089e+00]]
  exact: P+Q-1 = [[Fraction(1, 2), Fraction(1, 2)], [Fraction(1, 2), Fraction(-1, 2)]]  (P+Q-1)^2 = [[Fraction(1, 2), Fraction(0, 1)], [Fraction(0, 1), Fraction(1, 2)]]  -> (P+Q-1)^3 == P+Q-1 ? False
DONE s2
