---
title: Walsh–Hadamard Angle Transform
url: https://www.emergentmind.com/topics/walsh-hadamard-angle-transform
type: topic
---

# Walsh–Hadamard Angle Transform

The Walsh–Hadamard Angle Transform (WAT) is a discrete integral transform operating on angular coordinate samples using Walsh–Hadamard basis functions. Developed as part of a hybrid classical–quantum framework for image processing in polar coordinates, WAT decomposes angular functions into binary-valued “square-wave” components of varying sequency. The transform’s capabilities include the denoising of artifacts such as circular and azimuthal banding in images and applications to optical system diagnostics, medical imaging, and radar/sonar polar mappings. Efficient quantum algorithms, building on earlier Walsh–Hadamard transform work, offer a computational complexity of $\mathcal{O}(N)$, improving upon the classical fast Walsh–Hadamard transform ($\mathcal{O}(N \log_2 N)$) [2403.16044].

## 1. Polar Walsh Basis Functions and Discretization

Walsh basis functions in polar coordinates are constructed on a disk of radius $r_{\max}$, partitioned into $N_r = 2^{n_r}$ radial divisions and $N_\theta = 2^{n_\theta}$ angular sectors. Two subdivision schemes are defined:

- **Uniform-area subdivision ($f = \tfrac{1}{2}$):** $r_k = r_{\max} \left[(k+1)/N_r \right]^{1/2}$
- **Uniform-radial subdivision ($f = 1$):** $r_k = r_{\max} \left[(k+1)/N_r \right]$

Angular nodes are similarly given by $\theta_\ell = 2\pi (\ell+1/2)/N_\theta$ for $\ell=0,\ldots,N_\theta-1$. Each annular–sector cell $S(k,\ell)$ contains a constant-valued polar Walsh function. Two function orders are defined:

- **Natural-order:** $W_{n,m}(r,\theta) = (-1)^{n\cdot k + m \cdot \ell}$
- **Sequency-order:** $W^s_{n,m}(r,\theta) = (-1)^{\sum_{i=0}^{n_r-1} (n_{n_r-1-i} \oplus n_{n_r-i}) k_i + \sum_{j=0}^{n_\theta-1} (m_{n_\theta-1-j} \oplus m_{n_\theta-j}) \ell_j}$

The functions factorize into separate radial and angular components: $W_{n,m}(r_k,\theta_\ell) = R_n(r_k) \cdot A_m(\theta_\ell)$, with $R_n(r_k) = (-1)^{n \cdot k}$ and $A_m(\theta_\ell) = (-1)^{m \cdot \ell}$ in natural order [2403.16044].

## 2. Orthogonality and Normalization

Orthogonality of the Walsh basis holds both discretely and approximately in the continuous limit:

- **Discrete orthogonality:**
  $$
  \sum_{k=0}^{N_r-1} \sum_{\ell=0}^{N_\theta-1} W_{n,m}(r_k, \theta_\ell) W_{n',m'}(r_k, \theta_\ell) = N_r N_\theta \delta_{n,n'} \delta_{m,m'}
  $$
  The orthonormal set is $\psi_{n,m}(r, \theta) = W_{n,m}(r, \theta)/\sqrt{N_r N_\theta}$.

- **Continuous approximation:**
  $$
  \int_0^{r_{\max}} \int_0^{2\pi} W_{n,m}(r,\theta) W_{n',m'}(r,\theta) r\,dr\,d\theta \approx \pi r_{\max}^2 \delta_{n,n'} \delta_{m,m'}
  $$
  Appropriate $r$-weighting may be introduced depending on subdivision choice ($f$).

This rigorous structure underpins transform invertibility and spectrum sparsity properties [2403.16044].

## 3. Walsh–Hadamard Angle Transform Kernel

The 1D Walsh–Hadamard transform matrix $H^{(N_\theta)}$ of size $N_\theta \times N_\theta$ is defined via entries
$$
H_{p,q} = (-1)^{p \cdot q}/\sqrt{N_\theta}
$$
where $p, q \in \{0, ..., N_\theta-1\}$.

