cunqa.transpile.transpiler

cunqa.transpile.transpiler(circuit, backend, opt_level=1, initial_layout=None)

Function to transpile a circuit according to a given backend. Cirtcuit must be qiskit QuantumCircuit, dict or QASM2 string. If QASM2 string is provided, function will also return circuit in QASM2.

Args:

circuit (dict, <class ‘qiskit.circuit.quantumcircuit.QuantumCircuit’> or QASM2 str): circuit to be transpiled.

backend (<class ‘backend.Backend’>): backend which transpilation will be done respect to.

opt_level (int): optimization level for creating the qiskit.transpiler.passmanager.StagedPassManager. Default set to 1.

initial_layout (list[int]): initial position of virtual qubits on physical qubits for transpilation, lenght must be equal to the number of qubits in the circuit.