Let circ be a QuantumCircuit object. Running circ.decompose() returns a circuit that consists entirely of gates native to IBMQ computers (single-qubit operations + CNOT).

I'm interested in decomposing circ into a circuit consisting of gates native to ion-trap quantum computers (that is, single-qubit gates + Mølmer–Sørensen). Is there a way to do this in Qiskit?


1 Answer 1


You can specify the target basis for instance using transpile:

from qiskit import transpile

target_basis = ['rx', 'ry', 'rz', 'h', 'cx']
decomposed = transpile(circuit,
                       optimization_level=0)  # 0 for no optimization, 3 is max

Note that

  • the target basis should be complete (e.g. rz h cx). For high optimization levels (2 or 3) you might have to include u and cx so all optimization passes work correctly.
  • I don't think the Molmer-Sorensen gate is currently supported as basis gate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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