def test_unit_vec(): assert_allclose(operator_tools.unit_vec(0, 3), [1, 0, 0])
def test_thermal_state(self): assert_allclose(self.model.thermal_state('gg'), [1]) assert_allclose(self.model.thermal_state('gg,eg,ge,ee'), unit_vec(0, 25)) assert_allclose(self.model.thermal_state('ee'), 0.25 * np.eye(4).reshape(-1))