0% found this document useful (0 votes)
41 views

Origin Pilot A Quantum Operating System For Effecient Usage of Quantum Resources

Origin Pilot is a quantum operating system proposed to efficiently manage quantum computing resources. It includes modules for quantum task scheduling, resource management, quantum program compilation, and automatic qubit calibration. Origin Pilot can schedule tasks across multiple quantum processors, execute programs in parallel, and calibrate qubits to improve performance and resource utilization. The authors evaluate Origin Pilot's positive impact on circuit fidelity under qubit mapping and its ability to automatically calibrate qubits and run programs in parallel on multiple processors. Origin Pilot is designed to optimize hybrid quantum-classical systems.

Uploaded by

21311a04r1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Origin Pilot A Quantum Operating System For Effecient Usage of Quantum Resources

Origin Pilot is a quantum operating system proposed to efficiently manage quantum computing resources. It includes modules for quantum task scheduling, resource management, quantum program compilation, and automatic qubit calibration. Origin Pilot can schedule tasks across multiple quantum processors, execute programs in parallel, and calibrate qubits to improve performance and resource utilization. The authors evaluate Origin Pilot's positive impact on circuit fidelity under qubit mapping and its ability to automatically calibrate qubits and run programs in parallel on multiple processors. Origin Pilot is designed to optimize hybrid quantum-classical systems.

Uploaded by

21311a04r1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Origin Pilot: a Quantum Operating System for Effecient Usage of Quantum Resources

Weicheng Kong,1, 2 Junchao Wang,2, 3 Yongjian Han,2 Yuchun Wu,2


Yu Zhang,4 Menghan Dou,1 Yuan Fang,1 and Guoping Guo1, 2
1
Origin Quantum Computing Company Limited, Hefei 230026, China
2
CAS Key Laboratory of Quantum Information (University of Science and Technology of China), Hefei 230026, China
3
State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou 450002,China
4
School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China
The operating system is designed to manage the hardware and software resources of a computer.
With the development of quantum computing, the management of quantum resources and cooper-
ation between quantum systems and other computing resources (e.g. CPU, GPU and FPGA etc.)
become the key challenge for the application of quantum computing to solve real world problems. In
this paper we propose a quantum operating system, Origin Pilot. Origin Pilot includes the module
arXiv:2105.10730v1 [quant-ph] 22 May 2021

of quantum task scheduling, quantum resource management, quantum program compilation and
qubits’ automatic calibration. With these modules, Origin Pilot can manage the quantum com-
puting resources and solve the multi-quantum processor scheduling problem. It can also allow the
parallel execution of multiple quantum programs and calibrate the quantum resource effectively.
Thus, the performance of resources is guaranteed and the resource utilization is improved. By com-
paring the results with and without Origin Pilot, we evaluate the impact on a quantum circuit’s
fidelity of qubits mapping algorithm. We also evaluate the effectiveness of automatic calibration
and parallel execution of multi-quantum processors. Finally, Origin Pilot can be easily customized
for hybrid computing resources.
Keywords: Origin Pilot; Quantum Operating System; Quantum Computing; Quantum Proces-
sor

I. INTRODUCTION ing resources[18] becomes one of the key problem. In


2015, Henry et al. introduces three quantum comput-
The quantum computing is a new computing paradigm ing hardware architectures including quantum FPGA,
based on the combination of quantum mechanics and quantum x86 system and quantum distributed comput-
computer science[1]. It provides enormous parallel com- ing system[19]. In 2020, Reid et al. propose a multi-
puting power and storage which exceeds all classic com- programming approach that can execute multiple cir-
puting technologies taking advantage of the quantum su- cuits in parallel by analyzing the dependency between
perposition and entanglement[2][3]. The qubits serves circuits[20]. There are two commercial companies pub-
as the basic unit in a quantum computer. Compared lishing their quantum operating systems. Deltaflow.OS
with classic computing, the quantum computing can allows the same quantum circuit executed on different
achieve exponential speedup in decryption[4], quantum types of quantum computing hardware, which can allow
chemistry[5], finance[6] and machine learning[7][8] etc. quantum application developers focus more on the soft-
ware and application itself. Parity OS can optimize a
There are different physical approaches for implement- quantum circuit with the assistance of a quantum com-
ing a quantum computer, such as the semiconductor piler which can further be compatible with a specific
spin[9], superconducting[10], trapped-ion[11][12] and op- quantum processor.
tical systems[13][14] etc. The quantum computer can be
applied in its early stages with the improvement of ma- Existing works try to optimize the performance of a
terial and manufacturing, optimization of environmen- quantum computer from different perspectives. Based
tal noise, control and electronic system development, the on existing works, we find there are two problems which
advancement in control architecture and basic quantum need to be solved:
software[15]. Researchers also demonstrate the quantum 1) Multiple quantum processors’ scheduling. Current
advantage in recent two years. In 2019, Google proved quantum cloud system only allows users to use only a
that the Sycamore quantum processor with 53 qubits can single quantum processor at a time. Once the quantum
exceed the most powerful super computers in random cir- processor is assigned to a user, it is fully occupied by the
cuit sampling problem[16]. IBM published the quantum user. Other users cannot access the resources until the
computing service in cloud based on the engineering ad- assigned user release the quantum processor. When the
vancement. Apart from IBM, there are other quantum quantum computing service allows users to choose the
computing service providers with real quantum comput- quantum processors, the queuing time will far exceeding
ing backend, such as D-Wave, Google, Rigetti, Quantum the execution time especially for the quantum processor
Inspire and Origin Quantum etc. with better performance. Although other quantum pro-
However, with the increasing demand on quantum cessors can meet the computing’s requirement, the quan-
computing, how to effectively manage quantum com- tum task still needs to wait. Such situation can lead to
puting infrastructures[17] and use quantum comput- the resource under utilization. The main reason is that
2

