A computable formulation of quantum theory