Revert physics.quantum.QExpr.rewrite to fix spin doctest