:py:mod:`kosmos.dqc_scheduling.remote_operation_detector` ========================================================= .. py:module:: kosmos.dqc_scheduling.remote_operation_detector Classes ------- .. py:class:: RemoteOperationInfo Information about a remote two-qubit gate. .. attribute:: source_node Node that initiates the remote operation. :type: QuantumNode .. attribute:: target_node Node that receives the remote operation. :type: QuantumNode .. attribute:: gate_time Scheduled time or timestamp for the remote operation. :type: int .. attribute:: qubit Qubit index when the operation targets one qubit. Defaults to None. :type: int | None .. attribute:: control_qubit Index of the control qubit for the two-qubit gate. Defaults to None. :type: int | None .. attribute:: target_qubit Index of the target qubit for the two-qubit gate. Defaults to None. :type: int | None ---- .. py:class:: RemoteOperationDetector(matrix: kosmos.dqc_scheduling.space_time_matrix.SpaceTimeMatrix) Detects remote gates and required teleportations from space-time matrix. Teleportations occur when the qubit assignment changes during execution. Remote operations occur when a gate is applied to qubits assigned to a different node. Initialize remote operation detector. :param matrix: Matrix containing qubit assignments over time. :type matrix: SpaceTimeMatrix | .. rubric:: Methods .. py:method:: detect_teleportations() -> list[RemoteOperationInfo] Detect teleportations by scanning the matrix for qubit transitions. A teleportation is needed when the same qubit is allocated on different QPUs in consecutive timesteps. :returns: All required teleportations with timing. :rtype: list[RemoteOperationInfo] .. py:method:: detect_remote_gates() -> list[RemoteOperationInfo] Detect remote gates by analyzing partition circuits. A remote gate is needed when a multi-qubit gate operates on qubits allocated to different QPUs at gate's execution time. :returns: All remote gates with timing and node info. :rtype: list[RemoteOperationInfo]