Let's suppose I define a basis gate set and the following circuit.
import qiskit as qk
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit,Aer
backend = Aer.get_backend('unitary_simulator')
basis_gates=['h',"cx",'t']
qreg_q = QuantumRegister(1, 'q')
circuit = QuantumCircuit(qreg_q)
circuit.s(0)
qk.transpile(QT.circuit, backend, basis_gates)
I get the TranspilerError
TranspilerError: "Unable to map source basis {('s', 1)} to target basis {'measure', 'h', 'delay', 'snapshot', 'cx', 'barrier', 't', 'reset'} over library <qiskit.circuit.equivalence.EquivalenceLibrary object at 0x14aefb3a1160>."
Why doesn't transpile work, being S gate = TT? It should be able to decompose it, right?