Closed saharbenrached closed 2 years ago
This is cool! Here's the preview.
A few files got added that don't belong in the repo and should be removed. (I made a PR in #29 that adjusts .gitignore
so that these files would not have been added.)
Given a Pauli operator, I want to convert it to a sum of Pauli gates using QuantumOps from qiskit-alt. Which method to use?
@saharbenrached Thanks!
This PR adds three files. But two of them should not be included. Only the demo file itself is needed. To fix this, you can delete the two files with git rm
and commit and push the result to your branch. This PR should be updated automatically.
@saharbenrached I think this may be what you want:
import qiskit_alt
import qiskit_alt.electronic_structure
geometry = [['H', [0., 0., 0.]], ['H', [0., 0., 0.7414]]]
basis = 'sto3g'
fermi_op = qiskit_alt.electronic_structure.fermionic_hamiltonian(geometry, basis)
pauli_op = qiskit_alt.electronic_structure.jordan_wigner(fermi_op);
from qiskit.opflow import PauliSumOp
pauli_sum_op = PauliSumOp(pauli_op)
This is the demo for VQE for the H2 molecule, however, the result is incorrect. I am working on it
I missed that you have actually deleted those files! Thanks.
I created this demo with a random Pauli operator. It would be however interesting to work on an example of a molecule