2
Unpublished working draft. Not for distribution. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 A deep learning approach to noise prediction and circuit optimization for near-term quantum devices Alexander Zlokapa [email protected] California Institute of Technology Alexandru Gheorghiu (advisor) [email protected] California Institute of Technology ABSTRACT Noisy intermediate-scale quantum (NISQ) devices face challenges in achieving high-fidelity computations due to hardware-specific noise. As a basis for noise mitigation, we develop a convolutional neural network noise model to estimate the difference in noise be- tween a given pair of equivalent quantum circuits. On a classically simulated dataset of 1.6 million pairs of quantum circuits with a sim- plified noise model calibrated to IBM Q hardware, the deep learning approach shows a significant improvement in noise prediction over linear gate count models. A greedy peephole optimization proce- dure is proposed to minimize noise using the deep learning model as an objective function, showing further improvement in noise mitigation compared to commonly used gate count minimization heuristics. KEYWORDS quantum computing, machine learning, artificial intelligence ACM Reference Format: Alexander Zlokapa and Alexandru Gheorghiu (advisor). 2019. A deep learn- ing approach to noise prediction and circuit optimization for near-term quantum devices. In SC ’19: ACM/IEEE Supercomputing Conference, Novem- ber 17–22, 2019, Denver, CO. ACM, New York, NY, USA, 2 pages. https: //doi.org/10.1145/nnnnnnn.nnnnnnn 1 INTRODUCTION In the early stages of quantum computing, NISQ devices are lim- ited in usability and reliability by errors due to thermal relaxation, hardware imperfections, and interactions between adjacent qubits [8]. Given that quantum operations (gates) on these devices are subject to noise, one way to mitigate this is to produce an equiva- lent circuit that uses fewer gates than the original [2, 5, 7], or one that uses fewer gates of a specific type [1]. While these techniques are useful in reducing noise, they fail to completely capture all hardware-specific faults that can occur in a circuit. We address this with a deep learning approach that learns a noise model for a given architecture. We then use it to optimize quantum circuits for noise reduction. Unpublished working draft. Not for distribution. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. SC ’19, November 17–22, 2019, Denver, CO © 2019 Association for Computing Machinery. ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00 https://doi.org/10.1145/nnnnnnn.nnnnnnn 2 METHODOLOGY 2.1 Simulated dataset We start by creating a training set of equivalent quantum circuits. A quantum circuit is a sequence of gates, each of which is represented as a unitary operation, that acts on either one or two qubits. We first perform an exhaustive search over all circuits acting on 2 qubits, with up to 4 gates. The circuits are divided into equivalence classes labeled by the circuit’s matrix representation. Equivalent circuits found in this way may be identified as sub-circuits of a larger circuit and substituted. A ground-truth dataset is generated with 668 equivalence classes of 50 circuits each. Each circuit acts on 8 qubits and contains up to 200 gates. This leads to 1.6 million unique pairs of equivalent circuits. We then consider a simple noise model for a simulated version of the IBM Q Melbourne device [3]. This model accounts for readout errors, depolarization errors and thermal relaxation errors. From the generated dataset, we simulate each pair of equivalent circuits (with noise) and record the noise difference as measured by the energy distance between readout probability distributions of the two circuits and a noiseless simulation [9]. 2.2 Noise prediction model Given the ability of the ResNet convolutional neural network archi- tecture [4] to achieve state-of-the-art results on image regression problems [6], we propose an image encoding scheme for quantum cir- cuits and train a ResNet model to learn the noise difference between a pair of equivalent circuits. To establish encoding consistency, we perform a lexicographic topological sort on a directed acyclic graph representation of the circuit. Each circuit is then represented by an 8-channel image (7 gates + control channel), allowing circuit pairs to be easily passed to a neural network. Because of its importance as a source of noise, the two-qubit gate count is concatenated before the fully-connected layer of the ResNet architecture (Figure 1). 2.3 Circuit optimization To apply the learned noise model, we use an iterative peephole optimization algorithm to greedily rewrite regions of the main circuit according to the found equivalence classes. After identifying equivalence classes of each possible region, the substitution that is expected to cause the most favorable noise reduction according to the ResNet prediction is selected. This process is repeated until no further substitutions can be made. 3 RESULTS We find significant improvement in noise optimization compared to prior work using gate count minimization [2, 5, 7], which we 2019-08-06 15:49. Page 1 of 1–2.

Alexandru Gheorghiu (advisor) [email protected] draft ... · Alexandru Gheorghiu (advisor) [email protected] California Institute of Technology ABSTRACT Noisy intermediate-scale

  • Upload
    others

  • View
    26

  • Download
    0

