dqcnac.compiler.compile_manager module
Compilation manager module.
- class dqcnac.compiler.compile_manager.CompileManager(partitioner: str = 'metis_based', scheduler: str = 'basic', mapper: str = 'dense', router: str = None)[source]
Bases:
objectClass to manage compilation workflow
- __init__(partitioner: str = 'metis_based', scheduler: str = 'basic', mapper: str = 'dense', router: str = None) None[source]
Initialize the CompilerManager
- Parameters:
partitioner – the name of the partitioner to be used
scheduler – the name of the remote operation scheduler to be used
mapper – the name of the local mapper to be used
router – the name of the local router to be used
- run(circuit: qiskit.QuantumCircuit, network: Network, use_tel: bool = True, use_gate_grouping=True, max_gates_in_a_group: int = 0, print_non_local_gates=False, check_commutations=True, parse=False) tuple[qiskit.QuantumCircuit, dict[qiskit.circuit.Qubit, tuple[str, int]], Dict[int, Tuple[str, int]], Dict[qiskit.circuit.Qubit, qiskit.circuit.Qubit], Dict[str, qoala.lang.program.QoalaProgram], Dict[str, qiskit.circuit.Qubit]][source]
The run method of the CompilerManager
- Parameters:
circuit – a monolithic circuit to distributed
network – the network over which the circuit must be distributed
use_tel – whether to use also TeleData or only TeleGates
use_gate_grouping – whether to use pre_pass to optimize entanglement usage
max_gates_in_a_group – if not 0, the max number of gates allowed in a group if pre_pass is True
print_non_local_gates – whether to print information about non-local gates
check_commutations – whether to check for swaps between gates
parse – whether to parse the circuit into a Qoala program
- Returns:
the distributed circuit, a mapping from the network physical qubits and circuit virtual qubits, a mapping from network physical qubits to physical qubits of each node coupling map