<!-- ⚠️ 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**: latest - **Python version**: - **Operating system**: ### What is the current behavior? ```python qc= QuantumCircuit(2) qc.h(range(2)) qc.cz(0,1) qc.draw() ``` ``` ┌───┐ q_0: ┤ H ├─■─ ├───┤ │ q_1: ┤ H ├─■─ └───┘ ``` ```python transpile(qc, basis_gates=['h', 'cx']).draw() ``` ``` ┌───┐ q_0: ┤ H ├───────■─────── ├───┤┌───┐┌─┴─┐┌───┐ q_1: ┤ H ├┤ H ├┤ X ├┤ H ├ └───┘└───┘└───┘└───┘ ``` ### Steps to reproduce the problem ### What is the expected behavior? I would expect the default level of optimization to remove trivial things like repeated H gates. ### Suggested solutions