This section introduces how the rulesets are executed in the RuleEngine and related components.
This specification expect the existance of the RuleSet runtime
- RuleSet execution
A RuleSet delivered to the quantum repeater is interpreted into the form that can be executed on the RuleEngine (RE) and RuleSetRuntime (RSR).
RuleEngine (RE) is a software component that is installed as a part of QRSA (Quantum Repeater Software Architecture). RE is responsible for executing RuleSets which are generated by the Responder of the path. RE works in the following steps.
- Receive a RuleSet from the Connection Manager
- Convert a serialized RuleSet into executable RuleSet
- Initialize a Runtime with that RuleSet and RE callback
- Assign generated link-level RuleSet to Runtime
- (When the connection teardown is requested, finish up the RuleSet execution?) ❓
Explain the initiator and the responder in 2.1
RE provides several functionalities to RuleSet Runtime. Runtime can use these functions to manipulate qubits and to interact with other quantum repeaters and routers. (:warning: Underconstruction )
Resource Kind
freeQubit: Free the consumed or unused resource's qubits.called freeAndResetQubit in QuISP
requestResource: Request more entanglement resources (e.g. for purification)⚠️ No implementation in QuISPrequestAncilla: Request ancilla qubits for logical qubits.⚠️ No implementation in QuISPlockQubit: Get a lock for the qubitsImplemented in QuISP but do we need this as callback?
isQubitLocked: Check if the qubit is locked or notImplemented in QuISP but do we need this as callback?
isQubitAlive: Check if the qubit does not exceed the expected lifetime⚠️ cocori: I believe this is required if we need lifetime cutoff
Quantum Gate Kind
gateX: Perform Pauli X gate to a qubitgateY: Perform Pauli Y gate to a qubitgateZ: Perform Pauli Z gate to a qubitgateH: Perform Hadamard gate to a qubit⚠️ No implementation in QuISP? I though there was an implementation for this but not in ICallBackgateCNOT: Perform CNOT gate to qubitsgateCZ: Perform CZ gate to qubits
as extension of these, we could prepare the following functions
purifyX (purifyY, purifyZ): Perform purification for reosources but this can be done the combinations of primitive gates and measurement
Measurement Kind
measureX: Perform measurement in X basismeasureY: Perform measurement in Y basismeasureZ: Perform measurement in Z basis
Need arbitrary angle measurement?
Communication Kind
sendMessage: Send a message to the proper repeaters, routers and end nodes.Need this for every protocol message? Currently, it's implemented as
sendPurificationResult,sendSwappingResult, etc.checkMessage: Check if there is a message queued in the box⚠️ No implementation for the current quisp. I think running RuleSet should be able to check if there is a message from other repeaters to the Rule
RuleSet Runtime (RSR) is an entity that is responsible for executing RuleSet. RSR is initiated with the RuleSet given by RE and the instructions in the RuleSet are performed one by one (see the instructions in 2.2.RuleSetSpec)
may not need this section RuleSet is distributed in some serialized formats such as JSON. Internally, serialized RuleSet is translated into a class of RuleSet.
This section introduces the specifications for RuleSet Runtime.
RuleSet Runtime Manager initializes the RuleSet Runtime with a RuleSet. A runtime is prepared for each RuleSet.
Runtime Manager exposes the following functions to RE.
acceptRuleSet: This function accepts a deserialized RuleSets and RE throw a RuleSet with this function.findRuleSetById: This function allows RE to find the running RuleSet by itsruleset_id.
Once the runtime is created, it's queued up in the waiting list and it waits for being executed.
RuleSet takes link-level entanglement (entanglement between neighbor quantum repeaters) as a resource. Once a link-level Bell pair is prepared and ready for use, it is allocated to the first stage.
⚠️ What is the current policy for entanglement pumping? Do we keep several qubits for allocating a new entanglement resource in the middle of RuleSet execution?
(:warning: Under construction)
A Stage contains a set of Rules and actual execution is done stage by stage.
Do we have condition exclusiveness check?