cunqa.transpile.transpiler

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

Function to transpile a circuit according to a given Backend. The circuit is returned in the same format as it was originally.

Transpilation instructions are opt_level, which defines how optimal is the transpilation, default is 1; initial_layout specifies the set of “real” qubits to which the quantum registers of the circuit are assigned. These instructions are associated to the qiskit.transpiler.passmanager.StagedPassManager, since it is used in the process.

Parameters:
  • circuit (dict | qiskit.QuantumCircuit | CunqaCircuit) – circuit to be transpiled.

  • 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.