# Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning

심층 강화학습을 활용한 다중 큐비트 시스템을 위한 효율적이고 실용적인 양자 컴파일러

Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · arXiv · 2022년 4월 14일

- **연구 문제** 기존 양자 컴파일러는 낮은 최적성, 높은 추론 시간, 제한된 확장성, 보편성 부족 문제를 가지며 특히 강화학습 기반 방법은 단일 큐빗에 머물렀습니다.
- **연구 방법** 이 논문은 데이터 생성, 심층 Q-학습, AQ\* 탐색을 결합한 강화학습 기반 양자 컴파일러를 제안합니다.
- **주요 결과** 단일 큐빗 역원 없는 확산 기저에서 길이 복잡도 O(2.683 log^0.974(1/(1−f̄))), 두 큐빗 HRC 설정에서 O(1.905 log^1.014(1/(1−f̄)))가 보고되었습니다.

## 양자 컴파일의 어려움과 기존 RL 방법의 한계

양자 컴파일러는 고수준 양자 알고리즘을 제한된 기저 게이트 집합의 연산 시퀀스로 바꾸며, 이 시퀀스의 길이와 정확도가 양자 칩의 효율을 좌우합니다. 원문은 기존 컴파일러가 낮은 최적성, 높은 추론 시간, 제한된 확장성, 보편성 부족이라는 문제를 가진다고 지적합니다. 역원 닫힘 기저 집합에서는 Solovay-Kitaev 정리가 로그 스케일의 시퀀스 길이를 보장하지만, 실제 하드웨어가 역원 없는 기저만 허용하는 경우에는 이 결과를 그대로 적용하기 어렵습니다.

기존 강화학습 기반 컴파일러는 대부분 단일 큐빗 장면에만 적용되었습니다. 이 논문은 그 이유로 사전 지식 없이 처음부터 학습하는 점, 단순한 RL 모델을 쓰는 점, 추론 단계의 탐색이 효율과 정확도를 함께 균형 있게 다루지 못하는 점을 듭니다. 이 연구는 이러한 문제를 다중 큐빗 연산자까지 확장하기 위해 심층 Q-네트워크와 AQ\* 탐색을 결합합니다.

![TABLE I.Comparison of our RL-based quantum compiler with other compilers based on RL or conventional strategies along the basis set, scaling (number of qubits)…](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-00d3e018a97a6884909891103797dd81.png?thumb=512)

**원문 그림** TABLE I.Comparison of our RL-based quantum compiler with other compilers based on RL or conventional strategies along the basis set, scaling (number of qubits) and the length complexity of the compiled sequence.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

## 행동 분포 생성, DQN 학습, AQ\* 탐색

이 방법은 양자 컴파일을 마르코프 결정 과정으로 재구성합니다. 행동 공간은 하드웨어에 맞는 기저 연산자이고, 상태는 목표 유니터리와 이미 선택한 게이트들의 곱으로 정의됩니다. 보상은 현재 상태가 항등 연산자에 허용 오차 ε 이내로 가까워질 때 0이 되고, 그 밖에서는 −1이 됩니다. 원문은 희소 보상 문제를 피하기 위해 d(U∏A†j, I) 형태의 거리를 사용한다고 설명합니다.

![Figure 1: Reformulation of quantum compiling into a RL problem modeled by Markov Decision Process (MDP). During an interaction between the agent and en- vironm…](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-1461ad76a2724e62f3660ccf319f2e56.png?thumb=512)

**FIG. 1** . Reformulation of quantum compiling into a RL problem modeled by Markov Decision Process (MDP). During an interaction between the agent and en- vironment, the agent selects a single gateT from the uni- versal basis setA to approach the compiling targetU; the constructed unitary feeds the agent with a new stateHSHT as the consequence of the selected gateT and a reward, 0 or−1, measuring the quality of the selected gate sequence {H,S,H,T }. The MDP ends with a non-negative reward sig- nal 0, ensuring that the compilation is accomplished. The compiled unitary is formulated by the sequence of the selected gates during this MDP.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

학습 전 단계에서는 기저 게이트를 무작위로 골라 만든 궤적을 재생 풀에 저장하여 행동 분포를 구성합니다. 이후 DQN은 Q(s,a;θ)를 학습하며, 손실은 목표 값과 현재 Q 값 차이의 제곱 평균입니다. 추론 단계에서는 AQ\* 탐색이 DQN이 준 행동 가치와 누적 보상을 합한 평가 함수 f(s,a;U)=G(s;U)+Q(s,a;θ)를 사용해 다음 상태를 고릅니다. 학습에는 Adam 옵티마이저가 쓰였고 학습률은 10^-3으로 설정되었습니다.

![Figure 2: The process of data generation and deep Q-learning.(a) The process of data generation for single-qubit cases under the Cliﬀord+T universal basis set.…](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-7a0884edd854d90bde924517d91d5b44.png?thumb=512)

**FIG. 2** .The process of data generation and deep Q-learning.(a) The process of data generation for single-qubit cases under the Cliﬀord+T universal basis set. The training experience is composed of the sampled trajectories across the whole unitary space, e.g., the trajectory (highlighted by the red line) is randomly sampled from the whole unitary space expanded by a universal basis set. The selected trajectories are put into the replay pool to decouple the correlation between the sample tuples. Namely, a trajectory is decomposed into sequences of sample tuples, and then fed into learning process, e.g., taking action at = S from statest = HS leads to the next statest+1 = HSS with reward−1. (b) The process of deep Q-learning amounts to minimizing the training loss at the bottom right plot. The blue (orange) box are hidden layers (input and output layers) of deep Q-networks (DQNs). A key feature of DQNs is that their output layers describe the action-value functions. The input of the DQN is a vector transformed from the unitary matrix corresponding to the state unitary, and the output is a vector corresponding to the value function of all next state unitaries.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

![Figure 6: An overview of the deep Q-learning quantum compiling algorithm with AQ\* search.(a) Data generation. The behavior distribution is constructed from the…](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-f1d9ccefcc5466ced4fa2e228257af02.png?thumb=512)

**FIG. 6** . An overview of the deep Q-learning quantum compiling algorithm with AQ\* search.(a) Data generation. The behavior distribution is constructed from the sample trajectories. (b) Deep Q-learning. In the training stage, the deep Q-network is introduced to approximate the optimal value function and optimal strategy. (c) Construct the optimal sequence. In this inference stage, we implement the AQ\* search guided by the trained deep Q-network to interact with the environment.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

## 단일 큐빗 기저 집합과 평가 지표

실험은 역원 닫힘 기저로 Clifford+T 군, Fibonacci 아니온, HRC 보편 기저를, 역원 없는 기저로 확산 기저 집합을 사용했습니다. 평가 지표는 Frobenius 노름 기반의 M1과 충실도 기반의 M2입니다. 원문은 정확도 임계값 ε를 10^-3으로, MSE 손실 임계값 δ를 10^-2로 설정했다고 밝힙니다. 시퀀스 길이 복잡도는 ε = 1−M2로 두고 외삽하여 얻은 O(c·log^k(1/ε)) 형태로 보고됩니다.

![Figure 7: Comparison between diﬀerent single-qubit universal basis sets under the metric of (a) F-norm and (b) spectral norm](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-0b50925e8312a7d34f45cc95e6cfe4b3.png?thumb=512)

**FIG. 7** .Comparison between diﬀerent single-qubit universal basis sets under the metric of (a) F-norm and (b) spectral norm.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

이 결과는 단일 큐빗 실험의 설정이며, 두 큐빗 실험에는 HRC 기저와 CNOT 게이트만 사용되었습니다. 두 큐빗 실험의 DQN 구조는 단일 큐빗과 다르며 부록 F에 제시됩니다.

![Figure 9: The architecture of the deep Q-network for single-qubit and multi-qubit situations](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3/figures/figure-96f512001da82da6f063b63031f577b3.png?thumb=512)

**FIG. 9** .The architecture of the deep Q-network for single-qubit and multi-qubit situations.

[원문](https://arxiv.org/abs/2204.06904v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu · Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 단일 큐빗 및 두 큐빗 결과

HRC 기저는 d = 15에서 평균 충실도 M2 = 99.999%, d = 40에서 99.996%를 보고합니다. Clifford+T 군은 d = 40에서 M2 = 99.88%로 보고되며, 원문은 이 낮은 성능이 T와 S 게이트의 희소성 때문이라고 설명합니다. 이 결과는 HRC 기저가 다른 두 집합보다 우수했다는 원문 비교에 따른 것입니다.

두 큐빗 실험에서는 HRC 기저와 CNOT를 사용해 충실도 0.9995 이상에서 길이 복잡도 O(1.905·log^1.014(1/(1−f̄))))를 보고합니다. 확산 기저 집합에서는 길이 복잡도 O(2.683·log^0.974(1/(1−f̄))))와 충실도 M2 0.9987 이상이 보고됩니다. 원문은 이 결과가 역원 없는 Solovay-Kitaev 정리의 지수 c를 낮출 수 있다는 경험적 증거라고 해석하며, 스펙트럼 노름 기준에서는 c = 0.8783을 보고합니다.

## 적용 범위와 남은 질문

이 결과는 원문에 보고된 기저 집합, 지표, 설정에서 얻은 것입니다. 역원 없는 확산 기저의 지수 감소는 원문이 제시한 실험 조건에서의 경험적 증거이며, 이론적 최적성을 증명한 결과가 아닙니다. 두 큐빗 실험은 HRC 기저와 CNOT 게이트에 한정되었습니다. 원문은 DQN 학습 시간을 최대 약 1주일 이내로 제한했다고 밝히며, 학습된 DQN과 가장 좋은 DQN 사이에 차이가 있을 수 있다고 설명합니다. 또한 Clifford+T 군의 낮은 성능은 기저 게이트의 희소성과 관련된 설명으로 제시됩니다.

