Open MarcoBarroca opened 4 months ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I see there are failures which are not of this change but due to a newly released pylint version - I created #1346 as this needs fixing outside of this PR to get CI running again and passing on the code that is already in main here.
Sure, I'll fix the mypy error by pushing the complex inside FermionicOp.
Included the pylint fixes in this PR. Hope that's'okay. Should fix #1346
Included the pylint fixes in this PR. Hope that's'okay.
Would it be too much to ask if you could do them in a separate PR. I think we will need to get the same fixes onto the stable branch so would want to backport the PR. Given this PR introduces a new feature its not something we would backport - that is more for critical fixes where we can do a bug fix release to address things.
Of course once such a separate PR was merged, and the branch here updated, it would all pass.
I'll let this run so we can check things anyway if you like. (Once you have a PR that has been merged here it will not longer need a maintainers approval to run - its just on the first PR)
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
qiskit_nature/second_q/mappers/jordan_wigner_mapper.py | 38 | 40 | 95.0% | ||
<!-- | Total: | 38 | 40 | 95.0% | --> |
Totals | |
---|---|
Change from base Build 8662422324: | 0.04% |
Covered Lines: | 8821 |
Relevant Lines: | 10163 |
Sorry my bad in the suggestion, if you did not correct it was
:class:
`JordanWignerMapper
should have been
:class:`.JordanWignerMapper` where it was a . not a second `
@woodsp-ibm Let me know if you think the note is okay when you can.
@mrossinek Can I get you to take a look at this too.
Hey, just wanted an update here. Is there anything I should do about this still?
The build errors with mypy are fixed by #1362, which is still open. As far as progressing this hopefully @mrossinek can take a look.
Summary
This implements a reverse_map() method in the JordanWignerMapper(). It allows users to go back from qubit operators into fermionic operators. Completes issue #255.
Also included a unit test.
Details and comments
Instead of using the implementation linked in issue #255 I modified it to use the FermionicOp object for the mapping. Seemed like it would be easier for anyone to understand the code. Both implementations are equivalent.