Repository: Qiskit/qiskit

Issue:
Inconsistency in gate names with matplotlib and text drawer backends
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**: 0.23.0
- **Python version**: 3.8.6
- **Operating system**: Artix Linux

### What is the current behavior?
When drawing the complete circuit with a user-defined name, say "gate", then when drawing with the `text` backend, the circuit renders the name "gate" on the relevant portion of the circuit. However, when drawing with `matplotlib`, the particular portion of the circuit shows "Gate" i.e. it capitalizes the first character of the name.


### Steps to reproduce the problem
For example,

```python
from qiskit import *
import matplotlib.pyplot as plt

sub = QuantumCircuit(2, name='gate')
sub.h(0)
sub.cx(0,1)
sub.cz(1,0)
sub_inst = sub.to_instruction()

qc = QuantumCircuit(3)
qc.x(0)
qc.append(sub_inst, [1,2])
qc.draw('text')
```

**Output**:
```
       ┌───┐
q_0: ──┤ X ├──
     ┌─┴───┴─┐
q_1: ┤0      ├
     │  gate │
q_2: ┤1      ├
     └───────┘
```

Doing the same with `matplotlib`
```python
qc = QuantumCircuit(3)
qc.x(0)
qc.append(sub_inst, [1,2])
qc.draw('mpl')
```

**Output**:
![Figure_1](https://user-images.githubusercontent.com/59497618/98459231-ea19e300-21be-11eb-995b-7d0ff78a60a5.png)


### What is the expected behavior?
Both the backends must either render the name of the gate as defined by the user i.e. case-sensitive or both must capitalize the name. In my opinion, the former seems reasonable.


Discussion:
I'm willing to work on this issue.

Resolving patch:
diff --git a/qiskit/visualization/matplotlib.py b/qiskit/visualization/matplotlib.py
--- a/qiskit/visualization/matplotlib.py
+++ b/qiskit/visualization/matplotlib.py
@@ -32,7 +32,7 @@
 except ImportError:
     HAS_PYLATEX = False
 
-from qiskit.circuit import ControlledGate
+from qiskit.circuit import ControlledGate, Gate, Instruction
 from qiskit.visualization.qcstyle import DefaultStyle, set_style
 from qiskit.circuit import Delay
 from qiskit import user_config
@@ -55,6 +55,7 @@
 
 class Anchor:
     """Locate the anchors for the gates"""
+
     def __init__(self, reg_num, yind, fold):
         self.__yind = yind
         self.__fold = fold
@@ -362,11 +363,9 @@ def _get_gate_ctrl_text(self, op):
 
         if gate_text in self._style['disptex']:
             gate_text = "{}".format(self._style['disptex'][gate_text])
-        else:
-            gate_text = "{}".format(gate_text[0].upper() + gate_text[1:])
+        elif gate_text in (op.name, base_name) and not isinstance(op.op, (Gate, Instruction)):
+            gate_text = gate_text.capitalize()
 
-        if ctrl_text:
-            ctrl_text = "{}".format(ctrl_text[0].upper() + ctrl_text[1:])
         return gate_text, ctrl_text
 
     def _get_colors(self, op):


Test patch:
diff --git a/test/ipynb/mpl/references/big_gates.png b/test/ipynb/mpl/references/big_gates.png
Binary files a/test/ipynb/mpl/references/big_gates.png and b/test/ipynb/mpl/references/big_gates.png differ
diff --git a/test/ipynb/mpl/references/ctrl_labels.png b/test/ipynb/mpl/references/ctrl_labels.png
Binary files a/test/ipynb/mpl/references/ctrl_labels.png and b/test/ipynb/mpl/references/ctrl_labels.png differ
diff --git a/test/ipynb/mpl/references/ghz_to_gate.png b/test/ipynb/mpl/references/ghz_to_gate.png
Binary files a/test/ipynb/mpl/references/ghz_to_gate.png and b/test/ipynb/mpl/references/ghz_to_gate.png differ
diff --git a/test/ipynb/mpl/test_circuit_matplotlib_drawer.py b/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
--- a/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
+++ b/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
@@ -299,10 +299,10 @@ def test_ctrl_labels(self):
         """Test control labels"""
         qr = QuantumRegister(4, 'q')
         circuit = QuantumCircuit(qr)
-        circuit.cy(1, 0, label='Bottom Y Label')
-        circuit.cy(2, 3, label='Top Y Label')
-        circuit.ch(0, 1, label='Top H Label')
-        circuit.append(HGate(label='H Gate Label').control(3, label='H Control Label',
+        circuit.cy(1, 0, label='Bottom Y label')
+        circuit.cy(2, 3, label='Top Y label')
+        circuit.ch(0, 1, label='Top H label')
+        circuit.append(HGate(label='H gate label').control(3, label='H control label',
                                                            ctrl_state='010'),
                        [qr[1], qr[2], qr[3], qr[0]])
 
@@ -321,7 +321,7 @@ def test_ghz_to_gate(self):
         """Test controlled GHZ to_gate circuit"""
         qr = QuantumRegister(5, 'q')
         circuit = QuantumCircuit(qr)
-        ghz_circuit = QuantumCircuit(3, name='This is a WWWWWWWWWWWide name Ctrl-GHZ Circuit')
+        ghz_circuit = QuantumCircuit(3, name='this is a WWWWWWWWWWWide name Ctrl-GHZ Circuit')
         ghz_circuit.h(0)
         ghz_circuit.cx(0, 1)
         ghz_circuit.cx(1, 2)