dqcnac.nonlocal_gate_scheduling.compilation_state module

Compilation state class module

class dqcnac.nonlocal_gate_scheduling.compilation_state.Cover(migrated: qiskit.circuit.Qubit, path: List[Node], destination=None, cost=None, time=None)[source]

Bases: object

Class used to represent the coverage of a gate by “moving” one qubit of a gate over a path of nodes in the network.

__init__(migrated: qiskit.circuit.Qubit, path: List[Node], destination=None, cost=None, time=None)[source]

Initialize the Cover.

Parameters:
  • migrated – the qubit to “move”

  • path – the path of nodes

  • cost – the cost of the “movement”

  • time – the time of the “movement”

add(migrated: qiskit.circuit.Qubit, path: List[Node], destination=None)[source]

Add another qubit to the coverage, this may happen when “moving” both qubits of a gate to an intermediate node

Parameters:
  • migrated – the qubit to “move”

  • path – the path of nodes

set_path(migrated: qiskit.circuit.Qubit, path: List[Node])[source]
class dqcnac.nonlocal_gate_scheduling.compilation_state.State(**kwargs)[source]

Bases: object

The class representing the state of the compilation.

__init__(**kwargs)[source]

Initialize the state of the compilation.

Parameters:

**kwargs – keyword arguments

get_deep_copy() → State[source]

Get a deep copy of the State object, i.e. different instance and attributes

Returns:

a deep copy of the State object

get_simple_copy() → State[source]

Get a shallow copy of the State object, i.e. different instance but same attributes

Returns:

a shallow copy of the State object