Computing Host

class interlinq.components.computing_host.ComputingHost(host_id: str, controller_host_id: str, clock: interlinq.components.clock.Clock, total_qubits: int = 0, total_pre_allocated_qubits: int = 1, gate_time: Optional[dict] = None, backend=None)

Computing host object which acts as a slave node in a centralised distributed network system, connected to the controller host.

property bits

Get the classical bits measured by this host.

Returns

The dictionary of bits

Return type

(dict)

property controller_host_id

Get the controller_host_id associated to the computing host

Returns

The ID of controller/master host

Return type

(str)

static extract_gate_param(op: dict) → numpy.ndarray

Extract gate parameter array as an np array

Parameters

op (dict) – Dictionary of information regarding the operation

Returns

The parameter array.

Return type

(np.ndarray)

perform_schedule(ticks: int)

Process the schedule and perform the corresponding operations accordingly

Parameters

ticks (int) – Number of times the clock has ticked

property qubit_ids

Return the qubit IDs for this computing host.

Returns

The IDs of the qubits stored by this computing host.

Return type

(list)

receive_schedule()

Receive the broadcasted schedule from the Controller Host and update the schedule property

send_results()

Send results to Controller Host

property total_qubits

Return the total number of qubits for computing host.

Returns

The total number of qubits stored by this computing host.

Return type

(int)

update_total_qubits(total_qubits: int)

Set a new value for total_qubits in the computing host.

Parameters

(int) – Total number of qubits possessed by the computing host