Heat kernels of generalized degenerate Schrödinger operators and Hardy spaces