there is no automatic resource allocation and scheduling superposition of 0 and 1. Formally |ψi = α|0 > +β|1 >,
for multiple quantum tasks. Thus, in this paper we de- where α, β ∈ C, |α|2 + |β|2 = 1.
sign an algorithm to allocate quantum resources based Quantum Measurement: Quantum measurement is
on the requirements of the submitted quantum tasks. an approach for acquisition of a quantum state’s infor-
2) automatically optimize the quality of a qubit. The mation. The quantum measurement can collapse to |0 >
qubit can be easily disturbed by environment, which or |1 >.
makes the qubits’ performance fluctuate. The quantum Quantum logic gate: A quantum gate can be seen as
gates’ fidelity will decrease if the qubits’ are not prop- a unitary transformation to qubits. The quantum logic
erly calibrated. An existing solution is to calibrate all gate should be a revertible gate. To support universal
the qubits when the performance deteriorates. However, quantum computing, we only need to implement several
the existing calibration approach has the following draw- single qubit’s unitary transformation and a double gate
backs: a quantum circuit’s fidelity cannot be guaranteed (CNOT). The single qubit gates include the Hadamard
before calibration; the quantum processors cannot work gate, T gate and S gate. Widely used quantum logic
during the long period of calibration. The Optimus is gates and their corresponding unitary matrix are shown
an automatic calibration system developed by Google. in Table. II A.
The Optimus can traverse all the qubits’ state and deal Quantum circuit: Quantum circuit is one of the most
with the “bad” qubits in real time. However, they don’t widely used quantum computing model. In this model,
explicitly determine the state of qubits which are not cal- any unitary transformation can be implemented by com-
ibrated. Moreover, they don’t consider the situation that bining several universal quantum gates. A sequence of
the calibration is conducted while there are other general quantum gates is called a “quantum circuit”. A quan-
quantum tasks. tum circuit can be visualized. For instance, the quantum
To compensate the above problems, we propose Ori- circuit for the Grover algorithm can be represented as
gin Pilot, which is a quantum operating system that can Fig. 1.
effectively use quantum resources. We implement four
services to tackle the above problems, including quantum
task scheduling, quantum resource automatic calibration,
quantum circuit compiling and quantum resource man-
agement.
The main contribution of Origin Pilot includes:
1) Origin Pilot can calibrate a single or multiple qubits
online without interrupting other quantum circuits;
2) Origin Pilot can allocate quantum resources for FIG. 1. The quantum circuit for the Grover algorithm
quantum circuits according to the state of the quantum
resources and the requirements of quantum circuits; Generally, the initial quantum states are all zeroed in
3) Origin Pilot can reduce the decoherent noise with most quantum computing cases. After execution of a
dynamic decoupling in qubits. Thus, Origin Pilot allows quantum circuit, we can get the results by measuring the
multiple circuits executing on the same quantum proces- qubits.
sor. The average completion time for quantum circuits Quantum Program: A quantum program is con-
can be greatly reduced. sisted of a combination of quantum logic gates, classic
The rest of this paper is organized as follows: In Sec- computing and measurement.
tion 2 we introduce the basic concepts of quantum com- Quantum state’s fidelity: Due to the interference
puting and quantum operating system; In Section 3 we of noise and the quality of a quantum processor, the ideal
propose the overall architecture and workflow of Ori- results of quantum gate is not exactly the same as the
gin Pilot; In Section 4 we describe the solution to the real execution of quantum gates. The difference between
multi-quantum processor load balancing, multi-quantum the ideal quantum state and real quantum state can be
program parallel computing and automatic calibration of represented as “fidelity”. The higher the fidelity means
qubits; In Section 5 we analyze the experimental results the less error, which also means the computing results
of Origin Pilot; In Section 6 we conclude this paper and tend to be better.
propose the future works.

