Repository: Qiskit/qiskit-terra (python)

Issue:
`PauliOp.adjoint()` does not return correct value
### Environment

- **Qiskit Terra version**: 0.24.0.dev0+e981b7e
- **Python version**: 3.8.16
- **Operating system**: Linux


### What is happening?

`PauliOp.adjoint()` does not return a correct answer like `SparsePauliOp.adjoint()` does.

### How can we reproduce the issue?

```python
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
```

### What should happen?

The code above should not return `AssertionError`.

### Any suggestions?

_No response_

Pull request description:
Fix `PauliOp.adjoint()`
<!--
⚠️ If you do not respect this template, your pull request will be closed.
⚠️ Your pull request title should be short detailed and understandable for all.
⚠️ Also, please add a release note file using reno if the change needs to be
  documented in the release notes.
⚠️ If your pull request fixes an open issue, please link to the issue.

- [ ] I have added the tests to cover my changes.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
-->

### Summary
- Resolve #9433
- Add test for `PauliOp.adjoint()`

### Details and comments




Patch:
diff --git a/qiskit/opflow/primitive_ops/pauli_op.py b/qiskit/opflow/primitive_ops/pauli_op.py
index ff1c20f19..1699275ef 100644
--- a/qiskit/opflow/primitive_ops/pauli_op.py
+++ b/qiskit/opflow/primitive_ops/pauli_op.py
@@ -84,7 +84,7 @@ class PauliOp(PrimitiveOp):
         return SummedOp([self, other])
 
     def adjoint(self) -> "PauliOp":
-        return PauliOp(self.primitive, coeff=self.coeff.conjugate())
+        return PauliOp(self.primitive.adjoint(), coeff=self.coeff.conjugate())
 
     def equals(self, other: OperatorBase) -> bool:
         if isinstance(other, PauliOp) and self.coeff == other.coeff:
diff --git a/releasenotes/notes/fix-PauliOp-adjoint-a275876185df989f.yaml b/releasenotes/notes/fix-PauliOp-adjoint-a275876185df989f.yaml
new file mode 100644
index 000000000..d9860f702
--- /dev/null
+++ b/releasenotes/notes/fix-PauliOp-adjoint-a275876185df989f.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    Fixed a bug where :meth:`.PauliOp.adjoint` did not return a correct value for Paulis
+    with complex coefficients, like ``PauliOp(Pauli("iX"))``. 
+    Fixed `#9433 <https://github.com/Qiskit/qiskit-terra/issues/9433>`.


Test patch:
diff --git a/test/python/opflow/test_op_construction.py b/test/python/opflow/test_op_construction.py
index d797c566b..fd474f394 100644
--- a/test/python/opflow/test_op_construction.py
+++ b/test/python/opflow/test_op_construction.py
@@ -1288,6 +1288,10 @@ class TestPauliOp(QiskitOpflowTestCase):
         expected = PauliOp(Pauli("XYZX"), coeff=2 - 3j)
         self.assertEqual(~pauli_op, expected)
 
+        pauli_op = PauliOp(Pauli("iXYZX"), coeff=2 + 3j)
+        expected = PauliOp(Pauli("-iXYZX"), coeff=2 - 3j)
+        self.assertEqual(~pauli_op, expected)
+
     @data(*itertools.product(pauli_group_labels(2, full_group=True), repeat=2))
     @unpack
     def test_compose(self, label1, label2):