kosmos.dqc_scheduling.remote_operation_detector

Classes

class RemoteOperationInfo[source]

Information about a remote two-qubit gate.

source_node

Node that initiates the remote operation.

Type:

QuantumNode

target_node

Node that receives the remote operation.

Type:

QuantumNode

gate_time

Scheduled time or timestamp for the remote operation.

Type:

int

qubit

Qubit index when the operation targets one qubit. Defaults to None.

Type:

int | None

control_qubit

Index of the control qubit for the two-qubit gate. Defaults to None.

Type:

int | None

target_qubit

Index of the target qubit for the two-qubit gate. Defaults to None.

Type:

int | None


class RemoteOperationDetector(matrix: kosmos.dqc_scheduling.space_time_matrix.SpaceTimeMatrix)[source]

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.

Parameters:

matrix (SpaceTimeMatrix) – Matrix containing qubit assignments over time.


Methods

detect_teleportations() list[RemoteOperationInfo][source]

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.

Return type:

list[RemoteOperationInfo]

detect_remote_gates() list[RemoteOperationInfo][source]

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.

Return type:

list[RemoteOperationInfo]