B. Difference between classic computing and


II. PRELIMINARY KNOWLEDGE quantum computing

A. Quantum Computing The quantum computing and classic computing are


based on different phyiscal theories. Thus, their
Qubits: Qubits are the basic elements for quantum paradigm and architecture are different. In this section,
computing. In classic computing, a bit can only represent we discuss the main difference between quantum comput-
0 or 1 at a time. However, a qubit can represent the ing and classic computing to clarify why existing classic
3

Single qubit logic gate Multi qubit logic gate


 
 √ √  1 0 0 0
1/√2 1/ √2 0 1 0 0
H= CNOT = 
 
1/ 2 −1/ 2 0 0 0 1
0 0 1 0

 
  1 0 0 0
1 0 0 1 0 0
S= CZ = 
 
0 i 0 0 1 0
0 0 0 −1

 
  1 0 0 0
1 0 0 0 1 0
T= SWAP =  
0 eiπ/4 0 1 0 0
0 0 0 1

 
  1 0 0 0
0 1 0 1 0 0 
X= CU =  
1 0 0 0 U00 U01 
0 0 U10 U11

1 0 0 0 0 0 0 0
 
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
 
 
0 −i 0 0 0 1 0 0 0 0
 
Y= Toffoli = 
i 0 0 0 0 0 1 0 0 0

0 0 0 0 0 1 0 0
 
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0

 
  1 0 0 0
1 0 0 1 0 0
Z= CR =  
0 −1 0 0 1 0
0 0 0 eiθ

 
1 0 0 0

cos( θ2 ) −e × sin( θ2 ) θ θ
 
0 cos( ) isin( ) 0
U3 = iSWAP =  2 2 
eiφ × sin( θ2 ) eiλ+iφ × cos( θ2 ) 0 isin( θ ) cos( θ ) 0
2 2
0 0 0 1

operating system cannot be directly applied to quantum qubit mapping more difficult.
computing.

2. Multi-Processor Scheduling
1. Qubit Mapping
In a classic computer, the cores in a CPU are mostly
The topology and basic logic gates of different quan- homogeneous. Thus, when scheduling tasks on these
tum processors are different. Thus, the different qubit cores, we don’t need to consider the difference between in-
mapping strategies can make the fidelity of the results structions. Different physical implementations of a quan-
given by a certain quantum circuit different during com- tum computer can have different topology and support
pilation of a quantum program. Moreover, the qubits’ different quantum gates. After compilation, even the
properties can also vary with time, which can make the same circuit can be compiled as different quantum cir-
4

