Fix issue #2449 - Pulse figure not closed before return (#2515)
Fix issue #2449 - Pulse figure not closed before return (#2515)

* Fix issue #2449

We need to close de figure before return it.

* Linter fix

QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py