## 논문 정보

- **저자**: Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2022년 4월 14일
- **등록일**: 2026년 11월 6일
- **수정일**: 2022년 4월 14일
- **버전**: v1
- **arXiv**: 2204.06904
- **분류**: quant-ph · cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2204.06904v1) · [원문 PDF ↗](https://arxiv.org/pdf/2204.06904v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Efficient quantum compiling tactics greatly enhance the capability of quantum computers to execute complicated quantum algorithms. Due to its fundamental importance, a plethora of quantum compilers has been designed in past years. However, there are several caveats to current protocols, which are low optimality, high inference time, limited scalability, and lack of universality. To compensate for these defects, here we devise an efficient and practical quantum compiler assisted by advanced deep reinforcement learning (RL) techniques, i.e., data generation, deep Q-learning, and AQ\* search. In this way, our protocol is compatible with various quantum machines and can be used to compile multi-qubit operators. We systematically evaluate the performance of our proposal in compiling quantum operators with both inverse-closed and inverse-free universal basis sets. In the task of single-qubit operator compiling, our proposal outperforms other RL-based quantum compilers in the measure of compiling sequence length and inference time. Meanwhile, the output solution is near-optimal, guaranteed by the Solovay-Kitaev theorem. Notably, for the inverse-free universal basis set, the achieved sequence length complexity is comparable with the inverse-based setting and dramatically advances previous methods. These empirical results contribute to improving the inverse-free Solovay-Kitaev theorem. In addition, for the first time, we demonstrate how to leverage RL-based quantum compilers to accomplish two-qubit operator compiling. The achieved results open an avenue for integrating RL with quantum compiling to unify efficiency and practicality and thus facilitate the exploration of quantum advantages.

## 원문 인용

Qiuhao Chen, Yuxuan Du, Qi Zhao, Yuling Jiao, Xiliang Lu, Xingyao Wu (2022). Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning. arXiv:2204.06904v1. https://arxiv.org/abs/2204.06904v1

**BibTeX**

```
@misc{chen2022efficient,
  title = {{Efficient and practical quantum compiler towards multi-qubit systems with deep reinforcement learning}},
  author = {Qiuhao Chen and Yuxuan Du and Qi Zhao and Yuling Jiao and Xiliang Lu and Xingyao Wu},
  year = {2022},
  eprint = {2204.06904},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.06904v1}
}
```

## 이 논문의 용어

- [Adam](https://refivu.com/terms/0e9ad0199e08-adam)
- [Markov Decision Process](https://refivu.com/terms/5d622f56f22a-markov-decision-process)
- [deep Q-network](https://refivu.com/terms/2ed05d25837b-deep-q-network)
- [replay pool](https://refivu.com/terms/6234fff60980-replay-pool)

## 다른 논문 해설

- [Reinforcement Learning for Safe Autonomous Two Device Navigation of Cerebral Vessels in Mechanical Thrombectomy](https://refivu.com/papers/46d473c4-132b-4492-b1f5-3c80a980ac3c-reinforcement-learning-for-safe-autonomous-two-device.md)
- [Data Assimilation in Chaotic Systems Using Deep Reinforcement Learning](https://refivu.com/papers/ed912d09-179c-4d9f-b9e8-03fb289eb4be-data-assimilation-in-chaotic-systems-using-deep.md)
- [Risk-Sensitive Reinforcement Learning with Exponential Criteria](https://refivu.com/papers/9fd0a8d2-af59-4086-8c24-415c54dc21f6-risk-sensitive-reinforcement-learning-with-exponential.md)
- [Training Value-Aligned Reinforcement Learning Agents Using a Normative Prior](https://refivu.com/papers/b77603ca-279d-40d9-a2b6-7ec40a3e3f14-training-value-aligned-reinforcement-learning-agents-using-a.md)
- [Reinforcement learning pulses for transmon qubit entangling gates](https://refivu.com/papers/02967625-3a66-40bd-a3cf-3852c84f8a03-reinforcement-learning-pulses-for-transmon-qubit-entangling.md)
- [Skill-Critic: Refining Learned Skills for Hierarchical Reinforcement Learning](https://refivu.com/papers/8823187a-3588-4121-865a-a6227cc24802-skill-critic-refining-learned-skills-for-hierarchical.md)
- [Learning safety in model-based Reinforcement Learning using MPC and Gaussian Processes](https://refivu.com/papers/e6603786-8155-43d7-b14b-6be6dced48bc-learning-safety-in-model-based-reinforcement-learning-using.md)
- [Adaptive Partial Scanning Transmission Electron Microscopy with Reinforcement Learning](https://refivu.com/papers/1712224e-8bb4-4264-82df-2d4c4c85bf05-adaptive-partial-scanning-transmission-electron-microscopy.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/f3b3c8a5-f92c-492e-8767-2b01944c00d3-efficient-and-practical-quantum-compiler-towards-multi-qubit)
