9#include <omnetpp/simtime.h>
43using Time = omnetpp::SimTime;
124struct ::std::hash<quisp::runtime::QNodeAddr> {
130struct ::std::hash<quisp::runtime::QubitId> {
136struct ::std::hash<quisp::runtime::MemoryKey> {
142struct ::std::hash<quisp::runtime::Label> {
148struct ::std::hash<std::pair<quisp::runtime::QNodeAddr, quisp::runtime::RuleId>> {
150 size_t operator()(
const std::pair<quisp::runtime::QNodeAddr, quisp::runtime::RuleId>& p)
const {
151 auto seed = std::hash<int>()(p.first.val);
153 seed ^= std::hash<int>()(p.second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
The QubitRecord interface.
Definition IQubitRecord.h:17
quisp::modules::qubit_record::IQubitRecord IQubitRecord
Definition QRSA.h:8
Definition InstructionVisitor.cc:7
omnetpp::SimTime Time
alias for omnetpp's simulation time.
Definition types.h:43
bool operator<(const QNodeAddr &a, const QNodeAddr &b)
Definition types.cc:14
Basis
basis for measurement instruction in a Program.
Definition types.h:116
RegId
internal register id representation for Instructions.
Definition types.h:48
unsigned long SequenceNumber
describes the order which Qubit is assigned to a Stage/Rule. This allows us to make assumptions that ...
Definition types.h:25
bool operator==(const QNodeAddr &a, const QNodeAddr &b)
Definition types.cc:15
int RuleId
Definition types.h:18
std::ostream & operator<<(std::ostream &stream, const QNodeAddr &value)
Definition types.cc:10
int PurType
purification type for Instructions. see rules::PurType enum.
Definition types.h:45
std::string String
Definition types.h:35
std::vector< int32_t > MessageRecord
describes message received that takes part in decision making of RuleSet.
Definition types.h:32
ReturnCode
Program specify a ReturnCode during the execution. Then, the Runtime determines to perform the action...
Definition types.h:55
@ 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.
@ COND_FAILED
condition failed. stop the rule execution.
std::unordered_map< Label, int > LabelMap
utility type for storing a label and corresponding instruction index.
Definition types.h:113
std::nullptr_t None
Definition types.h:110
label to annotate the instruction index in a Program.
Definition types.h:95
Label(std::string val)
Definition types.cc:26
std::string val
Definition types.h:97
a key of memory key-value store in a RuleSet
Definition types.h:103
std::string val
Definition types.h:105
MemoryKey(std::string key)
Definition types.cc:33
internal class to describe QNode's address.
Definition types.h:70
QNodeAddr()
Definition types.h:71
int val
Definition types.h:73
describes Qubit id in a Program. This is like a local variable name in a runtime::Program....
Definition types.h:83
QubitId()
Definition types.h:84
int val
Definition types.h:88
size_t operator()(const QubitId &) const
hash function for unordered map
Definition types.cc:18