cuits under different topology and quantum gates. Thus, Quantum Task: A quantum application can send
we should carefully schedule the quantum tasks in the multiple quantum circuits to quantum processors. Each
quantum processors to better enable the performance. quantum circuit can be seen as an individual quantum
task. Thus, we abstract a quantum circuit as a quantum
task.
3. Quantum Parallel Computing Quantum Transaction A quantum transaction is the
basic element which can be executed on a single quantum
processor. It can includes multiple quantum tasks. These
Thread is the basic scheduling unit in a classic oper-
quantum tasks in a quantum transaction can be executed
ating system. A single core can only execute a thread at
wholy or not.
a time. By switching between contexts, multiple threads
Quantum Thread: The basic unit for scheduling in a
can be easily switched with each other. Thus, multiple
quantum operating system. The quantum operating sys-
threads parallelism can be realized.
tem schedules the quantum threads based on the resource
In a quantum computer, the quantum circuit is the
requirement of a quantum transaction. Once a quantum
basic scheduling unit. Since the state of a qubit cannot
transaction is executed on a quantum processor, we can
be cloned and the decoherence time of qubits is short,
call it a “quantum thread”.
multiple quantum circuits cannot switch with each other
Quantum processor: The basic execution unit of a
as classic computing. However, when the qubits used by
quantum computer. A quantum processor can only exe-
quantum circuits are different, the execution of multiple
cute a quantum thread at a time. A quantum application
circuits can be realized in a quantum processor.
can use multiple quantum processors.
Quantum programming framework: A fundamen-
tal framework for building, excuting and optimizing a
4. Automatic Calibration quanutm application. The framework can also provide
basic algorithmatic libraries.
The manufacture of physical instruments in classic Quantum resource: Quantum resources refer to
computing is quite mature. The quality of these de- the physical system for processing and storing quantum
vices is stable. Their performance will not fluctuate in information, following the rule of quantum mechanics.
a short period of time. The objective of classic operat- Specifically, the quantum resource includes the quantum
ing system is to improve the resource utilization through processor and quantum storage.
technologies such as memory management. For a quan-
tum computer, we can improve the resource utilization
through the parallel execution of quantum circuits. Ex- III. ARCHITECTURE OF ORIGIN PILOT
isting solutions are based on an assumption that the qual-
ity of qubits are stable for a period of time. However, the A. Overall Architecture
quality of qubits will deteriorate during the execution of
quantum circuits. In such situations, the qubit mapping
Origin Pilot can support different computing backends
cannot achieve satisfiable results with static single gate’s
such as quantum processors, quantum virtual machines
fidelity, double gate’s fidelity and measurement fidelity.
and high performance computing clusters etc. The quan-
When using quantum computers we should continuously
tum computing needs the assistance of classic computers.
check the quality of qubits and calibrate the qubits au-
For instance, when solving NP-hard problems, we should
tomatically.
use classic computers to validate the results. For hy-
In summary, the classic computing and quantum com-
brid algorithms like quantum machine learning, quantum
puting are quite different. Thus, classic operating sys-
chemistry and quantum finance algorithms, the classic
tems cannot be easily compatible with a quantum com-
computing part plays a vital role. Thus, we should deal
puter. To meet this ends, Origin Pilot provides quantum
with classic information during the meanwhile execution
task scheduling, quantum resource management, qubits’
of quantum tasks. Thus, we classify the system services
calibration, quantum circuits compiling to overcome the
to quantum services and classic services, which are shown
problem of qubits’ automatic calibration and multiple
in Fig 2.
quantum processors’ load balancing. With Origin Pilot,
The quantum services are repsonsible for dealing with
the quantum circuits’ fidelity and resource utilization of
quantum tasks and interact with the quantum computing
quantum resources can be greatly improved.
backend. By supporting multiple quantum processors’
task scheduling, quantum resource management, multi-
ple quantum circuit parallism, quantum program compi-
C. Basic Definitions lation and automatic calibration of qubits, we can im-
prove the resource utilization of quantum processors and
Quantum application: A quantum application is keep the fidelity of qubits within a certain threshold.
a hybrid program including both the classic computing The classic computing services are dealing with classic
part and quantum computing part; computing tasks and interact with the classic comput-
5

FIG. 2. Overall Arhictecture of Origin Pilot

ing backend. Moreover, the classic service should also be quantum application which can be executed on the server
responsible for quantum computer’s configuration, quan- side of Origin Pilot. If a hybrid program wants to use
tum device monitoring and system service monitoring. the high performance computing clusters, users can also
Specifically, large scale data processing with quantum program with distributed computing frameworks for the
and classic hybrid algorithms can be enabled with these classic part.
classic services. The classic services should also moni- 2. When Origin Pilot receives a hybrid quantum ap-
tor the state of quantum devices and system service to plication, the classic part can be executed on the con-
maintain the stability of the system. trolling server. If the hybrid program is written in dis-
A quantum application can call the system services tributed computing programming languages, the Origin
provided above. Based on the quantum programming Pilot will send the classic computing tasks to high perfor-
framework and distributed computing framework, Ori- mance computing clusters with a classic job scheduling
gin Pilot can support the quantum and classic hybrid system.
distributed computing. A quantum application can pre- 3. The quantum computing part will be sent to the
process the data with classic services. The quantum quantum task scheduling service. The quantum task
programs can be generated and sent to quantum pro- scheduling service will sort the quantum tasks based on
cessors. After computation, results can be retrieved by their priority and choose a quantum task with the high-
measurements and analyzed by classic computers. Fur- est priority when its resource requirement can be met.
ther, we can determine the next parameterized quantum Then the quantum circuit will be compiled to the topol-
task. The users can also manage quantum devices and ogy of the target quantum processor. Then the compiled
quantum resources with the resource manager in Origin code will be sent to the quantum computer. Before ex-
Pilot. ecution, a quantum transaction will bind to a quantum
thread which will record the quantum transaction’s ID,
the target quantum processor’s ID, the tasks’s ID etc. Af-
B. Workflow of Origin Pilot ter computing, we can identify the corresponding result
for a quantum task and return it to the users’ program.
The workflow of Origin Pilot is shown in Fig.3. Then the occupied qubits will be released.
1. Users can write hyrbid programs with QRunes[21]. When executing the quantum tasks, Origin Pilot can
The QRunes compiler can identify the quantum part and also calibrate the performance of quantum resources.
classic part with lexical, grammer and semantic analysis. When the performance of qubits deteriorate, the auto-
Then the hybrid quantum program can be transpiled to a matic calibration service will set the qubits to be under-
6

