Repository: Qiskit/qiskit

Issue:
ECRGate has wrong definition and doesn't implement RZX(pi/2)
### Environment

- **Qiskit Terra version**: 0.22
- **Python version**:  all
- **Operating system**: all

### What is happening?

The `ECRGate` documentation says it is supposed to implement a `RZX(pi.2)` gate, which as described in [Sheldon et al. PRA 2016](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.93.060302) as the pulse sequence
```
     ┌───────────┐┌───┐┌────────────┐┌───┐
q_0: ┤0          ├┤ X ├┤0           ├┤ X ├
     │  Rzx(π/4) │└───┘│  Rzx(-π/4) │└───┘
q_1: ┤1          ├─────┤1           ├─────
     └───────────┘     └────────────┘     
```
However the current definition of `ECRGate` is missing the last X gate in its decompostion and is implemented as 
```
     ┌───────────┐┌───┐┌────────────┐
q_0: ┤0          ├┤ X ├┤0           ├
     │  Rzx(π/4) │└───┘│  Rzx(-π/4) │
q_1: ┤1          ├─────┤1           ├
     └───────────┘     └────────────┘
```
which doesn't implement a `RZX(pi/2) = (II -1j * ZX)/sqrt(2)` gate, it instead implements the unitary `(IX - XY) /sqrt(2)` 

### How can we reproduce the issue?

```
qi.SparsePauliOp.from_operator(ECRGate())
SparsePauliOp(['IX', 'XY'],
              coeffs=[ 0.70710678+0.j, -0.70710678+0.j])
```

### What should happen?

If the ECR is supposed to be implemented as described in [Sheldon et al. PRA 2016](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.93.060302) it should implement an RZXGate(pi/2).

### Any suggestions?

To make it match the paper definition, one just needs to add the final X gate added to its decomposition definition and update its matrix definition


Discussion:
I agree it doesn't implement RZX(pi/2), that should be fixed in the docs. 

But we defined it like this intentionally to remove the post-rotation from the definition. This way the compiler can compile directly to ECRGate and save a pulse. Otherwise there's no point having the ECRGate as the gate you wrote is just a CNOT. 

The Sheldon paper doesn't have a "definition" of ECR as far as I can tell, it just says you can build your CNOT using `CR(45)-echo-CR(-45)-X`. 
@ajavadia Then the docs shouldn't say
> An echoed RZX(pi/2) gate implemented using RZX(pi/4) and RZX(-pi/4)

For definition I was referring to the papers Fig 1:
![image](https://user-images.githubusercontent.com/2235104/205336715-51da0f77-1ca6-47e8-b436-eebed20a6625.png)

yes i'll fix that part of doc. That picture is just the full CNOT. 
BTW ECRGate was defined like this (without the post rotation) per Petar Jurcevic suggestion for the purposes of saving pulses when compiling.

Resolving patch:
diff --git a/qiskit/circuit/library/standard_gates/ecr.py b/qiskit/circuit/library/standard_gates/ecr.py
--- a/qiskit/circuit/library/standard_gates/ecr.py
+++ b/qiskit/circuit/library/standard_gates/ecr.py
@@ -21,11 +21,12 @@
 
 
 class ECRGate(Gate):
-    r"""An echoed RZX(pi/2) gate implemented using RZX(pi/4) and RZX(-pi/4).
+    r"""An echoed cross-resonance gate.
 
     This gate is maximally entangling and is equivalent to a CNOT up to
     single-qubit pre-rotations. The echoing procedure mitigates some
     unwanted terms (terms other than ZX) to cancel in an experiment.
+    More specifically, this gate implements :math:`\frac{1}{\sqrt{2}}(IX-XY)`.
 
     Can be applied to a :class:`~qiskit.circuit.QuantumCircuit`
     with the :meth:`~qiskit.circuit.QuantumCircuit.ecr` method.


Test patch: