2
$\begingroup$

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?

$\endgroup$
1
5
$\begingroup$

You can specify the target basis for instance using transpile:

from qiskit import transpile

target_basis = ['rx', 'ry', 'rz', 'h', 'cx']
decomposed = transpile(circuit,
                       basis_gates=target_basis, 
                       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
$\endgroup$
1

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.