Embed Size (px)

Citation preview

Unpublishedworkingdraft.

Not for distribution.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

A deep learning approach to noise prediction and circuitoptimization for near-term quantum devicesAlexander [email protected]

California Institute of Technology

Alexandru Gheorghiu (advisor)[email protected]

California Institute of Technology

ABSTRACTNoisy intermediate-scale quantum (NISQ) devices face challengesin achieving high-fidelity computations due to hardware-specificnoise. As a basis for noise mitigation, we develop a convolutionalneural network noise model to estimate the difference in noise be-tween a given pair of equivalent quantum circuits. On a classicallysimulated dataset of 1.6 million pairs of quantum circuits with a sim-plified noise model calibrated to IBM Q hardware, the deep learningapproach shows a significant improvement in noise prediction overlinear gate count models. A greedy peephole optimization proce-dure is proposed to minimize noise using the deep learning modelas an objective function, showing further improvement in noisemitigation compared to commonly used gate count minimizationheuristics.

KEYWORDSquantum computing, machine learning, artificial intelligence

ACM Reference Format:Alexander Zlokapa and Alexandru Gheorghiu (advisor). 2019. A deep learn-ing approach to noise prediction and circuit optimization for near-termquantum devices. In SC ’19: ACM/IEEE Supercomputing Conference, Novem-ber 17–22, 2019, Denver, CO. ACM, New York, NY, USA, 2 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn

1 INTRODUCTIONIn the early stages of quantum computing, NISQ devices are lim-ited in usability and reliability by errors due to thermal relaxation,hardware imperfections, and interactions between adjacent qubits[8]. Given that quantum operations (gates) on these devices aresubject to noise, one way to mitigate this is to produce an equiva-lent circuit that uses fewer gates than the original [2, 5, 7], or onethat uses fewer gates of a specific type [1]. While these techniquesare useful in reducing noise, they fail to completely capture allhardware-specific faults that can occur in a circuit. We address thiswith a deep learning approach that learns a noise model for a givenarchitecture. We then use it to optimize quantum circuits for noisereduction.

Unpublished working draft. Not for distribution.Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than ACMmust be honored. Abstracting with credit is permitted. To copy otherwise, or republish,to post on servers or to redistribute to lists, requires prior specific permission and/or afee. Request permissions from [email protected] ’19, November 17–22, 2019, Denver, CO© 2019 Association for Computing Machinery.ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00https://doi.org/10.1145/nnnnnnn.nnnnnnn

2 METHODOLOGY2.1 Simulated datasetWe start by creating a training set of equivalent quantum circuits. Aquantum circuit is a sequence of gates, each of which is representedas a unitary operation, that acts on either one or two qubits. Wefirst perform an exhaustive search over all circuits acting on 2qubits, with up to 4 gates. The circuits are divided into equivalenceclasses labeled by the circuit’s matrix representation. Equivalentcircuits found in this way may be identified as sub-circuits of alarger circuit and substituted. A ground-truth dataset is generatedwith 668 equivalence classes of 50 circuits each. Each circuit actson 8 qubits and contains up to 200 gates. This leads to 1.6 millionunique pairs of equivalent circuits.

We then consider a simple noise model for a simulated version ofthe IBM Q Melbourne device [3]. This model accounts for readouterrors, depolarization errors and thermal relaxation errors. Fromthe generated dataset, we simulate each pair of equivalent circuits(with noise) and record the noise difference as measured by theenergy distance between readout probability distributions of thetwo circuits and a noiseless simulation [9].

2.2 Noise prediction modelGiven the ability of the ResNet convolutional neural network archi-tecture [4] to achieve state-of-the-art results on image regressionproblems [6], we propose an image encoding scheme for quantum cir-cuits and train a ResNet model to learn the noise difference betweena pair of equivalent circuits. To establish encoding consistency, weperform a lexicographic topological sort on a directed acyclic graphrepresentation of the circuit. Each circuit is then represented by an8-channel image (7 gates + control channel), allowing circuit pairsto be easily passed to a neural network. Because of its importanceas a source of noise, the two-qubit gate count is concatenated beforethe fully-connected layer of the ResNet architecture (Figure 1).

2.3 Circuit optimizationTo apply the learned noise model, we use an iterative peepholeoptimization algorithm to greedily rewrite regions of the maincircuit according to the found equivalence classes. After identifyingequivalence classes of each possible region, the substitution that isexpected to cause the most favorable noise reduction according tothe ResNet prediction is selected. This process is repeated until nofurther substitutions can be made.

