Buckets:
| import Mathlib.LinearAlgebra.Matrix.NonsingularInverse | |
| import OAI.Analysis.MutuallyUnbiased.Fourier.Characters | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators ComplexConjugate | |
| open Matrix | |
| namespace MUB6 | |
| theorem IsHadamard.row_gram {H : CMatrix} (hH : IsHadamard H) : | |
| H * Hᴴ = (6 : ℂ) • (1 : CMatrix) := by | |
| have hl : ((6 : ℂ)⁻¹ • Hᴴ) * H = (1 : CMatrix) := by | |
| rw [smul_mul_assoc, hH.2, smul_smul] | |
| norm_num | |
| have hr := mul_eq_one_comm.mp hl | |
| rw [mul_smul_comm] at hr | |
| have hs := congrArg (fun M : CMatrix => (6 : ℂ) • M) hr | |
| simpa only [smul_smul, mul_inv_cancel₀ (by norm_num : (6 : ℂ) ≠ 0), one_smul] | |
| using hs | |
| theorem IsHadamard.column_orthogonal {H : CMatrix} (hH : IsHadamard H) | |
| (i j : Coord) : | |
| ∑ k, conj (H k i) * H k j = if i = j then 6 else 0 := by | |
| have h := congrArg (fun M : CMatrix => M i j) hH.2 | |
| simpa [Matrix.mul_apply, Matrix.one_apply] using h | |
| theorem IsHadamard.row_orthogonal {H : CMatrix} (hH : IsHadamard H) | |
| (i j : Coord) : | |
| ∑ k, H i k * conj (H j k) = if i = j then 6 else 0 := by | |
| have h := congrArg (fun M : CMatrix => M i j) hH.row_gram | |
| simpa [Matrix.mul_apply, Matrix.one_apply] using h | |
| theorem IsHadamard.transpose {H : CMatrix} (hH : IsHadamard H) : | |
| IsHadamard H.transpose := by | |
| refine ⟨fun i j => hH.1 j i, ?_⟩ | |
| ext i j | |
| simpa [Matrix.mul_apply, Matrix.one_apply, mul_comm, eq_comm] using | |
| hH.row_orthogonal j i | |
| def difference (i j : Coord) : Charge := Pi.single i 1 - Pi.single j 1 | |
| theorem difference_balanced (i j : Coord) : Balanced (difference i j) := by | |
| simp [Balanced, difference, Finset.sum_sub_distrib] | |
| theorem character_single (x : Coord → ℂ) (i : Coord) (n : ℤ) : | |
| character x (Pi.single i n) = x i ^ n := by | |
| classical | |
| simp [character, Pi.single_apply] | |
| theorem character_difference (x : Coord → ℂ) (hx : ∀ k, Complex.normSq (x k) = 1) | |
| (i j : Coord) : character x (difference i j) = x i * conj (x j) := by | |
| rw [difference, sub_eq_add_neg, character_add x (fun k => unit_ne_zero (hx k)), | |
| character_neg x hx, character_single, character_single] | |
| simp | |
| theorem g_difference {H : CMatrix} (hH : IsHadamard H) (i j : Coord) : | |
| g H (difference i j) = if i = j then 1 else 0 := by | |
| simp only [g, character_difference _ (fun k => hH.1 k _)] | |
| rw [hH.row_orthogonal] | |
| split_ifs <;> norm_num | |
| end MUB6 | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 2.39 kB
- Xet hash:
- 7fa7723534e1e080e3c71d4773a5b0351d7b63cf30349deae1ae948403d8ae76
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.