Some clever ideas from @blakejohnson

Type stability in the pauli_mats map and a map-do syntax for base_paulis.