def test_jordan_wigner_one_body(self):
    for p in range(self.n_qubits):
        for q in range(self.n_qubits):
            test_operator = jordan_wigner_one_body(p, q)
            fermion_term = FermionOperator(((p, 1), (q, 0)))
            correct_op = jordan_wigner(fermion_term)
            hermitian_conjugate = hermitian_conjugated(fermion_term)
            if (not fermion_term.isclose(hermitian_conjugate)):
                correct_op += jordan_wigner(hermitian_conjugate)
            self.assertTrue(test_operator.isclose(correct_op))
def test_jordan_wigner_one_body(self):
    for p in range(self.n_qubits):
        for q in range(self.n_qubits):
            test_operator = jordan_wigner_one_body(p, q)
            fermion_term = FermionOperator(((p, 1), (q, 0)))
            correct_op = jordan_wigner(fermion_term)
            hermitian_conjugate = hermitian_conjugated(fermion_term)
            if (not fermion_term.isclose(hermitian_conjugate)):
                correct_op += jordan_wigner(hermitian_conjugate)
            self.assertTrue(test_operator.isclose(correct_op))