FIG. 3. Workflow of Origin Pilot

calibrated and notify the quantum task scheduling ser- system’s state. Different scheduling algorithms will be
vice to calibrate their state. Origin Pilot will assign high- applied based on the type of a quantum task.
est priority to the calibration task and combine them A qubits’ automatic calibration task usually requires
with other quantum computing tasks as a quantum trans- real time response. The runtime of these tasks are usu-
action which will be sent to the quantum devices. ally very short. The physical qubits to be calibrated
are explicitly described in a quantum task. To guaran-
tee the reliability of the quantum computing, these type
IV. SOLUTIONS OF ORIGIN PILOT of quantum tasks should be prior to be executed. For
general quantum tasks, we can allocate qubit resources
In this section, we will describe the solutions to the based on the topology of quantum processors and sys-
problem of multiple quantum processors’ load balancing, tem’s state.We apply the HRRN (Highest Response Ra-
multi-quantum program parallism and automatic cali- tio Next) scheduling algorithm for the general quantum
bration. tasks. The HRRN algorithm considers both the waiting
time and runtime of quantum tasks. The priority of a
quantum task is defined as:
A. Load Balancing of Multiple Quantum
Processors
Twaiting time + Truntime Tresponse time
Rp = = (1)
Truntime Truntime
The multiple quantum processors’ load balancing is to
schedule multiple quantum tasks on multiple quantum With the increase of waiting time Twaiting time , the
processors. In Origin Pilot, a quantum task is consisted quantum task with higher Rp is prior to be executed.
of the following elements: Based on the above algorithm, the workflow of quan-
(1) The number of qubits required for a quantum task; tum task scheduling service is shown in Fig.4.
(2) Quantum program’s intermediate representation; Once receiving a quantum task, the quantum task
(3) Quantum processor’s ID; scheduling service will:
(4) Type of a quantum task: a quantum task can be a (1) acquire the runtime of the quantum task and put
general quantum task or automatic calibration task; the task into the waiting list;
(5) Priority: The priority of a quantum task. (2) update the Rp of all the tasks in waiting list;
A quantum task can only be executed on corresponding (3) allocate quantum processors that can best fit the
the quantum processor if the quantum processor’s ID is quantum task;
assigned. Otherwise, the quantum task scheduling sys- (4) compile the quantum task to the quantum exe-
tem will allocate the quantum processors based on the cutable file and pulse;
7

gates. Thus, we try to minimize the number of SWAP


gates when mapping user’s quantum circuits to physical
quantum processors.
The qubits’ mapping can be seen as a token-swap
problem[25]. As the number of qubits increases, the
time complexity for finding the optimal mapping solu-
tion increases exponentially. Apart from minimizing the
SWAP gates, we should also consider the difference be-
tween qubits. Thus, we should choose the route with the
best fidelity.

Input: src QProg (Original quantum program), QPU adj


(topology of a quantum processor)
Output: mapped QC (a quantum program that can fit in
the input quantum processor after mapping)
1: Convert the original quantum program to a DAG;
2: Initialize the sub graph vec 2d to store the maximum sub-
graph sequence;
3: //phase 1: Traverse the DAG to get the maximum sub-
graph sequence
FIG. 4. Multiple quantum processors’ load balancing 4: while (the vertex number of the DAG>0) do
5: Choose the vertex V with in-degree=0;
6: if (the sequence of subgraph S is not NULL) then
7: if (all the subgraph of S is not extensible) then
(5) bind the quantum task to a quantum thread and 8: Append S to sub graph vec 2d;
start execution. 9: Clear the elements in S;
Specifically, the qubits’ automatic calibration task are 10: Break;
assigned with higher priority. The qubits used are ex- 11: else
plicitly designated so the qubit mapping will not hap- 12: Extend S based on QPU adj;
pen in this type of quantum tasks. Since the qubits in Remove the un-extensible subgraph from S;
these quantum processors are divided into different re- 13: end if
14: else
gions, the automatic calibration tasks won’t interfere the
15: Initialize S based on the possible mapping from V
execution of general quantum tasks. Moreover, the cali- to QPU adj;
bration quantum tasks are scheduled with a FCFS(First- 16: end if
Come-First-Served) strategy. 17: end while
//phase 2:Token-Swapping, get the best path
18: Initialize best path vec to store the best path;
B. Parallel Execution of Multiple Quantum 19: for each S cur in sub graph vec 2d do
Programs 20: Calculate the minimum Cost from each subgraph of
S cur to each subgraph of S next with Token-Swapping
algorithm;
Currently Origin Pilot apply synchronous parallisation 21: Append the best path best swap to sub best path vec;
to enable parallel computing. Multiple quantum tasks 22: end for
are combined as a quantum transaction. The quantum 23: for each best path in best path vec do
tasks in the quantum transaction will be executed in par- 24: Calculate the overall fidelity of the best path
allel. Each time only one quantum transaction can be ex- 25: end for
ecuted. Before execution, the logic qubits will be mapped 26: Choose the f inal bestp ath with best fidelity from
best path vec;
to the physical qubits in the quanutm processors.
//phase 3:Traverse f inal best path, and generate
The problem of mapping is to transform a quantum the new mapped QC
circuit to a target quantum circuit that can be directly 27: for each path nodeinf inal best path do
executed on a quantum processor while maintaining its 28: if (path node is a subgraph) then
original function[22][23][24]. Sometimes a quantum cir- 29: Convert path node to a quantum program sub cir;
cuit may require two qubits to be entangled. However, in 30: Insert sub cir to mapped QC;
a physical quantum processor, the qubits cannot directly 31: end if
communicate with each other. To tackle the problem, 32: if (path node is best swap) then
we introduce a series of SWAP gates. The SWAP gates 33: Insert swap − gates to mapped QC;
can be decomposed to basic gates supported by a quan- 34: end if
35: end for
tum processor. Although the theoretical results are the
return mapped QC;
same, extra error may be incurred due to the extra SWAP
8

