Applying down projection operator to Up spin site gives psi with "Sz" = NaN instead of 0.

,

Could you format your code? See Please Read: Make It Easier to Help You.