rewrote the dirac notation appendix