alok linear_canonical_transform .cursorrules file for TeX

goal: implement the linear canonical transform in JAX. give all functions explicit types. Python allows the `type` keyword now instead of `typing.TypeAlias`. Use functools.partial because the transform is an operator.



```math
Definition 1. For an arbitrary 2N × 2N symplectic matrix

E = [a b; c d],  EΩE^T = Ω,  Ω = [0 1_N; -1_N 0]

the N-dimensional linear canonical transform (LCT) is defined as:

L_E[f](ξ) = ∫_{R^n} f(t)K_E(ξ,t) dt

where

K_E(ξ,t) = \frac{1}{\sqrt{(2πi)^N det b}} e^{\frac{i}{2}(ξ^T b^{-1}d ξ - ξ^T b^{-1}t + \frac{1}{2}t^T ab^{-1}t)}

where i^2 = -1. Here, E is invertible and its inverse is given by:

E^{-1} = [a b; c d]^{-1} = ΩE^T Ω^T = [d^T -b^T; -c^T a^T] 
```


use these specific SL(2, C) matrices as test cases:







fourier : [
    [0,1],
    [-1, 0]
]

fractional fourier : [
    [cos(theta), sin(theta)],
    [-sin(theta), cos(theta)]
]

fractional inverse fourier (just the negative of the fractional fourier transform): [
    [cos(-theta), sin(-theta)],
    [-sin(-theta), cos(-theta)]
] 

tests: 
- test against JAX's implementations of fft and ifft. Do this before trying further tests.
- inversions (inverse of transform uses inverse of matrix, so LCT(inverse of matrix) should be the inverse of LCT)
- composition (LCT(A) then LCT(B) should be the same as LCT(A @ B)) applied to input

use the tex files as specs.

prefer complex domain where its convenient. it makes sense mathematically.

golang
python
tex

First Time Repository

TeX

Languages:

Python: 41.5KB
TeX: 95.3KB
Created: 9/13/2024
Updated: 11/11/2024

All Repositories (1)