Skip to content

Commit b84bf4b

Browse files
committed
Generators fixed
1 parent b8156f0 commit b84bf4b

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

QCLib/Circuit/Hadamard.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private theorem HH_aux (y : Fin 2) :
5959
-- TBD: `simp` runs into a loop. Investigate.
6060
theorem HH_apply (k : Register n) : (HH n) • δ[k] = HadamardBasisVector n k := by
6161
simp_rw [HH_def, HadamardBasisVector, basisVector_eq_prod,
62-
UnitaryGroup.piKroneckerUnitary_smul_vec, H_apply,
62+
Matrix.UnitaryGroup.piKroneckerUnitary_smul_vec, H_apply,
6363
piOuterProduct_smul_const, HH_aux, piOuterProduct_univ_sum, Fintype.card_fin,
6464
piOuterProduct_smul_univ, Finset.prod_pow_eq_pow_sum]
6565

QCLib/Circuit/PauliGroup/Generators.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Choose a namespace.
3838

3939
public section
4040

41-
open Complex Matrix Qubit
41+
open Complex Matrix Qubit EuclideanSpace
4242

4343
open scoped PiOuterProduct
4444

QCLib/LinearAlgebra/StdBasis.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ open scoped ENNReal
5656

5757
variable (p : ℝ≥0∞) (K K' : Type*) {K'' : Type*} (V : Type*) {V' V'' : Type*}
5858

59-
@[to_additive (attr := simps)]
59+
@[to_additive]
6060
instance instOne [One V] : One (WithLp p V) := (WithLp.equiv p V).one
6161

62+
lemma zero_def (p : ENNReal) (V : Type u_4) [Zero V] : 0 = (WithLp.equiv p V).symm 0 := rfl
63+
lemma one_def (p : ENNReal) (V : Type u_4) [One V] : 1 = (WithLp.equiv p V).symm 1 := rfl
64+
6265
end WithLpMissingInstances.WithLp
6366

6467
open EuclideanSpace PiOuterProduct Function
@@ -96,14 +99,16 @@ example [CommMonoid α] (f : (i : ι) → EuclideanSpace α (l i)) (j) :
9699
@[simp]
97100
theorem piOuterProduct_one [CommMonoid α] : (⨂ i, (1 : EuclideanSpace α (l i))) = 1 := by
98101
ext1
99-
simp
102+
simp only [WithLp.one_def, WithLp.equiv_symm_apply, ofLp_injective, Pi.piOuterProduct_one]
100103

101104
@[simp]
102105
theorem piOuterProduct_zero [CommMonoidWithZero α] (f : Π i, EuclideanSpace α (l i))
103106
(h : ∃ i, f i = 0) : (⨂ i, f i) = 0 := by
104107
ext j
105108
obtain ⟨i, hi⟩ := h
106-
simpa using Finset.prod_eq_zero (Finset.mem_univ i) (by simp [hi])
109+
simpa [WithLp.zero_def] using
110+
Finset.prod_eq_zero (Finset.mem_univ i)
111+
(by simp [hi, WithLp.zero_def])
107112

108113
@[simp]
109114
theorem piOuterProduct_smul [CommSemiring α] [DecidableEq ι]

0 commit comments

Comments
 (0)