She recognises that the smell of the new carpet is 'wrong' - it has none of her, or your odours on it which make it fmiliar and safe.
Her reaction is to 'mark' it with her own scent so that she can lay claim to the new area. This is instinctive, and she will do it until the familiar odours of her 'pack' - which is you and your fmily, seep into the carpet and she knows it is her ground, and she will stop marking it.
Be patient, it won't last long.
In the mean time, make a fuss of her if she uses her litter tray, and make sure you give her lots of attention to ease her past this temporary insecurity phase.