# From logical universal gate set to physical one, Qiskit

Among the several universal gate sets, the Clifford$$+T$$ set seems the most important one (since it should provide fault-tolerant computing).

However, that set is logical and it differs from physical implementations, e.g. IBM processors use the gate set $$\{CNOT, I, R_z, \sqrt{X}, X\}$$.

Hence, my question is: how does the Qiskit framework handle the switch from a gate set, such as the Clifford$$+T$$, to the real one?

At this link there's an interesting possible answer. But I'd like to get a deeper understanding of the criteria Qiskit applies.

EDIT:

I'd like to input to the Qiskit transpile method a simple circuit performing a control S gate:

qc = QuantumCircuit(2)
cs = SGate().control()
qc.append(cs, [0,1])


with basis gate set $$\{H, S, T, CNOT\}$$, i.e.:

new_qc = transpile(qc, basis_gates=['h','s','t',cx'])


However, the method cannot complete the task.

Qiskit has a component called transpiler. One of the task of the transpiler is to convert the circuit gates into the backend basis gates. For example:

new_circuit = transpiler(circuit, backend=provider.get_backend('simulator_extended_stabilizer')


You can set your own basis with the parameter basis_gates. For example:

new_circuit = transpiler(circuit, basis_gates=['h', 'x', ...]

• Thank you for the answer. I am trying to use the "transpile" method with basis_gates=['h','s','t','cx'], but it doesn't work. I expected it to work since it is a universal set. Mar 30, 2021 at 9:53
• Maybe you can add your circuit to the question? It could be a bug in the basis translator, which is not complete. Mar 30, 2021 at 9:58
• I have ran into issue like this before too actually. So I have to use $U3$ gate and CNOT. But theoretically, the set $\{H, T, CNOT \}$ should be enough. Mar 30, 2021 at 15:15
• Probably related to this issue? github.com/Qiskit/qiskit-terra/issues/6047 Mar 31, 2021 at 11:16