HAL Features

For purposes of this document, the HAL features are presented as a set of commands and a set of metadata. The commands are categorised as either core, fundamental qubit commands which are common across all quantum technologies, or advanced or optional as defined in this document, which is specific to the vendor implementation.

Required HAL commands

The following is a non-exhaustive list of core HAL commands that MAY be extended in the future. Core HAL commands are mandatory and SHOULD be implemented for every system following the HAL specification. HAL command support will be conveyed through HAL metadata. Core commands MAY be extended in future with the introduction of new universal commands.

Control commands

The following table lists control commands that are required to enable advanced functionalities (e.g. multi-users, large addressing).

Table 23 Control Commands

Command

Parameters

Description

HAL Level

Start of Session

Type of Section

Defines the type of session, emulator, hardware, simulator. It is used to route the commands to the right destinations.

3-2 [*]

End of Session

None

Closes a session.

3-2 [*]

Set Page Qubit0

Offset for the qubit index (0)

Modifies the offset used in the qubit index computation. The register associated with the offset must be reset by a new Start of Session Command.

All

Set Page Qubit1

Offset for the qubit index (1)

Modifies the offset used in the qubit index computation. The register associated with the offset must be reset by a new Start of Session Command.

All

Single-qubit HAL commands

The following table lists the basic single qubit HAL commands.

Table 24 Single-qubit HAL commands

Command

Parameters (excluding qubit address)

Description

HAL Level

NOP

None

Performs no operation

All

State Prepare

|0>or |1>

Prepare specific qubit to a known state

All

State Prepare all

|0>or |1>

Prepares all the qubits to a known state

All

Qubit measure

Angles

Return the measured state of a qubit in the chosen basis. Arguments are the polar and azimuthal angle of the +1 eigenstate on the Bloch sphere (respectively). Measurements in the computational basis have both arguments = 0.

All

Rx

Angle

Perform qubit rotation [1] about X axis of Bloch sphere

All

Ry

Angle

Perform qubit rotation [1] about Y axis of Bloch sphere

All

Rz

Angle

Perform qubit rotation [1] about Z axis of Bloch sphere

All

X

None

Perform 180° qubit rotation about X axis of Bloch sphere

All

Y

None

Perform 180° qubit rotation about Y axis of Bloch sphere

All

Z

None

Perform 180° qubit rotation about Z axis of Bloch sphere

All

H

None

Perform Hadamard gate equivalent to Rx(180°) then Ry(90°)

All

S

None

Perform Phase gate equivalent to Rz(90°)

All

T

None

Perform T gate equivalent to Rz(45°)

All

Two-qubit HAL commands

The implementation of 2 qubit gates commands across the HAL is for further consideration, and it might even be outside the scope of this document. [3]

Table 25 Two-qubit HAL commands

Command

Parameters

Description

HAL Level

CNOT

Qubit addresses

Performs a Controlled-NOT operation

3

However, implementing core native 2-qubit gate sets will, in most cases, be necessary. Each vendor should define via optional commands the Level 2 and Level 1 implementation of the CNOT command.

Native two-qubit gates

Since native two-qubit gates are necessary to operate at a Level 1 HAL, hardware vendors SHOULD specify their native gates in the Optional HAL section.

Optional HAL commands

Commands specific to qubit implementations that are not relevant to others or contain potentially confidential information of a specific hardware platform are optional. The disclosure of a specific native hardware gate or the hardware topology is optional: disclosure to the user will improve performance, but some vendors might prefer not to disclose such information. [4]

Additionally, native 2-qubit gates are optional. For example, the RZZ 2-qubit gate or the CPHASE gate.

Table 26 Optional HAL commands.

Command

Parameters

Description

HAL Level

32 QBit Measure

Starting index of the qubit to read

Returns 32 measurements in parallel.

All [5]

For/If/While

To be defined.

Conditional execution. Hardware specific in terms of format and limits

All [5]

Opt1

None

Optional commands for hardware-specific instructions.

Specific.

Opt2

None

Optional commands for hardware-specific instructions.

Specific.

Required HAL responses

Users should at least be informed when:

  • The circuit completes successfully. Only required at Level 3 and Level 2 and define as completion ACKNOWLEDGE.

  • The commands they sent are INVALID. An example would be CNOT(0,0), a CNOT with both inputs being qubit 0;

  • An error has occurred in the quantum computer and the computation is INCORRECT.

Hardware labs can specify additional error codes to handle specific scenarios.

The format of the response:

Table 27 Response format

Response (4 bits)

CIRCUIT ID (12 bits)

Defines the type of error as per Table 7.6

Unique ID that identifies user and circuit. Needed in case of multi-user/multi-circuit execution

And the codes for the responses:

Table 28 Response codes

Response

VALUE

Description

ACKNOWLEDGE

0

The circuit execution was succesful

INCORRECT

1

The execution encountered an error. Returned measurements should be discarded

INVALID

2

One or more of the commands sent are incorrect. Nothing has been executed.

Level 1 access types are not required to return responses as the latency to acknowledge them would impact significantly performance and quantum up time.