Given an angular signal $f(\theta_\ell)$, for instance a pixel value at fixed radius versus angle, its WAT is
$$
F_p = \sum_{q=0}^{N_\theta-1} H_{p,q} f(\theta_q)
$$
for $p = 0, ..., N_\theta-1$, or in vector notation $F = H f$. The inverse is $f = H F$ since $H^2 = I$. In sequency order, the bit transform of $p \cdot q$ is utilized [2403.16044].

The transform decomposes $f(\theta)$ into angular “square-wave” functions of increasing sequency, with low $p$ indexing smooth angular features and high $p$ encoding rapid oscillations.

## 4. Hybrid Classical–Quantum Implementation and Complexity

A two-dimensional WAT (across both radius and angle) is realized as $Y = H_r X H_\theta^T$ for an image $X$ of size $N_r \times N_\theta$. A hybrid classical–quantum algorithm leverages quantum Hadamard operations to achieve cost $\mathcal{O}(N)$ for $N = N_r N_\theta$, outperforming the classical fast Walsh–Hadamard transform’s $\mathcal{O}(N \log_2 N)$.

### PolarQWHT(X) Procedure
1. Apply 1D Walsh–Hadamard transform to each angular column at fixed radius.
2. Apply 1D Walsh–Hadamard transform to each row (angularized) on the result.
3. Each 1D transform QWHT\_1d is implemented by:
   - State preparation (classical, $\mathcal{O}(N)$)
   - Hadamard gate layer (quantum, depth 1, $n=\log_2 N$)
   - Measurement, sign correction, and Walsh spectrum reconstruction
   The sign correction uses the classical “delta-shift trick” [2403.16044].

Quantum circuit steps include $O(N)$ classical preprocessing/postprocessing, parallel Hadamard gates, $N$ shots for output probability estimation, and classical sign correction.

## 5. Practical Applications: Image Denoising and Diagnostic Imaging

The WAT framework enables efficient removal of structured noise in polar images. For example, azimuthal banding artifacts can be suppressed by:

- Transforming a noisy angular profile $f(\theta_\ell) = \sin(4\ell \pi/N_\theta) +$ noise using $F_p = \sum H_{p,\ell} f(\theta_\ell)$
- Suppressing components at specific sequency $p$, then reconstructing the cleansed angular profile by inverse transform

Full-image artifact removal involves Cartesian-to-polar mapping, PolarQWHT application, selective H-domain filtering, inverse transform, and interpolation back to Cartesian coordinates. The spectrum before and after demonstrates targeted suppression of banding noise [2403.16044].

Applications span:
- Optical system diagnostics (e.g., Airy pattern removal)
- Astronomical imaging
- Medical CT ring artifact reduction
- Sonar and radar polar mapping

## 6. Practical Considerations and Limitations

Key consideration include:

- **Interpolation challenges:** Cartesian-to-polar conversion requires averaging or bilinear interpolation, balancing smoothing with aliasing risk.
- **Sampling uniformity:** Uniform-area subdivision ($f = \tfrac{1}{2}$) equalizes pixel density across annuli, stabilizing sampling.
- **Quantum measurement noise:** Obtaining accurate WHT coefficients necessitates many shots and error mitigation.
- **Restrictive grid sizes:** Both $N_r$ and $N_\theta$ must be powers of two.
- **Polar grid artifacts:** Non-injective mapping leads to edge artifacts, especially near the disk center and perimeter.
- **Current hybrid limitations:** There is an $\mathcal{O}(N)$ classical overhead for quantum state preparation and sign correction [2403.16044].

## 7. Extensions and Open Research Questions

Proposed extensions and outstanding problems include:

- Development of continuous, analytic polar Walsh–Hadamard transforms amendable to fast hardware
- Explicit error bounds for interpolation and QWHT sign recovery in the presence of realistic noise
- Generalization to non-uniform angular and radial grids
- Exploration of richer radial bases and non-binary subdivisions
- Hybrid transforms blending Fourier and Walsh–Hadamard methods

A plausible implication is that such developments could expand applicability and further reduce computational overheads for large-scale polar image processing tasks [2403.16044].

Source: https://www.emergentmind.com/topics/walsh-hadamard-angle-transform