Skip to content

Instantly share code, notes, and snippets.

@lazyoracle
Created February 20, 2023 10:18
Show Gist options
  • Save lazyoracle/2e604904debcacd93782b8323b5c92b3 to your computer and use it in GitHub Desktop.
Save lazyoracle/2e604904debcacd93782b8323b5c92b3 to your computer and use it in GitHub Desktop.
transpile circuits using qiskit
from qiskit import *
import qiskit
circ = QuantumCircuit(1)
circ.h(0)
transpiled_circ = qiskit.compiler.transpile(circ, basis_gates = ['rx', 'ry', 'rz'])
transpiled_circ.draw()
print(transpiled_circ)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment