qiskit-nature
qiskit-nature copied to clipboard
Implements a reverse_map() method for JordanWignerMapper().
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.