Invariant states and quantized gravitational perturbations