QuISP
Loading...
Searching...
No Matches
def_opcodes.h
Go to the documentation of this file.
1
7// X-macro pattern
8// https://quuxplusone.github.io/blog/2021/02/01/x-macros/
9#ifdef OP
10#ifndef OP_LAST
11#define OP_LAST OP
12#endif
13OP(DEBUG)
14OP(DEBUG_RUNTIME_STATE)
15OP(ADD)
16OP(SUB)
17OP(INC)
18OP(BITWISE_AND)
19OP(BITWISE_OR)
20OP(BITWISE_XOR)
21OP(ERROR)
22OP(RET)
23
24// branch
25OP(JMP) // jump
26OP(BEQ) // branch if eq
27OP(BEZ) // branch if zero
28OP(BNZ) // branch if not zero
29OP(BNE) // branch if not equal
30OP(BLT) // branch if less than
31OP(BGE) // branch if greater or equal
32OP(BRANCH_IF_LOCKED) // branch if the given qubit is locked
33OP(BRANCH_IF_QUBIT_FOUND) // branch if the qubit found after GET_QUBIT
34OP(BRANCH_IF_MESSAGE_FOUND) // branch if GET_MESSAGE flag is set
35
36// memory
37OP(LOAD)
38OP(STORE)
39
40OP(LOAD_LEFT_OP)
41OP(LOAD_RIGHT_OP)
42
43// basic op
44OP(GET_QUBIT)
45OP(GET_QUBIT_BY_SEQ_NO)
46OP(SET)
47OP(MEASURE_RANDOM)
48OP(MEASURE)
49OP(FREE_QUBIT)
50OP(LOCK_QUBIT)
51OP(GATE_X)
52OP(GATE_Z)
53OP(GATE_Y)
54OP(GATE_CNOT)
55OP(PURIFY_X)
56OP(PURIFY_Y)
57OP(PURIFY_Z)
58
59// resource management
60OP(SET_PARTNER)
61OP(PROMOTE)
62
63// send classical messages
64OP(SEND_LINK_TOMOGRAPHY_RESULT)
65OP(SEND_PURIFICATION_RESULT)
66OP(SEND_SWAPPING_RESULT)
67
68// messages
69OP(GET_MESSAGE)
70OP(DELETE_MESSAGE)
71OP(COUNT_MESSAGE)
72OP(GET_MESSAGE_SEQ)
73
74OP_LAST(NOP)
75#endif
76#undef OP
77#undef OP_LAST
#define OP(Opcode)
Definition opcode.h:14
#define OP_LAST
Definition opcode.h:26