Replaced numpy references with tensor references in pauli matrices.