def test_jordan_wigner_two_body(self):
    for p in range(self.n_qubits):
        for q in range(self.n_qubits):
            for r in range(self.n_qubits):
                for s in range(self.n_qubits):
                    test_operator = jordan_wigner_two_body(p, q, r, s)
                    fermion_term = FermionOperator(((p, 1), (q, 1), (r, 0), (s, 0)))
                    correct_op = jordan_wigner(fermion_term)
                    hermitian_conjugate = hermitian_conjugated(fermion_term)
                    if (not fermion_term.isclose(hermitian_conjugate)):
                        if ((p == r) and (q == s)):
                            pass
                        else:
                            correct_op += jordan_wigner(hermitian_conjugate)
                    self.assertTrue(test_operator.isclose(correct_op), str((test_operator - correct_op)))
def test_jordan_wigner_two_body(self):
    for p in range(self.n_qubits):
        for q in range(self.n_qubits):
            for r in range(self.n_qubits):
                for s in range(self.n_qubits):
                    test_operator = jordan_wigner_two_body(p, q, r, s)
                    fermion_term = FermionOperator(((p, 1), (q, 1), (r, 0), (s, 0)))
                    correct_op = jordan_wigner(fermion_term)
                    hermitian_conjugate = hermitian_conjugated(fermion_term)
                    if (not fermion_term.isclose(hermitian_conjugate)):
                        if ((p == r) and (q == s)):
                            pass
                        else:
                            correct_op += jordan_wigner(hermitian_conjugate)
                    self.assertTrue(test_operator.isclose(correct_op), str((test_operator - correct_op)))