跳转至

4. QCIS Manual

QCIS is an instruction set for remote control of quantum computing physical systems. This means that the cloud platform will support users in remotely accessing its open interface for conducting 'cloud-based' quantum programming experiments on real quantum computers.

4.1 Overview of QCIS Instructions

QCIS (Quantum Control Instruction Set) is a set of instructions designed for controlling superconducting quantum computing hardware systems, aiming to abstract and standardize hardware control using instructions. It is distinct from quantum computer instruction sets like QASM (Quantum Assembly Language). The difference lies in the fact that QCIS is oriented towards the raw physical system, whereas QASM abstractly represents quantum gates. QCIS is tightly coupled with the physical system, and it is bound to the quantum processing an control system. If there are significant changes in the physical system, such as transitioning from Transmon Qubits to Flux Qubits or Phase Qubits, or changing couplers from Gmon to cavity couplers, a completely new version of QCIS would be required for compatibility.

4.2 QCIS Instruction Format

QCIS instructions are in the format of '\ \', consisting of instruction characters and target bits. Currently, the cloud platform supports instructions includes 14 single-qubit gates and one two-qubit gate, which are X, Y, Z, S, SD, H, T, TD, X2P, X2M, Y2P, Y2M, and CZ. Specific definitions will be provided in the next section. Target bits are represented by the letter 'Q' followed by the corresponding index (index), such as on a 12-qubit quantum computer on the cloud platform, identified as Q1, Q2, ..., Q12. Each instruction occupies one line. Different instructions cannot be stacked on the same line; for instance, 'X Y Q1' is not a valid syntax. Similarly, when the same gate acts on different qubits, they should be written on separate lines. For example, 'X Q1 Q2' is not a valid syntax. However, there is one exception to note: measurement gates can be written on the same line. For instance, if the experiment involves measuring the 1st, 4th, and 5th qubits, it can be represented as 'M Q1 Q4 Q5' on the same line or written on different lines for individual operations, such as 'M Q1', 'M Q4', 'M Q5'. QCIS instructions are case-insensitive.

4.3 QCIS Instruction Manual

The operations included in the native gates of the new cloud platform model are as follows,X2P, X2M, Y2P, Y2M, RZ, I, B, M.
In addition, the cloud platform is also equipped with composite gates operations:X, Y, S, SD, T, TD, Z, H, RX, RY, RXY.
Among them, native gates will no longer be translated and will be executed directly at the quantum computer end, while composite gates will definitely be translated according to rules into basic gates before being executed by the quantum computer. At present, this translation process cannot be shielded, but it does not rule out the possibility of further optimization in the future, to fine-tune composite gates for optimal use as basic gates.
If you do not want the steps before the quantum computer to modify your program, please try to use basic gates for circuit design as much as possible.

Table 1 describes the definition and verification rules of native gates.

Table 1: The usage rules for QCIS native gates

Instruction Explanation QCIS Instruction Example Verification Rules
X2P X2P = R_x(\pi/2) = e^{-i\pi/4 \, \sigma_x } = \frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1&-i\\-i&1\end{array}\right] X2P Q1 None
X2M X2M = R_x(-\pi/2) = e^{i \pi/4 \,\sigma_x} = \frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1&i\\i&1\end{array}\right] X2M Q1 None
Y2P Y2P = R_y(\pi/2) = e^{-i \pi/4\,\sigma_y} = \frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1&-1\\1&1\end{array}\right] Y2P Q1 None
Y2M Y2M = R_y(-\pi/2) = e^{i\pi/4\, \sigma_y } = \frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1&1\\-1&1\end{array}\right] Y2M Q1 None
CZ CZ =\left[ \begin{array}{cccc}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&-1\end{array}\right] CZ Q1 Q2 Q1, Q2 need to meet the hardware connection requirements
RZ RZ(\theta) = e^{-i\theta/2 \sigma_z } = \left[\begin{array}{cc} e^{-i\theta/2}& 0 \\ 0 & e^{i\theta/2}\end{array}\right] RZ Q1 \theta None
I No operation within a time t(ns) I Q1 t t is an integer, with a unit of 0.5ns, meaning that when t=1, the time is 0.5ns
B aligning quantum operations B Q1 Q2 None

Note:

  • There is no constraint on \theta in the RZ instruction, with the condition -\pi<\theta<\pi not applied

Table 2 describes the definition and compilation rules for composite gates.

Table 2: The compilation rules for QCIS composite gates

