I am having a doubt that why channel power gain is denoted by $|h|^2$. For example, if the signal received is $$y(n) = hx(n)+w(n)$$
where $x(n)$ is transmitted signal with power $P$ , $w(n)$ is AWGN with power $N$ and $h$ rayleigh fading channel.
The SNR from above equation is given as
$$\mathrm{SNR} = \frac{|h|^2P}{N}\tag{1}$$
My query is why $|h|^2$ is written in equation $(1)$?
Any help in this regard is highly appreciated.