3 RESULTSWe find significant improvement in noise optimization comparedto prior work using gate count minimization [2, 5, 7], which we

2019-08-06 15:49. Page 1 of 1–2.

Unpublishedworkingdraft.

Not for distribution.

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

SC ’19, November 17–22, 2019, Denver, CO Zlokapa and Gheorghiu

175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254

Figure 1: Deep learning noise predictionmodel consisting ofcircuit generation, image encoding, and ResNet prediction.

provide as a benchmark for both noise prediction and noise mini-mization.

A linear gate count model has a substantially worseR2 predictionof noise difference between a pair of equivalent quantum circuits(Table 1) compared to the deep learning model (Figure 2) on the testset. Given the basic noise model used in this analysis, we expectthe advantage of deep learning to increase with more complexnoise models that include correlated phenomena such as crosstalkbetween qubits.

Greedy noise minimization with deep learning is 15% ± 3% moreeffective than gate count minimization (Table 1), thus significantlyoutperforming this heuristic method for noise reduction. To in-crease robustness, greedy optimization may be substituted for ascheme such as a Monte Carlo Tree Search, increasing the numberof circuits explored and involving a larger number of comparisonsto average out errors in noise prediction.

4 CONCLUSIONCompared to existing heuristics such as gate count minimization,we find that deep learning provides significant improvement innoise reduction through greedy circuit optimization. Our results

Figure 2: Deep learning noise prediction model predictionson test set (160,000 circuit pairs) with R2 = 0.401 ± 0.003.

Table 1: Comparison of deep learning noise model and gatecount heuristic performance. Errors indicate 1σ uncertaintydetermined by Poisson bootstrapping.

Metric Deep learning noise model Gate count noise model

R2 0.401 ± 0.003 0.314 ± 0.003∆ noise −0.023 ± 0.001 −0.020 ± 0.001

suggest that deep learning may substantially improve noise mitiga-tion on real-world quantum hardware, addressing a major obstaclein the applicability of NISQ devices with an adaptable and versatilemethodology.

ACKNOWLEDGMENTSWe wish to thank Professor Thomas Vidick of Caltech, who pro-vided helpful insight, comments and support for this project.

REFERENCES[1] Nabila Abdessaied, Mathias Soeken, and Rolf Drechsler. 2014. Quantum Circuit

Optimization by Hadamard Gate Reduction. In Reversible Computation, ShigeruYamashita and Shin-ichi Minato (Eds.). Springer International Publishing, Cham,149–162.

[2] Gerhard W. Dueck, Anirban Pathak, Md. Mazder Rahman, Abhishek Shukla, andAnindita Banerjee. 2018. Optimization of Circuits for IBM’s Five-Qubit QuantumComputers. 2018 21st Euromicro Conference on Digital System Design (DSD) (2018),680–684.

[3] Gadi Aleksandrowicz et al. 2019. Qiskit: An Open-source Framework for QuantumComputing. https://doi.org/10.5281/zenodo.2562110

[4] K. He, X. Zhang, S. Ren, and J. Sun. 2016. Deep Residual Learning for ImageRecognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). 770–778. https://doi.org/10.1109/CVPR.2016.90

[5] Vadym Kliuchnikov and Dmitri Maslov. 2013. Optimization of Clifford circuits.Phys. Rev. A 88 (Nov 2013), 052307. Issue 5. https://doi.org/10.1103/PhysRevA.88.052307

[6] S. LathuiliÃľre, P. Mesejo, X. Alameda-Pineda, and R. Horaud. 2019. A Compre-hensive Analysis of Deep Regression. IEEE Transactions on Pattern Analysis andMachine Intelligence (2019), 1–1. https://doi.org/10.1109/TPAMI.2019.2910523

[7] Yunseong Nam, Neil J. Ross, Yuan Su, Andrew M. Childs, and Dmitri Maslov. 2018.Automated optimization of large quantum circuits with continuous parameters. npjQuantum Information 4, 1 (2018), 23. https://doi.org/10.1038/s41534-018-0072-4

[8] John Preskill. 2018. Quantum Computing in the NISQ era and beyond. Quantum2 (2018), 79.

[9] Maria L. Rizzo and Gábor J. Székely. 2016. Energy Distance. WIREs Comput. Stat.8, 1 (Jan. 2016), 27–38. https://doi.org/10.1002/wics.1375

2019-08-06 15:49. Page 2 of 1–2.