Instruction Definitions

Included Basic Gate Types and Parameter Descriptions

Gate

Param

Type

Description

Gate Desc

RPhi

Single-qubit gate

qubit

uint32_t

Target qubit

axis

double

Rotation axis phase

angle

double

Rotation angle theta

order

uint32_t

Sequence timing

ECHO

Single-qubit gate

qubit

uint32_t

Target qubit

order

uint32_t

Sequence timing

IDLE

Single-qubit gate

qubit

uint32_t

Target qubit

delay

uint32_t

Time delay, variable, affects subsequent gate timing

order

uint32_t

Sequence timing

CZ

Double-qubit gate

qubit

uint32_t

Target qubit

ctrl

uint32_t

Control qubit

order

uint32_t

Sequence timing

Instruction Format

The instruction format adopts a nested JSON array object structure. The innermost gate object contains a combination of a basic gate and its parameters, as well as a Measure gate object. The basic gate is formatted as follows:

{"Gate": [Qubit..., Other parameters..., Execution timing]}

The Measure gate object is formatted as follows:

{"Measure": [[Qubit...], Execution timing]}

A complete single-circuit instruction is generally a JSON array composed of multiple aforementioned basic gate objects and a Measure gate object, formatted as follows:

[
    {"Gate0": [Qubit..., Other parameters..., Execution timing]},
    {"Gate1": [Qubit..., Other parameters..., Execution timing]},
    ...
    {"Gaten": [Qubit..., Other parameters..., Execution timing]},
    {"Measure": [[Qubit...], Execution timing]}
]

A task is generally composed of instructions from multiple circuits, which is a collection of the multiple single-circuit instructions mentioned above. Therefore, the complete instruction for a task is formatted as follows:

[
    [
        {"Gate0": [Qubit..., Other parameters..., Execution timing]},
        {"Gate1": [Qubit..., Other parameters..., Execution timing]},
        ...
        {"Gaten": [Qubit..., Other parameters..., Execution timing]},
        {"Measure": [[Qubit...], Execution timing]}
    ],
    ...
    [
        {"Gate0": [Qubit..., Other parameters..., Execution timing]},
        {"Gate1": [Qubit..., Other parameters..., Execution timing]},
        ...
        {"Gatem": [Qubit..., Other parameters..., Execution timing]},
        {"Measure": [[Qubit...], Execution timing]}
    ]
]

Instruction Example:

[
    [
        {"RPhi": [32, 270.0, 90.0, 0]},
        {"RPhi": [33, 270.0, 90.0, 0]},
        {"CZ": [32, 33, 30]},
        {"RPhi": [33, 90.0, 90.0, 70]},
        {"Measure": [[33, 32], 100]}
    ],
    [
        {"IDLE": [32, 30, 0]},
        {"Measure": [[32], 130]}
    ],
    [
        {"RPhi": [33, 270.0, 90.0, 0]},
        {"RPhi": [32, 180.0, 90.0, 100]},
        {"Measure": [[33, 32], 130]}
    ]
]