QuISP
|
Classes | |
struct | Instruction |
This class represents IR (intermediate representation) instruction. Program consists of Instructions. More... | |
struct | InstructionVisitor |
Visitor class for instructions in a Program. More... | |
struct | Label |
label to annotate the instruction index in a Program. More... | |
struct | MemoryKey |
a key of memory key-value store in a RuleSet More... | |
class | MemoryValue |
memory value More... | |
struct | Op |
class | Program |
The Program is a list of Instructions with metadata. The Runtime can execute the Program. More... | |
struct | QNodeAddr |
internal class to describe QNode's address. More... | |
struct | QubitId |
describes Qubit id in a Program. This is like a local variable name in a runtime::Program. Be careful, this is not used for RuleEngine or QNIC. More... | |
struct | Register |
class | Rule |
The Runtime executable Rule in a RuleSet. More... | |
class | RuleSet |
The RuleSet. More... | |
class | Runtime |
Runtime class is responsible for executing the given RuleSet and the states' management. More... | |
class | RuntimeManager |
union | ValueUnion |
actual memory value that can hold multiple types of values. More... | |
Typedefs | |
using | InstructionTypes |
a variant that is capable of storing all instructions | |
using | QubitResources = std::multimap<std::pair<QNodeAddr, RuleId>, IQubitRecord*> |
(partner's qnode addr, assigned RuleId) => [local half of the bell pair qubit record] | |
using | QubitResourcesWithSequenceNumbers = std::map<std::tuple<QNodeAddr, RuleId, SequenceNumber>, IQubitRecord*> |
(partner's qnode addr, assigned RuleId, sequence number) => [local half of the stationary bell pair qubit record] | |
using | SequenceNumberTracker = std::map<IQubitRecord*, std::tuple<QNodeAddr, RuleId, SequenceNumber>> |
using | SequenceNumberCounter = std::map<std::pair<QNodeAddr, RuleId>, SequenceNumber> |
ResourceId needs to be increment each time a qubit of certain properties (same <QNodeAddr>) is added to the Rule. | |
using | MessageResources = std::map<RuleId, std::deque<MessageRecord>> |
Store messages for each rule for decision making mainly used for WaitRules (e.g., purification, Pauli Frame correction). | |
using | QubitNameMap = std::unordered_map<QubitId, IQubitRecord*> |
QubitId and qubit record map. This is initialized in before each Program execution. | |
using | Memory = std::unordered_map<MemoryKey, MemoryValue> |
Memory is a simple dict to store the value during RuleSet execution. | |
using | RuleId = int |
using | SequenceNumber = unsigned long |
describes the order which Qubit is assigned to a Stage/Rule. This allows us to make assumptions that the same resource will be used in the same order across multiple nodes. | |
using | MessageRecord = std::vector<int32_t> |
describes message received that takes part in decision making of RuleSet. | |
using | String = std::string |
using | IQubitRecord = quisp::modules::qrsa::IQubitRecord |
using | MeasurementOutcome = quisp::backends::MeasurementOutcome |
measurement outcome for Instructions. | |
using | Time = omnetpp::SimTime |
alias for omnetpp's simulation time. | |
using | PurType = int |
purification type for Instructions. see rules::PurType enum. | |
using | None = std::nullptr_t |
using | LabelMap = std::unordered_map<Label, int> |
utility type for storing a label and corresponding instruction index. | |
Enumerations | |
enum | OpType : int |
enum class | RegId : int { REG0 , REG1 , REG2 , REG3 , REG4 } |
internal register id representation for Instructions. More... | |
enum class | ReturnCode : int { NONE , COND_FAILED , COND_PASSED , RS_TERMINATED , ERROR } |
Program specify a ReturnCode during the execution. Then, the Runtime determines to perform the action, execute the next Rule, or stop the RuleSet. More... | |
enum class | Basis : int { Z , X , Y , RANDOM } |
basis for measurement instruction in a Program. More... | |
enum class | ValueType { INT , MEASUREMENT_OUTCOME } |
enum for memory value types More... | |
Functions | |
std::ostream & | operator<< (std::ostream &stream, const QNodeAddr &value) |
bool | operator< (const QNodeAddr &a, const QNodeAddr &b) |
bool | operator== (const QNodeAddr &a, const QNodeAddr &b) |
std::ostream & | operator<< (std::ostream &stream, const QubitId &value) |
bool | operator< (const QubitId &a, const QubitId &b) |
bool | operator== (const QubitId &a, const QubitId &b) |
std::ostream & | operator<< (std::ostream &stream, const Label &label) |
bool | operator== (const Label &a, const Label &b) |
std::ostream & | operator<< (std::ostream &stream, const MemoryKey &key) |
bool | operator== (const MemoryKey &a, const MemoryKey &b) |
std::ostream & | operator<< (std::ostream &stream, const RegId &value) |
std::ostream & | operator<< (std::ostream &stream, const ReturnCode &value) |
std::ostream & | operator<< (std::ostream &stream, const Basis &value) |
std::ostream & | operator<< (std::ostream &stream, const MemoryValue &value) |
Variables | |
static const std::string | OpTypeStr [] |
a variant that is capable of storing all instructions
using quisp::runtime::LabelMap = std::unordered_map<Label, int> |
utility type for storing a label and corresponding instruction index.
measurement outcome for Instructions.
using quisp::runtime::Memory = std::unordered_map<MemoryKey, MemoryValue> |
Memory is a simple dict to store the value during RuleSet execution.
using quisp::runtime::MessageRecord = std::vector<int32_t> |
describes message received that takes part in decision making of RuleSet.
first index [0], always contain the sequence number.
using quisp::runtime::MessageResources = std::map<RuleId, std::deque<MessageRecord>> |
Store messages for each rule for decision making mainly used for WaitRules (e.g., purification, Pauli Frame correction).
using quisp::runtime::None = std::nullptr_t |
using quisp::runtime::PurType = int |
purification type for Instructions. see rules::PurType enum.
using quisp::runtime::QubitNameMap = std::unordered_map<QubitId, IQubitRecord*> |
using quisp::runtime::QubitResources = std::multimap<std::pair<QNodeAddr, RuleId>, IQubitRecord*> |
(partner's qnode addr, assigned RuleId) => [local half of the bell pair qubit record]
using quisp::runtime::QubitResourcesWithSequenceNumbers = std::map<std::tuple<QNodeAddr, RuleId, SequenceNumber>, IQubitRecord*> |
(partner's qnode addr, assigned RuleId, sequence number) => [local half of the stationary bell pair qubit record]
using quisp::runtime::RuleId = int |
using quisp::runtime::SequenceNumber = unsigned long |
describes the order which Qubit is assigned to a Stage/Rule. This allows us to make assumptions that the same resource will be used in the same order across multiple nodes.
using quisp::runtime::SequenceNumberCounter = std::map<std::pair<QNodeAddr, RuleId>, SequenceNumber> |
ResourceId needs to be increment each time a qubit of certain properties (same <QNodeAddr>) is added to the Rule.
using quisp::runtime::SequenceNumberTracker = std::map<IQubitRecord*, std::tuple<QNodeAddr, RuleId, SequenceNumber>> |
using quisp::runtime::String = std::string |
using quisp::runtime::Time = omnetpp::SimTime |
alias for omnetpp's simulation time.
|
strong |
basis for measurement instruction in a Program.
Enumerator | |
---|---|
Z | |
X | |
Y | |
RANDOM |
enum quisp::runtime::OpType : int |
|
strong |
|
strong |
Program specify a ReturnCode during the execution. Then, the Runtime determines to perform the action, execute the next Rule, or stop the RuleSet.
Enumerator | |
---|---|
NONE | do nothing. |
COND_FAILED | condition failed. stop the rule execution. |
COND_PASSED | condition passed. will perform the action. |
RS_TERMINATED | RuleSet terminated. will delete the RuleSet and the Runtime. |
ERROR | unrecorverable error raised. stop the simulation. |
|
strong |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const Basis & | value ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const Label & | label ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const MemoryKey & | key ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const MemoryValue & | value ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const QNodeAddr & | value ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const QubitId & | value ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const RegId & | value ) |
std::ostream & quisp::runtime::operator<< | ( | std::ostream & | stream, |
const ReturnCode & | value ) |
|
static |