You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should refactor the QubitConverter and QubitMapper classes to achieve the following goals.
Removal of qiskit.opflow
Qiskit Terra plans to deprecate qiskit.opflow in favor of qiskit.quantum_info in the next release (0.23). The primitives and new algorithms based on them already largely switched over to quantum_info objects and only kept support of the PauliSumOp because of its coupling to the Z2Symmetries. In this Epic, I will outline our plans around Z2Symmetries to allow us removing this final opflow dependence.
One step needs to be done in Terra and the corresponding issue is Qiskit/qiskit#9140.
Then we also need get rid of the TwoQubitReduction. Since this particular transformation is unique to the ParityMapper of Qiskit Nature, I suggest that we fully extract it from Qiskit Terra and migrate it to here.
Enabling direct usage of QubitMappers
In a far future, the usage of Z2Symmetries will not yield as much of a significant advantage as nowadays (think removal of a handful of qubits from a multi-hundred/multi-thousand qubit-sized problem). Thus, we should already prepare for an API where QubitMapper objects can be used directly.
Especially if we integrate the TwoQubitReduction directly into the ParityMapper, each mapper will be more useful as a standalone object, too.
Making a standalone TaperedQubitMapper
With the changes proposed above, one could fully rethink how we can implement the tapering utilities evolving around the Z2Symmetries which will remain in Terra. In fact, one could envision a standalone TaperedQubitMapper, which takes any other mapper and all the information necessary to determine the Z2Symmetries during instantiation.
This class could then implement a 2-step mapping procedure where the operators are first mapped and then tapered. This would be a stateful mapper since the symmetries are determined based on the hamiltonian and subsequent additional operators are reduced accordingly.
If in the future we decide to remove Z2Symmetries, this class can simply be deprecated without further affecting the stack.
Removing QubitConverter
Doing all of the above, will allow us to simply deprecate the QubitConverter as it will be replaced (in-place) by any QubitMapper instance. This also greatly simplifies the usage of simple mappers for any end-user 👍
MixedMapper
This refactoring will also greatly simplify the introduction of a MixedMapper which is required for the implementation of #795.
The text was updated successfully, but these errors were encountered:
What should we add?
We should refactor the
QubitConverter
andQubitMapper
classes to achieve the following goals.Removal of
qiskit.opflow
Qiskit Terra plans to deprecate
qiskit.opflow
in favor ofqiskit.quantum_info
in the next release (0.23). The primitives and new algorithms based on them already largely switched over toquantum_info
objects and only kept support of thePauliSumOp
because of its coupling to theZ2Symmetries
. In this Epic, I will outline our plans aroundZ2Symmetries
to allow us removing this final opflow dependence.One step needs to be done in Terra and the corresponding issue is Qiskit/qiskit#9140.
Then we also need get rid of the
TwoQubitReduction
. Since this particular transformation is unique to theParityMapper
of Qiskit Nature, I suggest that we fully extract it from Qiskit Terra and migrate it to here.Enabling direct usage of
QubitMapper
sIn a far future, the usage of
Z2Symmetries
will not yield as much of a significant advantage as nowadays (think removal of a handful of qubits from a multi-hundred/multi-thousand qubit-sized problem). Thus, we should already prepare for an API whereQubitMapper
objects can be used directly.Especially if we integrate the
TwoQubitReduction
directly into theParityMapper
, each mapper will be more useful as a standalone object, too.Making a standalone
TaperedQubitMapper
With the changes proposed above, one could fully rethink how we can implement the tapering utilities evolving around the
Z2Symmetries
which will remain in Terra. In fact, one could envision a standaloneTaperedQubitMapper
, which takes any other mapper and all the information necessary to determine the Z2Symmetries during instantiation.This class could then implement a 2-step mapping procedure where the operators are first mapped and then tapered. This would be a stateful mapper since the symmetries are determined based on the hamiltonian and subsequent additional operators are reduced accordingly.
If in the future we decide to remove
Z2Symmetries
, this class can simply be deprecated without further affecting the stack.Removing
QubitConverter
Doing all of the above, will allow us to simply deprecate the
QubitConverter
as it will be replaced (in-place) by anyQubitMapper
instance. This also greatly simplifies the usage of simple mappers for any end-user 👍MixedMapper
This refactoring will also greatly simplify the introduction of a
MixedMapper
which is required for the implementation of #795.The text was updated successfully, but these errors were encountered: