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
In PR #867, @jlbosse noted that although PauliTerm objects can only be constructed with a single op (on a single qubit), they can be multiplied together to produce a multi-qubit PauliTerm. This has come up before (a while ago) in #120. In that issue and in the previously mentioned PR, the solution was to create a new class method to allow for this functionality, but we might want to consider changing the constructor itself. This issue is for discussing that idea.
The text was updated successfully, but these errors were encountered:
Somewhat related: The PauliTerm.from_compact_str() method also supports only one qubit operators and PauliSum.from_compact_str() is missing altogether. In PR #867 I had some code remedying this. If you want me to, I can create another PR with just that code. It would be the exact complement to PauliTerm.__str__() or PauliSum.__str__() respectively, but not work with Qubit Placeholders.
About the constructor: How about making something akin to PauliTerm.from_list() the default constructor? Or (not very pythonic) make the constructor choose between its current implementation and PauliTerm.from_list() depending on the argument types?
In PR #867, @jlbosse noted that although
PauliTerm
objects can only be constructed with a single op (on a single qubit), they can be multiplied together to produce a multi-qubitPauliTerm
. This has come up before (a while ago) in #120. In that issue and in the previously mentioned PR, the solution was to create a new class method to allow for this functionality, but we might want to consider changing the constructor itself. This issue is for discussing that idea.The text was updated successfully, but these errors were encountered: