changing qc.decompose() to transpile(qc, backend) (#8129)
changing qc.decompose() to transpile(qc, backend) (#8129)

* Yeah I would agree. We should probably exchange all the qc.decompose() occurances to transpilations since e.g. the final decomposition of the Toffoli also doesn't use the actual basis gates of the device. Using the decomposition method is outdated (and far from optimal!) now that we don't have U1/2/3 as basis gates anymore.

Yeah I would agree. We should probably exchange all the `qc.decompose()` occurances to transpilations since e.g. the final decomposition of the Toffoli also doesn't use the actual basis gates of the device. Using the decomposition method is outdated (and far from optimal!) now that we don't have U1/2/3 as basis gates anymore.

_Originally posted by @Cryoris in https://github.com/Qiskit/qiskit-terra/issues/7796#issuecomment-1074144889_

* Fix whitespace

* Update qiskit/transpiler/__init__.py

Co-authored-by: Julien Gacon <2578673985e8ae3d22330d3daafe06433268eaa0@gmail.com>

* Change preferred import for transpile

Co-authored-by: Julien Gacon <2578673985e8ae3d22330d3daafe06433268eaa0@gmail.com>
Co-authored-by: Jake Lishman <4506a86e64ee7f74713ab69aff49c78428b27754@ibm.com>
QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py