quisp
quisp copied to clipboard
Qubit Memory Pools: relax RuleSet control of qubits (timeouts, "OR" in RuleSets)
Today, as I understand it, qubits "belong" to a single Rule. They can't proceed until the Condition Clauses of the Rule are met. Condition Clauses are organized as logical AND.
This prevents a couple of things:
- Logical OR is also needed somewhere in the chain; my vision was for this to happen by having multiple Rules that represent the different OR cases. Whichever one is met first, the Rule fires, and consumes the qubit.
- One good example of the need for OR is Timeouts; we want to set up Rules that say, "Once a qubit has been sitting around for x seconds, discard," due to decoherence. See #192.
This will require implementing better memory pools for the qubits, then modifying the RuleEngine to scan those pools to see which ones meet the criteria. Note that these pools are probably per connection.
Michal says RuleSets for RGS are likely to require an OR when measuring subtrees in logical X or Z.
Recall that inside the code, a "Resource" means "a quantum state currently in development", not a range of physical memories or a QNIC, etc.
Currently, at connection setup time, the physical resources along the path are allocated unconditionally to the connection. That is, in terms of multiplexing, it is currently 100% circuit switched.
See RuleEngine::ResourceAllocation() https://github.com/sfc-aqua/quisp/blob/ccc456e74f3afa2410816ff09a3c27d55cfe584a/quisp/modules/QRSA/RuleEngine/RuleEngine.cc#L1143