def test_get_interaction_operator_one_body(self):
    interaction_operator = get_interaction_operator(FermionOperator('2^ 2'), self.n_qubits)
    one_body = numpy.zeros((self.n_qubits, self.n_qubits), float)
    one_body[(2, 2)] = 1.0
    self.assertEqual(interaction_operator, InteractionOperator(0.0, one_body, self.two_body))
def test_get_interaction_operator_one_body(self):
    interaction_operator = get_interaction_operator(FermionOperator('2^ 2'), self.n_qubits)
    one_body = numpy.zeros((self.n_qubits, self.n_qubits), float)
    one_body[(2, 2)] = 1.0
    self.assertEqual(interaction_operator, InteractionOperator(0.0, one_body, self.two_body))