Repository: Qiskit/qiskit (python)

Issue:
Wrong global phase in 1q Pauli equivalence release note
### Environment

- **Qiskit Terra version**: 0.25
- **Python version**: n/a
- **Operating system**: n/a


### What is happening?

The release note added in #10300 contains incorrect circuit identities, and I think the actual equivalences might be wrong too (but I would have to brush up on my understanding of `global_phase` to be sure).  Specifically, the release note _should_ say $X=-iYZ$, $Y=-iZX$, and $Z=-iXY$, but these are specified incorrectly (without the minus sign).

### How can we reproduce the issue?

n/a

### What should happen?

n/a

### Any suggestions?

_No response_

Pull request description:
Fix release Pauli equivalences release note
### Summary

The equivalences were all correct, just the release note had put the applied operations in the equivalence the wrong way round.

<!--
⚠️ 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.
-->

### Details and comments

Fix #10527.

I'm not _super_ certain we need to bother updating this - it's not 100% clear what our documentation strategy will be with regard to release notes when we unify the metapackage build and the Terra build.  We may keep the existing `release_notes.rst` file as something like "legacy release notes", or we may keep only the version table, and regenerate all the Terra release notes from their notes, in which case we need the Terra ones to be up-to-date.

Patch:
diff --git a/pyproject.toml b/pyproject.toml
index 6f2292ca4..8cd6360f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -171,7 +171,8 @@ select = [
   "F632",  # is-literal
   "F634",  # if-tuple
   "F823",  # undefined-local
-  "C4",  # category: flake8-comprehensions
+  "G",     # flake8-logging-format
+  "T10",   # category: flake8-debugger
 ]
 
 [tool.pylint.main]
diff --git a/qiskit/circuit/instruction.py b/qiskit/circuit/instruction.py
index f23f833f4..3653a03d0 100644
--- a/qiskit/circuit/instruction.py
+++ b/qiskit/circuit/instruction.py
@@ -240,8 +240,8 @@ class Instruction(Operation):
         """
         if (
             self.name != other.name
-            or other.num_qubits != other.num_qubits
-            or other.num_clbits != other.num_clbits
+            or self.num_qubits != other.num_qubits
+            or self.num_clbits != other.num_clbits
             or len(self.params) != len(other.params)
         ):
             return False
diff --git a/releasenotes/notes/0.25/add-pauli-equivalences-74c635ec5c23ee33.yaml b/releasenotes/notes/0.25/add-pauli-equivalences-74c635ec5c23ee33.yaml
index cba26f7b8..e67c3ca54 100644
--- a/releasenotes/notes/0.25/add-pauli-equivalences-74c635ec5c23ee33.yaml
+++ b/releasenotes/notes/0.25/add-pauli-equivalences-74c635ec5c23ee33.yaml
@@ -2,6 +2,6 @@
 features:
   - |
     The transpiler's built-in :class:`.EquivalenceLibrary` has been taught the circular Pauli
-    relations :math:`X = iYZ`, :math:`Y = iZX` and :math:`Z = iXY`.  This should make transpiling
+    relations :math:`X = iZY`, :math:`Y = iXZ` and :math:`Z = iYX`.  This should make transpiling
     to constrained, and potentially incomplete, basis sets more reliable.
     See `#10293 <https://github.com/Qiskit/qiskit-terra/issues/10293>`__ for more detail.
diff --git a/releasenotes/notes/fix_soft_compare-3f4148aab3a4606b.yaml b/releasenotes/notes/fix_soft_compare-3f4148aab3a4606b.yaml
new file mode 100644
index 000000000..498576a72
--- /dev/null
+++ b/releasenotes/notes/fix_soft_compare-3f4148aab3a4606b.yaml
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    The method :meth:`qiskit.instruction.Instruction.soft_compare` is meant to compare whether two gates match in their name, number of qubits, number of clbits, and the number of parameters. However, there was a typo where it would not check the number of qubits and number of clbits for a match. This resolves the apparent typo.
\ No newline at end of file


Test patch:
diff --git a/test/python/circuit/test_instructions.py b/test/python/circuit/test_instructions.py
index 35ff001c6..edd01c5cc 100644
--- a/test/python/circuit/test_instructions.py
+++ b/test/python/circuit/test_instructions.py
@@ -118,6 +118,12 @@ class TestInstructions(QiskitTestCase):
             Instruction("u", 1, 0, [0.4, phi]).soft_compare(Instruction("v", 1, 0, [theta, phi]))
         )
 
+        # Test that when names are the same but number of qubits differ we get False
+        self.assertFalse(Instruction("u", 1, 0, []).soft_compare(Instruction("u", 2, 0, [])))
+
+        # Test that when names are the same but number of clbits differ we get False
+        self.assertFalse(Instruction("u", 1, 0, []).soft_compare(Instruction("u", 1, 1, [])))
+
         # Test cutoff precision.
         self.assertFalse(
             Instruction("v", 1, 0, [0.401, phi]).soft_compare(Instruction("v", 1, 0, [0.4, phi]))