Pseudo code of the mapping algorithm is shown framework, we can assure the user-submitted quantum
above. (1) We first convert the quantum program to tasks being executed on the best region of the quantum
a DAG(Directed Acyclic Graph). The vertices represent processor. Thus, the fidelity of the result of the quantum
the double gate operation. When two vertices are con- task tends to be better.
nected, the corresponding double gates will use the same
qubit. The direction denotes the timing sequence. (2) We
traverse the DAG from the node with 0 in-degree. The V. EXPERIMENTS
first node will be directly mapped based on the topol-
ogy of the quantum processor. Each mapping will be We conduct several exepriments to evaluate the differ-
represented as a subgraph. (3) We get the new DAG ent aspects of Origin Pilot’s effectiveness.
by deleting the mapped vertices. Then we traverse the
new DAG until all the nodes with 0 in-degree cannot be
directly mapped. In this way, we can finally get the max- A. Runtime Analysis
imum subgraph sequence. (4) By repeating step (2) and
(3), we can get multiple maximum subgraph sequences. To evaluate the effectiveness of the parallesm in Origin
(5) With Token-Swapping algorithm, we can calculate Pilot, we conduct the runtime analysis with and without
the path with the least SWAP gates of multiple mapping Origin Pilot on two superconducting quantum processors
strategies by connecting the adjacent subgraphs. (6) We (KF C6-130) provided by Origin Quantum.
elaborate all the possible mapping strategies and choose We conduct four exepriments in total. In the first sce-
the mapping with best fidelity. nario, we execute a single quantum circuit of GHZ in
a quantum chip for 10 times. The GHZ circuit uses 2
qubits. In the second scenario, we execute two quan-
C. Automatic Calibration tum circuits in a quantum chip. In the third scenario,
we run a quantum circuit in two quantum chips, tak-
There are two parameters describing the quality of ing advantage of the parallelism of Origin Pilot. In the
qubits: coherence time and gate fidelity. fourth scenario, we execute the two quantum circuits in
Qubits’ coherence time can be used to dscribe the two quantum chips. From Fig.5 we can see the accelera-
coupling strength between a quantum system and the tion of Origin Pilot by running the above four scenarios
environment. A quantum algorithm may need a mas- for 10 times.
sive number of gate operations. Thus, the qubits should
maintain their state during these gate operations.
Quantum logic gate operations serve as the basic ele-
ments in a quantum circuit. The gate error has a great
impact on the final result of a quantum circuit. Gener-
ally, the average logic gate error should be less than 1
percent[26].
There are many factors that can affect the qubits’ qual-
ity. To maintain the quality, we need to keep calibrating
the qubits. The qubits’ calibration includes the check-
ing and calibration phase. In the checking phase, we
can check the qubits’ performance parameters by inter-
val checking or random traverse techniques. If calibra-
tion is needed, we can call the corresponding calibration
procedure based on the error type and extent.
The factors that can affect the qubits’ performance are
co-related with each other. To conduct an effective cali- FIG. 5. Runtime of four different situations
bration, we need to determine which phyiscal parameters
degrade the qubits’ performance. This process can be Origin Pilot can effectively improve the utilisation of
formulated as a Markov decision process and automated. quantum processors by supporting parallel execution of
We build a partial observable Markov Decision Process multiple tasks in a quantum processor. The average run-
to automate the process of automatic calibration. time of executing a GHZ quantum circuit can be im-
Moreover, we build an oline calibration strategy by us- proved to 120 percent.
ing a block partitioning automatic calibration technique.
The approach dynamically divide the quantum proces-
sor to the executable region and calibration region. The B. Automatic Calibration Results
quantum program can be compiled to different regions
and combined as a quantum transaction which can be All the results of this part are evaluated on the Orig-
further sent to the quantum processors. With the above inQ Wuyuan. We mainly evaluate the single gate’s and
9

