add test for state_matrix and state_tuple