def test_get_interaction_operator_identity(self):
    interaction_operator = InteractionOperator((- 2j), self.one_body, self.two_body)
    qubit_operator = jordan_wigner(interaction_operator)
    self.assertTrue(qubit_operator.isclose(((- 2j) * QubitOperator(()))))
    self.assertEqual(interaction_operator, get_interaction_operator(reverse_jordan_wigner(qubit_operator), self.n_qubits))
def test_get_interaction_operator_identity(self):
    interaction_operator = InteractionOperator((- 2j), self.one_body, self.two_body)
    qubit_operator = jordan_wigner(interaction_operator)
    self.assertTrue(qubit_operator.isclose(((- 2j) * QubitOperator(()))))
    self.assertEqual(interaction_operator, get_interaction_operator(reverse_jordan_wigner(qubit_operator), self.n_qubits))