double gate’s fidelity results with automatic calibration. C. Effect of the Qubit Mapping Mechanism in
Moreover, since the automatic calibration quantum tasks Origin Pilot
are also considered as quantum tasks executed on the
quantum processors. Thus, we record the number of 1. Dataset
quantum tasks as well.
We build a topology of a quantum processor including
8 qubits. Double gate operations can be applied in ad-
jacent qubits. We configure a quantum virtual machine
1. Single gate results
with noise and only consider the CZ gate. The noise can
be assigned to the corresponding qubits and CZ gate. To
The calibration threhold is set to 0.98. When Origin better validate our algorithm, we set the fidelity on the
Pilot detects the fidelity of single gate operation of a right part of the topology higher than the left. We use
qubit below 0.98, the calibration procedure is triggered. the classic quantum algorithms including QFT, GHZ, DJ
The calibration interval is initially set as 60 minutes and and BV as the benchmarking quantum circuits.
gradually degraded to 20 minutes. Once the calibration The topology of the quantum processor is shown as
is triggered, the interval is recovered to 60 minutes. Fig.9.
Experimental results are shown in Fig.6.

2. Experimental Results

2. Double gate results (1) QFT Circuit


Fig. 10(a) shows the original circuit of QFT. Fig.10(b)
Every 20 minutes we conduct our automatic calibra- shows a transpiled circuit with BMT. Fig.10(c) shows a
tion process and summarize the fidelity. We set the cali- transpiled circuit with Origin Pilot.
bration threshold as 0.95. Initially the calibration is con-
ducted every 60 minutes. The calibration interval is re-
duced to 20 minutes gradually. Once the calibration is
conducted, the interval is adjusted back to 60 minutes.
Experimental results are shown in Fig.7

3. Number of tasks comparison

FIG. 10. Circuit of QFT


We generate a random GHZ quantum circuit. The
quantum task interval is set to 10 seconds. We summa-
rize the number of tasks in each period. The double gate
fidelity threshold is set to 0.95; single gate fidelity thresh- 1 2 3 4 average
old is set to 0.98. Exprimental results are shown as below Origin Pilot 0.1261 0.1307 0.1241 0.1253 0.1266
in Fig. 8. BMT 0.2125 0.2152 0.2102 0.2178 0.2139

TABLE I. Fidelity Results for QFT with and without Origin


Pilot
4. Results Analysis

(2) GHZ Circuit


From the results we can see that without automatic Fig. 11(a) shows the original circuit of GHZ. Fig.11(b)
calibration service, the single and double gate’s fidelity shows a transpiled circuit with BMT. Fig.11(c) shows a
degrade gradually. The automatic calibration service can transpiled circuit with Origin Pilot.
keep the single and double gate’s fidelity above 0.98 and
0.95 respectively. With automatic calibration, we can
see the number of tasks is far more than the quantum
tasks without calibration. Moreover, with automatic cal-
ibration service, the quantum processor can keep working
properly. But the quantum processor without automatic
calibration can no longer support the execution of quan-
tum tasks. FIG. 11. Circuit of GHZ
10

FIG. 6. Fidelity Results of Single Qubit Calibration

FIG. 7. Fidelity Results of Double Qubit Calibration

FIG. 8. Number of Tasks with and without Origin Pilot


11

FIG. 13. Circuit of BV


1 2 3 4 average
Origin Pilot 0.547951 0.542246 0.553503 0.5379 0.5454
BMT 0.736669 0.729772 0.739268 0.743237 0.7372365
FIG. 9. Topology of a simulated quantum processor
TABLE IV. Fidelity Results for BV with and without Origin
Pilot
1 2 3 4 average
Origin Pilot 0.435741 0.42889 0.426278 0.431303 0.450553
BMT 0.599643 0.604789 0.60461 0.604014 0.603264

TABLE II. Fidelity Results for GHZ with and without Origin 3. Results’ Analysis
Pilot
We can see that the fidelity from QST (Quantum State
Tomography) shows that mapping with Origin Pilot out-
(3) DJ Circuit
performs mapping with BMT. In the worst case we can
Fig. 12(a) shows the original circuit of DJ. Fig.12(b)
increase the fidelity of a quantum circuit by 10 percent on
shows a transpiled circuit with BMT. Fig.12(c) shows a
average. From the transpiled results we can also see that
transpiled circuit with Origin Pilot.
the mapping of Origin Pilot prefers choosing the qubits
with better fidelity. Thus, the mapping with Origin Pilot
can achieve better fidelity.

