We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PauliOp.adjoint()
PauliOp.adjoint() does not return a correct answer like SparsePauliOp.adjoint() does.
SparsePauliOp.adjoint()
from qiskit.opflow.primitive_ops import PauliOp from qiskit.quantum_info import Pauli, SparsePauliOp sparse_pauli_op = SparsePauliOp(["iX"], [3.0]) expected = SparsePauliOp(["-iX"], [3.0]) assert sparse_pauli_op.adjoint() == expected # this is OK pauli_op = PauliOp(Pauli("X"), coeff=3j) expected = PauliOp(Pauli("X"), coeff=-3j) assert pauli_op.adjoint() == expected # this is also OK pauli_op = PauliOp(Pauli("iX"), coeff=3) expected = PauliOp(Pauli("-iX"), coeff=3) assert pauli_op.adjoint() == expected # returns AssertionError
The code above should not return AssertionError.
AssertionError
No response
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Environment
What is happening?
PauliOp.adjoint()
does not return a correct answer likeSparsePauliOp.adjoint()
does.How can we reproduce the issue?
What should happen?
The code above should not return
AssertionError
.Any suggestions?
No response
The text was updated successfully, but these errors were encountered: