1
$\begingroup$

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.

$\endgroup$
1
2
$\begingroup$

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', ...]
$\endgroup$
4
  • $\begingroup$ 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. $\endgroup$ – Daniele Cuomo Mar 30 at 9:53
  • 1
    $\begingroup$ Maybe you can add your circuit to the question? It could be a bug in the basis translator, which is not complete. $\endgroup$ – luciano Mar 30 at 9:58
  • 1
    $\begingroup$ 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. $\endgroup$ – KAJ226 Mar 30 at 15:15
  • $\begingroup$ Probably related to this issue? github.com/Qiskit/qiskit-terra/issues/6047 $\endgroup$ – luciano Mar 31 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.