Documentation

LeanPool.MicrowaveNetworks.HybridCouplersPhaseShifters

Computing with hybrid couplers and phase shifters #

A network made of hybrid couplers and phase shifters, interconnected through interconnections and permutation networks, and connected in series and in parallel, is represented by its transmission scattering matrix (Network n).

Main definitions #

Main results #

A hybrid coupler, with transmission scattering matrix (1/√2) [[j, 1], [1, j]].

Equations
Instances For

    A network implementable with hybrid couplers, interconnections, phase shifters, and permutation networks.

    Instances For

      Preliminary lemmas #

      Permutation matrices multiply anti-homomorphically: P_τ P_σ = P_(σ * τ).

      Left-multiplying by a permutation matrix permutes the rows.

      Right-multiplying by a permutation matrix permutes the columns.

      theorem MiLAC.HybridCouplersPhaseShifters.parallel_mul {n m : ℕ} (A B : Network n) (C D : Network m) :
      parallel A C * parallel B D = parallel (A * B) (C * D)

      The product of two parallels is the parallel of the products.

      The parallel of two permutation networks is a permutation network.

      Two networks (possibly of syntactically different sizes) are equal up to a relabelling of their ports.

      Equations
      Instances For
        theorem MiLAC.HybridCouplersPhaseShifters.NetEquiv.trans {X Y Z : (n : ℕ) × Network n} (hXY : NetEquiv X Y) (hYZ : NetEquiv Y Z) :

        Equality up to a relabelling of the ports is transitive.

        The parallel is commutative, up to a relabelling of the ports.

        theorem MiLAC.HybridCouplersPhaseShifters.parallel_assoc {a b c : ℕ} (A : Network a) (B : Network b) (C : Network c) :
        NetEquiv ⟨a + b + c, parallel (parallel A B) C⟩ ⟨a + (b + c), parallel A (parallel B C)⟩

        The parallel is associative, up to a relabelling of the ports.

        Equality up to a relabelling of the ports is preserved by placing a network below.

        A network is equal to its relabelling, up to a relabelling of the ports.

        The product of two implementable networks is implementable.

        Permuting the rows and the columns of an implementable network keeps it implementable.

        A matrix is implementable on its index type if a finite port relabelling gives an implementable network. The relabelling witness rules out infinite index types.

        Equations
        Instances For

          An infinite collection of ports cannot be implemented by a finite network.

          An implementation after one relabelling witnesses implementability.

          An implementable matrix is implementable after any finite port relabelling.

          theorem MiLAC.HybridCouplersPhaseShifters.ImplementableOn.reindex {ι : Type u_1} {κ : Type u_2} {M : Matrix ι ι ℂ} (h : ImplementableOn M) (f : ι ≃ κ) :

          Implementability is invariant under a relabelling of the ports.

          The product of two implementable matrices is implementable.

          A block diagonal matrix of two implementable matrices is implementable.

          A matrix with no ports is implementable.

          A block diagonal matrix with a single implementable block is implementable.

          A block diagonal matrix of implementable blocks is implementable.

          theorem MiLAC.HybridCouplersPhaseShifters.ImplementableOn.submatrix_symm {ι : Type u_1} {M : Matrix ι ι ℂ} (h : ImplementableOn M) {n : ℕ} (e₁ e₂ : ι ≃ Fin n) :
          Implementable (M.submatrix ⇑e₁.symm ⇑e₂.symm)

          Relabelling the rows and the columns of an implementable matrix into Fin n independently gives an implementable network.

          Characterization of implementable networks #

          noncomputable def MiLAC.HybridCouplersPhaseShifters.block (θ₁₁ θ₁₂ θ₂₁ : ℝ) :

          The 2 × 2 block D(θ₁₁, θ₁₂, θ₂₁).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def MiLAC.HybridCouplersPhaseShifters.blockDiagonal {C S : ℕ} (θ₁₁ θ₁₂ θ₂₁ : Fin C → ℝ) (φ : Fin S → ℝ) :
            Network (2 * C + S)

            The block diagonal matrix diag(D(θ₁₁⁽¹⁾, θ₁₂⁽¹⁾, θ₂₁⁽¹⁾), …, D(θ₁₁⁽ᶜ⁾, θ₁₂⁽ᶜ⁾, θ₂₁⁽ᶜ⁾), exp(j φ₁), …, exp(j φ_S)).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              A layer P_ℓ D_ℓ: a block diagonal matrix D_ℓ followed by a permutation matrix P_ℓ.

              • C : ℕ

                The number of blocks of D_ℓ.

              • S : ℕ

                The number of phases of D_ℓ.

              • θ₁₁ : Fin self.C → ℝ

                The parameters θ₁₁ of the blocks of D_ℓ.

              • θ₁₂ : Fin self.C → ℝ

                The parameters θ₁₂ of the blocks of D_ℓ.

              • θ₂₁ : Fin self.C → ℝ

                The parameters θ₂₁ of the blocks of D_ℓ.

              • φ : Fin self.S → ℝ

                The phases of D_ℓ.

              • size : 2 * self.C + self.S = n

                D_ℓ has n ports.

              • σ : Equiv.Perm (Fin n)

                The permutation of P_ℓ.

              Instances For
                noncomputable def MiLAC.HybridCouplersPhaseShifters.layered {n : ℕ} (σ₀ : Equiv.Perm (Fin n)) :
                List (Layer n) → Network n

                The product P_L D_L ⋯ P_1 D_1 P_0, with layers listed from L down to 1 (Matrix.reindex only renames the 2 C + S ports of D_ℓ as the n ports of the network).

                Equations
                Instances For

                  Sufficiency #

                  Every phase-only implementation is also an implementation with hybrid couplers available.

                  A diagonal matrix of phases is implementable.

                  theorem MiLAC.HybridCouplersPhaseShifters.implementable_if_block (θ₁₁ θ₁₂ θ₂₁ : ℝ) :
                  Implementable (block θ₁₁ θ₁₂ θ₂₁)

                  A block D(θ₁₁, θ₁₂, θ₂₁) is implementable, with a phase shifter, a hybrid coupler, and two phase shifters in series.

                  theorem MiLAC.HybridCouplersPhaseShifters.implementable_if_blockDiagonal {C S : ℕ} (θ₁₁ θ₁₂ θ₂₁ : Fin C → ℝ) (φ : Fin S → ℝ) :
                  Implementable (blockDiagonal θ₁₁ θ₁₂ θ₂₁ φ)

                  A block diagonal matrix is implementable.

                  A network admitting a layered decomposition is implementable (sufficient condition).

                  Necessity #

                  A permutation network admits a layered decomposition, with no layers.

                  Left-multiplying a layered decomposition by a permutation matrix only changes its outermost permutation: σ₀ (if there are no layers) or the permutation of the topmost layer (if there are).

                  The series of two networks admitting a layered decomposition admits one.

                  The product of two networks admitting a layered decomposition admits one.

                  Admitting a layered decomposition is invariant under a relabelling of the ports.

                  theorem MiLAC.HybridCouplersPhaseShifters.isLayered_blockDiagonal {C S : ℕ} (θ₁₁ θ₁₂ θ₂₁ : Fin C → ℝ) (φ : Fin S → ℝ) :
                  IsLayered (blockDiagonal θ₁₁ θ₁₂ θ₂₁ φ)

                  A block diagonal matrix admits a layered decomposition, with one layer.

                  Placing an identity below a diagonal matrix of phases adds zero phases.

                  Placing an identity below the block diagonal matrix of a layer gives a network admitting a layered decomposition.

                  Placing an identity below a network admitting a layered decomposition gives a network admitting one.

                  Placing an identity above a network admitting a layered decomposition gives a network admitting one.

                  The parallel of two networks admitting a layered decomposition admits one.

                  A phase shifter admits a layered decomposition, with one layer and a single phase.

                  A hybrid coupler admits a layered decomposition, with one layer and the single block D(π/2, 0, 0).

                  theorem MiLAC.HybridCouplersPhaseShifters.implementable_only_if_layered {n : ℕ} {S : Network n} (hS : Implementable S) :
                  ∃ (σ₀ : Equiv.Perm (Fin n)) (layers : List (Layer n)), S = layered σ₀ layers

                  An implementable network admits a layered decomposition (necessary condition).

                  Main theorem #

                  theorem MiLAC.HybridCouplersPhaseShifters.implementable_iff_layered {n : ℕ} {S : Network n} :
                  Implementable S ↔ ∃ (σ₀ : Equiv.Perm (Fin n)) (layers : List (Layer n)), S = layered σ₀ layers

                  A network is implementable if and only if its transmission scattering matrix is P_L D_L ⋯ P_1 D_1 P_0, for some permutation matrices P_ℓ and block diagonal matrices D_ℓ.

                  Discrete Fourier transform #

                  The N × N DFT matrix, [F_N]_{i,k} = ω^{ik} / √N with ω = exp(-j 2π / N) (indices start from 0 here, from 1 in the paper).

                  Equations
                  Instances For
                    noncomputable def MiLAC.HybridCouplersPhaseShifters.butterfly (L : ℕ) (i : Fin (2 ^ L)) :
                    Matrix (Fin 2) (Fin 2) ℂ

                    The 2 × 2 butterfly blocks of the radix-2 FFT, (1/√2) [[1, ω^i], [1, -ω^i]] with ω = exp(-j 2π / 2^(L+1)).

                    Equations
                    Instances For
                      theorem MiLAC.HybridCouplersPhaseShifters.butterfly_eq_block (L : ℕ) (i : Fin (2 ^ L)) :
                      butterfly L i = block 0 (-2 * Real.pi * ↑↑i / 2 ^ (L + 1)) 0

                      Each butterfly block is a block D(0, -2π i / 2^(L+1), 0).

                      theorem MiLAC.HybridCouplersPhaseShifters.dft_exp (L a b i k : ℕ) :
                      Complex.exp (-2 * ↑Real.pi * Complex.I * (↑i + 2 ^ L * ↑a) * (↑b + 2 * ↑k) / 2 ^ (L + 1)) = (-1) ^ (a * b) * Complex.exp (-2 * ↑Real.pi * Complex.I * ↑i * ↑b / 2 ^ (L + 1)) * Complex.exp (-2 * ↑Real.pi * Complex.I * ↑i * ↑k / 2 ^ L)

                      The exponential identity behind the radix-2 decomposition of the DFT.

                      The N × N DFT, with N = 2^L, is implementable with hybrid couplers and phase shifters (Corollary 3 in the paper).