The normal thing is probably to remove the carpet. But if you have underfloor heating cable that is approved for direct contact with combustible material, it's fine to lay it against the carpet! (Sometimes the floor layer places a carpet as a waterproof layer, then heating cable + screed + tiles)
Remember that electric underfloor heating must always be protected by an RCD, and it must also be installed (not just connected) by an electrician if you want to be legal, and if you want any warranty to apply.