pre-evaluate computation of basis_state

since it's going to be translated as part of the translation of
basis_repl_step, but contains only known data.