Temperature operator in quantum mechanics