Added pauli spin matrices and singleton decorator. Added test script.