Instruction Explanation QCIS Instruction compilation rules
X X =\left[\begin{array}{cc} 0&1\\1&0\end{array}\right] X Q1 X2P Q1
X2P Q1
Y Y =\left[\begin{array}{cc} 0&-i\\i&0\end{array}\right] Y Q1 Y2P Q1
Y2P Q1
S S = e^{i\pi/4}R_z(\pi/2)=\left[\begin{array}{cc} 1&0\\0&i\end{array}\right] S Q1 RZ Q1 \pi/2
SD SD = e^{-i\pi/4}R_z(-\pi/2)= \left[\begin{array}{cc} 1&0\\0&-i\end{array}\right] SD Q1 RZ Q1 -\pi/2
T T = e^{i\pi/8}R_z(\pi/4)= \left[\begin{array}{cc} 1&0\\0&e^{i\pi/4}\end{array}\right] T Q1 RZ Q1 \pi/4
TD TD = e^{-i\pi/8}R_z(-\pi/4)= \left[\begin{array}{cc} 1&0\\0&e^{-i\pi/4}\end{array}\right] TD Q1 RZ Q1 -\pi/4
Z Z = iR_z(\pi)= \left[\begin{array}{cc} 1&0\\0&-1\end{array}\right] Z Q1 RZ Q1 \pi
H H = \frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1&1\\1&-1\end{array}\right] H Q1 Case1: RZ Q1 \pi
Y2P Q1
Case2:Y2M Q1
RZ Q1 \pi
RX RX(\theta) = e^{-i\theta/2 \sigma_x } = \left[\begin{array}{cc} \cos\theta/2 & -i\sin \theta/2 \\ -i\sin\theta/2 & \cos \theta/2 \end{array}\right] RX Q1 \theta RZ Q1 \pi/2
X2P Q1
RZ Q1 \theta
X2M Q1
RZ Q1 -\pi/2
RY RY(\theta) = e^{-i\theta/2\, \sigma_y } = \left[\begin{array}{cc} \cos\theta/2 & -\sin \theta/2 \\ \sin\theta/2 & \cos \theta/2 \end{array}\right] RY Q1 \theta X2P Q1
RZ Q1 \theta
X2M Q1
RXY RXY(\phi, \theta) = e^{-i \theta/2 \hat{n}\cdot\hat{\sigma}}
=\left[\begin{array}{cc} \cos \theta/2 & -ie^{-i\phi}\sin\theta/2 \\-i e^{i\phi} \sin\theta/2 & \cos\theta/2\end{array}\right]
\hat{n} = (\cos\phi, \sin\phi, 0)
RXY Q1 \phi~~\theta RZ Q1 \pi/2 − \phi
X2P Q1
RZ Q1 \theta
X2M Q1
RZ Q1 \phi-\pi/2

Note:

  • The H instruction has two equivalent compilation forms, which are randomly selected in a 1:1 ratio during actual compilation

can be translated to English as "Latest open instruction in July 2023

can be translated to "Add arbitrary control pulse operation instruction

All bit operations (including single-qubit gates and two-qubit gates) are achieved by applying specific control pulses. This instruction enables the highest degree of control over qubits.
The instruction format is::
PULSE [operate qubits] [pulse parameter list]
abbreviated instructions:PLS [operate qubits] [pulse parameter list]
operate qubits: qubits with added pulses, applicable to all operable quantum devices, including data qubits, coupling qubits, readouts, amplifiers, and more;
parameter list:[waveform identifier][waveform start time][length, amplitude, frequency, phase, dragAlpha][other waveform parameters]。

  • waveform identifier. specified waveform type:
waveform identifier corresponding waveform type
0 Numeric waveform, where the value of each point in the waveform is provided by the user in numerical form through [other waveform parameters]. Instruction example: PULSE C02 -1 256 0 0 0 0 0 200 100 300 400 … 23466. In this instruction, a numeric waveform 200 100 300 400 … 23466 is added, and the waveform start time is 256. The parameters length, amplitude, frequency, and phase have no significance for numeric waveforms.
1 flattop
2 cosine
other waveforms currently unavailable
  • Waveform Start Time (tStart): Relative to the start of the control waveform sequence, measured in DAC sampling periods. When tStart < 0, it indicates that the waveform starts at the end time of the previous gate instruction waveform on the operated quantum device. In other words, it generates the sequence by concatenating as in standard gate operations. When tStart >= 0, the waveform starts at tStart and is independent of the length of the preceding gate sequence. This allows for adding waveforms at any position freely;
  • length:Waveform length, measured in DAC sampling periods;
  • amplitude:Waveform amplitude, measured in DAC code values, with a maximum amplitude of 32768;
  • frequency:Sideband mixing frequency, in Hertz;
  • phase:Sideband mixing phase, in radians;
  • dragAlpha:DRAG correction factor;
  • Other waveform parameters:Additional parameters that may be required for waveform generation, which depend on the specific waveform type. For example, in the case of numeric waveforms, the other waveform parameters consist of a numerical sequence that defines the value of each sampling point in the waveform;
    Note: For specific waveform types, some parameters may be irrelevant, in which case their values will not be used and can be assigned arbitrary values. For example, the parameters length, amplitude, frequency, and phase have no significance for numeric waveforms.

Example:
PLS G107 0 60 0 0 0 0 0 0 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 0
This instruction adds a numerically defined waveform to qubit G107, with a waveform start time of 60 (corresponding to 30ns). The waveform is defined by the numerical sequence: 0 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 5E3 0, defining a square wave.

PLS G107 1 -1 100 0 0 0 0 4
This instruction adds a predefined waveform "flattop" (a square wave with smooth rising and falling edges) to qubit G107. The waveform start time is the end time of the previous instruction's waveform on qubit G107, plus 1 (0.5ns), which means it is concatenated with the existing waveform. In this case, the waveform has a length of 100 (50ns), with rising and falling edges of 4 (2ns), and an amplitude of 0. Because the added waveform has an amplitude of 0, the purpose of this instruction is to introduce a 50ns delay without performing any operation.

coupling qubit enables coupling operation

This operation is used to adjust and control the coupling function of the coupling qubit. Instruction format:
G [Coupling qubit] [Duration of operation] [Coupling strength]
Coupling qubit:The coupling qubit under operation. This operation is applicable exclusively to coupling qubits and cannot be applied to data qubits or other quantum devices.
Duration of operation:Coupling activation duration, unit: DAC sampling periods.
Coupling strength:Coupling activation strength (amplitude), unit: Hertz.

Example:
G G107 100 -3E6
This instruction sets the coupling strength of coupling qubit G107 to 3MHz and maintains it for 100 (50ns) before turning it off.

Coupling gate operation on the coupling qubit

Through this operation, control the coupling qubit to achieve two-qubit coupling exchange CZ gate(Shaowei Li et al 2022 Chinese Phys. Lett. 39 030302)。
Instruction format:
AACZ [Coupling qubit]