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
As primitive-based algorithm is rolled out and opflow might be deprecated in the future, we might need to update Qiskit-optimization to replace opflow operators with SparsePauliOp of quantum_info.
For example, to_ising returns PauliSumOp and from_ising receives PauliSumOp.
The text was updated successfully, but these errors were encountered:
I imagine we can transition over already to some degree if we choose. For from_ising we could probably support conversion for both the opflow OperatorBase and the quantum_info BaseOperator with the former type being deprecated, so things can be transitioned over. For to_ising maybe add an additional parameter that presently defaults to producing an OperatorBase (PauliSumOp), so any users code still works, but set it via when optimization uses it internally so it goes over to producing an OperatorBase - SparsePauliOp. Maybe this new parameter will be removed when only OperatorBase is emitted. I guess as far as the optimization stack is concerned its use of to_ising is all internal and can just be switched based on the algorithm, whether it be older QI based ones, so users existing code continues to work or the new primitive based ones that can take a BaseOperator directly - at least it looks that way for the minimum eigen optimizer. Of course the new primitive based algos still work with PaulisSumOp so switching at present is not strictly needed. But for the public API of to/from_ising it would probably be better to additionally do it a new way while supporting the old. Please note that with the new primitive Terra NumPy(Minimum)Eigensolver there is presently a bug Qiskit/qiskit#9101
Thank you for the feedback. Yes, we have to update the code without breaking user codes. I intend to work on it when opflow is deprecated and the new primitive-based algorithms get stable.
What is the expected enhancement?
As primitive-based algorithm is rolled out and opflow might be deprecated in the future, we might need to update Qiskit-optimization to replace opflow operators with
SparsePauliOp
of quantum_info.For example,
to_ising
returnsPauliSumOp
andfrom_ising
receivesPauliSumOp
.The text was updated successfully, but these errors were encountered: