@@ -0,0 +1,1374 @@
+%22%22%22Unit tests for the sigma module.%0A%0AThomas Ogden %3Ct@ogden.eu%3E%0A%22%22%22%0A%0Aimport sys%0Aimport unittest%0Aimport numpy as np%0Aimport qutip as qu%0A%0Afrom maxwellbloch import sigma%0A%0Aclass TestSigma(unittest.TestCase):%0A    %22%22%22 Tests for sigma.sigma. %22%22%22%0A%0A    def test_sigma_2_0_0(self):%0A        %22%22%22 Test %7C0%3E%3C0%7C for a two-level system. %22%22%22 %0A%0A        sigma_2_0_0 = qu.Qobj(%5B%5B1.,0.%5D,%5B0.,0.%5D%5D)%0A        self.assertEqual(sigma.sigma(2,0,0), sigma_2_0_0)%0A%0A    def test_sigma_10_9_9(self):%0A        %22%22%22 Test %7C9%3E%3C9%7C for a ten-level system. %22%22%22 %0A%0A        sigma_10_9_9 = np.zeros((10,10))%0A        sigma_10_9_9%5B9,9%5D = 1.%0A        sigma_10_9_9 = qu.Qobj(sigma_10_9_9)%0A        self.assertEqual(sigma.sigma(10,9,9), sigma_10_9_9)%0A%0Aclass TestSigmaN(unittest.TestCase):%0A    %22%22%22 Tests for sigma.sigma_N. %22%22%22 %0A%0A    def test_sigma_N_2_0_0_0_1(self):%0A        %22%22%22 Test that sigma_N with 1 subsystem returns same as sigma. %22%22%22%0A%0A        self.assertEqual(sigma.sigma_N(2,0,0,0,1),sigma.sigma(2,0,0))%0A%0A    def test_sigma_N_2_0_1_1_2(self):%0A        %22%22%22 Test for %7C0%3E%3C1%7C on the 2nd of 2 interacting two-level systems. %22%22%22%0A%0A        sigma_2_0_1 =  qu.Qobj(%5B%5B0.,1.%5D,%5B0.,0.%5D%5D)%0A        sigma_N_2_0_1_1_2 = qu.tensor(qu.identity(2), sigma_2_0_1)%0A%0A        self.assertEqual(sigma.sigma_N(2,0,1,1,2),sigma_N_2_0_1_1_2)%0A%0Adef main():%0A    unittest.main(verbosity=3)%0A%0Aif __name__ == %22__main__%22:%0A    status = main()%0A    sys.exit(status)

Add sigma tests from OB