Give me a ket and I will give you polarization states