FIG. 12. Circuit of DJ VI. CONCLUSION AND FUTURE WORKS

The research on quantum operating systems is still in


1 2 3 4 average its infancy. Origin Pilot is a full quantum operating sys-
Origin Pilot 0.435741 0.42889 0.426278 0.431303 0.450553 tem among the primitive frameworks of quantum operat-
BMT 0.86 0.8536 0.8631 0.8619 0.85965
ing systems. We introduce in detail the implementation
TABLE III. Fidelity Results for DJ with and without Origin of basic modules of the quantum operating system, such
Pilot as quantum task scheduling, quantum resource manage-
ment,parallel execution and automatic calibration, etc.
In the future we will further support quantum dis-
(4) BV Circuit tributed computing and hybrid computing consisting of
Fig. 13(a) shows the original circuit of BV. Fig.13(b) both classic and quantum resources. We will also make
shows a transpiled circuit with BMT. Fig.13(c) shows a the source code of Origin Pilot public available and make
transpiled circuit with Origin Pilot. it free for the uncommecial usage of Origin Pilot.

[1] M. A. Nielsen and I. L. Chuang, Mathematical Structures [6] B. Ghosh and E. Kozarevic, Investment Management and
in Computer Science 17, 1115 (2002). Financial Innovations 15, 208 (2018).
[2] L. K. Grover, (1996). [7] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost,
[3] A. W. Harrow, A. Hassidim, and S. Lloyd, Physical Re- N. Wiebe, and S. Lloyd, Nature.
view Letters 103, 150502 (2009). [8] Petruccione, Francesco, Sinayskiy, Ilya, Schuld, and
[4] P. Shor, In Proceedings of 35th Annual Symposium on Maria, Contemporary Physics A Review of Physics and
the Foundations of Computer Science, IEEE Computer Associated Technologies (2015).
Society Press, Los Alamitos, CA , 124 (1994). [9] Li and X., Science 301, 809 (2003).
[5] A. Peruzzo, J. Mcclean, P. Shadbolt, M. H. Yung, X. Q. [10] A. A. Houck, H. Türeci, and J. Koch, Nature Physics 8,
Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, 292 (2012).
Nature Communications 5 (2013). [11] H. Haffner, C. Roos, and R. Blatt, Physics Reports
12

(2008). ceedings of the 16th Workshop on Hot Topics in Oper-


[12] Kielpinski, C. Monroe, and D. J. Wineland, Nature 417, ating Systems, HotOS ’17 (Association for Computing
709 (2002). Machinery, New York, NY, USA, 2017) p. 76–81.
[13] A. I. Lvovsky, B. C. Sanders, and W. Tittel, Nature [20] R. Honan, T. W. Lewis, S. Anderson, and J. Cooke, A
Photonics 3, 706 (2009). Quantum Computer Operating System (Algorithms and
[14] J. L. O’Brien, (2007). Architectures for Parallel Processing, 2020).
[15] Quantum Science and Technology 6, 024009 (22pp) [21] Z. Y. Chen and G. P. Guo, (2019).
(2021). [22] G. Li, Y. Ding, and Y. Xie, in the Twenty-Fourth Inter-
[16] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, national Conference (2019).
R. Barends, R. Biswas, S. Boixo, F. G. S. L. Brandao, [23] P. Murali, J. M. Baker, A. J. Abhari, F. T. Chong, and
D. A. Buell, and et al., Nature 574, 505–510 (2019). M. Martonosi (2019).
[17] D. Vasileska, S. M. Goodnick, and G. Klimeck, Compu- [24] R. Wille, L. Burgholzer, and A. Zulehner, (2019).
tational Electronics: Semiclassical and Quantum Device [25] E. Bonnet, T. Miltzow, and P. Rzewski, Algorithmica
Modeling and Simulation (Computational electronics : 80, 2656 (2016).
semiclassical and quantum device modeling and simula- [26] J. Kelly, R. Barends, A. G. Fowler, A. Megrant, E. Jef-
tion, 2010). frey, T. C. White, D. Sank, J. Y. Mutus, B. Campbell,
[18] A. Ajagekar, T. Humble, and F. You, Computers and and Y. Chen, NATURE -LONDON- (2015).
Chemical Engineering (2019).
[19] H. Corrigan-Gibbs, D. J. Wu, and D. Boneh, in Pro-

You might also like