The invention discloses a
data structure representing a
quantum program, the
data structure includes:
quantum circuit class,
quantum program class, Node Class,
Quantum Logic Gate Node Class, Control node class, Determine Expression Node Class, the
quantum circuit class is used for storing a set of
quantum logic gates using a container, the quantum program class is used for storing a set of node classes using a container, The node class is a
quantum circuit class, a quantum program class, a
quantum logic gate node class, and a parent class of the control node class. The
quantum logic gate nodeclass is used for storing the qubits of the operation of the quantum
logic gate, the
unitary matrix corresponding to the quantum
logic gate, and the judgment expression node class is used for storingthe related information of the judgment expression. The invention has the advantages that the execution sequence of the recordable quantum instructions, the reusable
quantum circuit, the condition judgment expression input by the developer can be recorded by the control node type, and finally the
executable quantum circuit of the quantum program can be judged according to the final result.