from qiskit.opflow import X, Z, I

H2_molecule_hamiltonian = -0.5053051899926562*(I^I) + \
                            -0.3277380754984016*(Z^I) + \
                            0.15567463610622564*(Z^Z) + \
                            -0.3277380754984016*(I^Z)

print("========== H2 Molecule Hamiltonian for Two Qubits ==========\n")
print(H2_molecule_hamiltonian.to_matrix())