def test_transm_number(self):
    n = number_operator(self.n_qubits, 3)
    n_jw = jordan_wigner(n)
    self.assertEqual(n_jw.terms[((3, 'Z'),)], (- 0.5))
    self.assertEqual(n_jw.terms[()], 0.5)
    self.assertEqual(len(n_jw.terms), 2)
def test_transm_number(self):
    n = number_operator(self.n_qubits, 3)
    n_jw = jordan_wigner(n)
    self.assertEqual(n_jw.terms[((3, 'Z'),)], (- 0.5))
    self.assertEqual(n_jw.terms[()], 0.5)
    self.assertEqual(len(n_jw.terms), 2)