Quantum Approximation for Wireless Scheduling
11 Quantum Approximation for Multi-ScaleScheduling
Jaeho Choi, Seunghyeok Oh, and Joongheon Kim,
Senior Member, IEEE
Abstract
This paper proposes a quantum approximate optimization algorithm (QAOA) method for multi-scalewireless scheduling problems. The QAOA is one of the promising hybrid quantum-classical algorithmsfor many applications and it provides highly accurate optimization solutions in NP-hard problems. QAOAmaps the given problems into Hilbert spaces, and then it generates Hamiltonian for the given objectivesand constraints. Then, QAOA finds proper parameters from classical optimization approaches in order tooptimize the expectation value of generated Hamiltonian. Based on the parameters, the optimal solutionto the given problem can be obtained from the optimum of the expectation value of Hamiltonian. Inspiredby QAOA, a quantum approximate optimization for scheduling (QAOS) algorithm is proposed. Firstof all, this paper formulates a multi-scale scheduling problem using maximum weight independent set(MWIS) formulation. Then, for the given MWIS, the proposed QAOS designs the Hamiltonian of theproblem. After that, the iterative QAOS sequence solves the scheduling problem. This paper verifies thenovelty of the proposed QAOS via simulations implemented by Cirq and TensorFlow-Quantum.
Index Terms
Quantum Approximate Optimization Algorithm (QAOA), Maximum Weight Independent Set (MWIS),NP-Hard, Multi-Scale Wireless Networking
I. I
NTRODUCTION
Nowadays, quantum computing and communications have received a lot of attention byacademia and industry research communities. In particular, quantum computing based NP-hard problem solving is of great interest [1]. Among them, quantum approximate optimizationalgorithm (QAOA) is one of the well-known quantum computing based optimization solvers [1],and it has been verified that the QAOA outperforms the others in many combinatorial problems.Based on this nature, it is obvious that quantum computing can be used for various multi-scalecommunications applications [2]–[4].In this paper, a large-scale and multi-scale scheduling problem is formulated with maximumweight independent set (MWIS) formulation where the weight is defined as the queue-backlogto be transmitted over wireless channels [5]. According to the fact that the MWIS problem is
This research was supported by National Research Foundation of Korea (2019M3E4A1080391, Development of QuantumDeep Reinforcement Learning Algorithm using QAOA).J. Choi is with the School of Computer Science and Engineering, Chung-Ang University, Seoul, Korea e-mail: [email protected]. Oh is with the Department of Physics, Chung-Ang University, Seoul, Korea e-mail: [email protected]. Kim is with the School of Electrical Engineering, Korea University, Seoul, Korea e-mail: [email protected]. Kim is a corresponding author of this paper.
April 24, 2020 DRAFT a r X i v : . [ c s . OH ] A p r NP-hard, heuristic algorithms are desired, and in this paper, a novel QAOA-based algorithmis designed in order to solve MWIS-based wireless scheduling problems, so called quantumapproximate optimization for scheduling (QAOS) , in this paper.The proposed QAOS works as follows. First of all, the objective function and constraintfunctions are formulated for MWIS. Next, corresponding objective Hamiltonian and constraintHamiltonian are designed which map the objective function and the constraint function, respec-tively; and then, the problem Hamiltonian which should be optimized is formulated as the formof linear combinations of the objective Hamiltonian and constraint Hamiltonian. In addition,the mixing Hamiltonian is formulated using a Pauli- X operator. Based on the definitions ofthe problem Hamiltonian and the mixing Hamiltonian, two corresponding unitary operators, i.e.,problem operator and mixing operator, can be defined, respectively; and then parameterizedstate can be generated by alternately applying the two unitary operators. Then, the samplesolutions can be obtained by the measurement of the expectation value of problem Hamiltonianon the parameterized state, and the parameters can be optimized in a classical optimization loop.Finally, the optimal solution of the MWIS problem can be obtained by the measurement ofthe expectation value of problem Hamiltonian on the state generated by optimal parameters. Asverified in performance evaluation, the QAOS outperforms the other algorithms, e.g., randomsearch and greedy search. II. P RELIMINARIES
A. Bra-ket Notation
In quantum computing, bra-ket notation is generally used to represent qubit states (or quantumstates). It is also called Dirac notation as well as the notation for observable vectors in Hilbertspaces. Here, a ket and a bra can represent the column and row vectors, respectively. Thus,single qubit states, i.e., | (cid:105) and | (cid:105) , are presented as follows: | (cid:105) = (cid:20) (cid:21) , and | (cid:105) = (cid:20) (cid:21) , (1)where | (cid:105) = (cid:104) | † = (cid:2) (cid:3) † , | (cid:105) = (cid:104) | † = (cid:2) (cid:3) † ; and † means Hermitian transpose. Accordingly,the superposition state of a single qubit is as follows where c and c are probability amplitudesthat are complex numbers: c | (cid:105) + c | (cid:105) = (cid:20) c c (cid:21) . (2) B. Quantum Approximate Optimization Algorithm (QAOA)
QAOA is one of the well-known noisy intermediate-scale quantum (NISQ) optimization algo-rithms to combat combinatorial problems [6]. QAOA formulates H P (i.e., problem Hamiltonian)and H M (i.e., mixing Hamiltonian) from the optimization objective function f ( y ) ; and thengenerates the parameterized states | γ, β (cid:105) by alternately applying the H P and H M based on DRAFT April 24, 2020 initial state | s (cid:105) . Here, f ( y ) , H P | y (cid:105) , H M , and | γ, β (cid:105) are defined as follows. f ( y ) (cid:44) f ( y , y , ..., y n ) , (3) H P | y (cid:105) (cid:44) f ( y ) | y (cid:105) , (4) H M (cid:44) (cid:88) nk =1 X k , (5) | γ, β (cid:105) (cid:44) e − iβ p H M e − iγ p H P · · · e − iβ H M e − iγ H P e − iβ H M e − iγ H P | s (cid:105) , (6)where n ∈ Z + , p ∈ Z + , and X k is the Pauli- X operator applying on the k th qubit.In QAOA, through iterative measurement on | γ, β (cid:105) , the expectation value of H P should betaken, and then eventually, the samples of f ( y ) should be computed as follows: (cid:104) f ( y ) (cid:105) γ,β = (cid:104) γ, β | H P | γ, β (cid:105) . (7)The optimal values of the parameters γ and β can be obtained by classical optimizationmethods, e.g., gradient descent. Therefore, the solution can be computed from (7) via the theparameters obtained. Eventually, it can be observed that QAOA is a hybrid quantum-classicaloptimizer which is needed the proper design of Hamiltonian; and the key is finding goodparameters in the classical loop [7].III. M ULTI -S CALE S CHEDULING M ODELING USING M AXIMUM W EIGHT I NDEPENDENT S ET (MWIS)Suppose a network consists of the set of one-hop links [5]. For the scheduling, a conflictgraph is organized where the set of vertices is (the links) and two vertices are connected by anedge if the corresponding links suffer from interference. The conflict graph can be formulatedby its adjacency matrix, whose E ( i,j ) are defined as follows: E ( i,j ) = (cid:26) , if l i interferes with l j where l i ∈ L , l j ∈ L , and i (cid:54) = j, , otherwise . (8)For multi-scale scheduling, the objective is for finding the set of links (i.e., nodes of theconflict graph) where adjacent two connected links via edges cannot be simultaneously selectedbecause the adjacent two connected links are interfering to each other. This is equivalent to thecase which maximizes the summation of weights of all possible independent sets in a givenconflict graph. Thus, it is obvious that multi-scale scheduling can be formulated with MWIS asfollows: max : (cid:88) ∀ l k ∈L w k I k , (9)s.t. I i + I j + E ( i,j ) ≤ , ∀ l i ∈ L , ∀ l j ∈ L , (10) I i ∈ { , } , ∀ l i ∈ L , (11)where I i = (cid:26) , if l i is scheduled where l i ∈ L , , otherwise . (12)where w k is a positive integer weight at ∀ l k ∈ L . The above formulation ensures that conflictinglinks are not scheduled simultaneously: If E ( i,j ) = 0 (no edge between l i and l j ), then I i + I j ≤ ,i.e., both indicator functions can be . In contrast, if E ( i,j ) = 1 , I i + I j ≤ , i.e., at most one April 24, 2020 DRAFT
Case C: Both Scheduled
Case B: 1 Node Scheduled
Case A: Both Unscheduled E C ( N i , N j ) E B ( N i , N j ) E A ( N i , N j ) Fig. 1: The number of possible cases when a single edge exists. The scheduled and unschedulednodes have states | (cid:105) and | (cid:105) . N i and N j represent arbitrary nodes, and E A ( N i , N j ) , E B ( N i , N j ) ,and E C ( N i , N j ) represent edges in each case.of the two indicators can be . In wireless communication research, the w k where ∀ l k ∈ L isusually considered as transmission queue-backlog at which should be processed when the linkis scheduled. More details are in [5].IV. Q UANTUM A PPROXIMATE O PTIMIZATION FOR S CHEDULING (QAOS)In this section, Hamiltonian for QAOA is designed based on the scheduling model in Sec. III;and then Quantum Approximate Optimization for Scheduling (QAOS) algorithm is proposed byapplying the designed Hamiltonian to QAOA.
A. Design the problem Hamiltonian, H P The problem Hamiltonian H P is designed by a linear combination of the objective Hamiltonian H O and the constraint Hamiltonian H C . The objectives and constraints of the problem arecontained by H O and H C , respectively.
1) Objective Hamiltonian:
Suppose that a basic Boolean function B ( x ) exists as follows: B ( x ) = x where x ∈ { , } . (13)Due to quantum Fourier expansion, (13) can be mapped to Boolean Hamiltonian H B where I and Z are an Identity operator and the Pauli- Z operator, respectively [8]: H B = 12 ( I − Z ) . (14)According to (13)–(14), the objective function (9) can be represented as following Hamiltonian. H O (cid:48) = (cid:88) ∀ l k ∈L w k ( I − Z k ) , (15)where Z k is the Pauli- Z operator applying on I k . The objective of the model is to maximize H O (cid:48) , thus the objective Hamiltonian H O which should be minimized is as follows: H O = (cid:88) ∀ l k ∈L w k Z k . (16) DRAFT April 24, 2020
2) Constraint Hamiltonian:
In MWIS problem, the banned condition is a case where bothnodes directly connected to the edge are scheduled, as shown in
Case C in Fig. 1. If the weightsof the N i and N j in Case C are defined as W N i and W N j respectively; then the constraintfunction C (cid:48) ( i, j ) , which counts banned conditions can be represented as follows: C (cid:48) ( i, j ) = (cid:88) ni =1 (cid:88) nj =1 ( W N i + W N j ) | E C ( N i , N j ) | , (17)where n is the number of nodes and | E C ( N i , N j ) | is the number of E C ( N i , N j ) .According to (8)–(12), C (cid:48) ( i, j ) can be redefined to C ( i, j ) with symbols in Sec. III as follows: C ( i, j ) = (cid:88) ∀ l i ∈L (cid:88) ∀ l j ∈L
12 ( w i + w j ) E ( i,j ) = (cid:88) ∀ l i ∈L (cid:88) ∀ l j ∈L
12 ( w i + w j )( I i ∧ I j ) , (18)where ∧ is a Boolean operator AND; and the reason why the coefficient is in (18) becauseboth E ( i,j ) and E ( j,i ) represent the same edge. The AND Boolean function B ( x , x ) can bemapped to Boolean Hamiltonian H B as follows [8]: B ( x , x ) = x ∧ x where x ∈ { , } and x ∈ { , } , (19) H B = 14 ( I − Z − Z + Z Z ) , (20)where Z and Z are the Pauli- Z operators applying on x and x , respectively.According to (19)–(20), the objective function (18) can be represented as following Hamilto-nian: H C (cid:48) = (cid:88) ∀ l i ∈L (cid:88) ∀ l j ∈L
18 ( w i + w j )( I − Z i − Z j + Z i Z j ) , (21)where Z i and Z j are the Pauli- Z operators applying on I i and I j , respectively. The constraintof the model is to minimize H C (cid:48) , and then the constraint Hamiltonian H C is as follows: H C = (cid:88) ∀ l i ∈L (cid:88) ∀ l j ∈L −
18 ( w i + w j )( Z i + Z j − Z i Z j ) . (22)Based on the definitions of H O and H C , the problem Hamiltonian H P can be defined asfollows: H P = H O + ρH C , (23)where ρ ∈ R + is the penalty rate, which indicates the rate of which H C affects H P comparedto H O . According to (16) and (22), both H O and H C should be minimized, thus H P should beminimized as well. B. Design the mixing Hamiltonian, H M The mixing Hamiltonian, denoted by H M , generates a variety of cases that can appear in theproblem. MWIS can be formulated by a binary bit string that represents a set of nodes (e.g., | (cid:105) ); thus various cases can be created by flip the state of each node represented by | (cid:105) or | (cid:105) . The bit-flip can be handled by the Pauli- X operator, thus H M is as: H M = (cid:88) ∀ l k ∈L X k , (24) April 24, 2020 DRAFT def problem_op(mwis_graph, weight, penalty_rate, qubits, p, gamma): for n in mwis_graph.nodes: yield cirq.rz(-(1/2)*gamma[p]*weight[n])(qubits[n]) for e in mwis_graph.edges: weight_sum = weight[e[0]] + weight[e[1]] yield cirq.CZPowGate(exponent=(1/8)*gamma[p]*penalty_rate*weight_sum/np.pi,global_shift=0)(qubits[e[0]], qubits[e[1]]) def mixing_op(mwis_graph, qubits, p, beta): for n in mwis_graph.nodes: yield cirq.rx(beta[p][n])(qubits[n]) ... ... model = tf.keras.Sequential() model.add(tf.keras.layers.Input(shape=(), dtype=tf.dtypes.string)) model.add(tfq.layers.PQC(model_circuit, model_readout)) model.compile( loss=tf.keras.losses.mean_absolute_error, optimizer=tf.keras.optimizers.Adam(0.03)) model.fit(input_,optimum,epochs=1000,verbose=1) Fig. 2: Parts of Python codes using Cirq and TensorFlow-Quantum for solving the MWIS-basedscheduling problem.where X k is the Pauli- X operator applying on I k . In other words, H M is a transverse-fieldHamiltonian [7]. C. Apply to QAOA sequence
The application of the designed Hamiltonian to QAOA sequence starts to conduct when thedesign of Hamiltonian, i.e., H P and H M , is completed. First, the parameterized state | γ, β (cid:105) canbe generated by applying H P and H M defined in (16), (22), (23), and (24), to (6). Here, the initialstate | s (cid:105) is set to the equivalent superposition state using the Hadamard gates. The expectationvalue of H P can be measured on the generated parameterized state | γ, β (cid:105) where the γ and β are iteratively updated in a classical optimization loop. When the QAOA sequence terminates,the optimal parameters γ opt and β opt are obtained; thus the solution for link scheduling can beobtained by the measurement of the expectation value of H P on the optimal state | γ opt , β opt (cid:105) asfollows, where (cid:104) F (cid:105) is the expectation value of (9) over the returned solution samples: (cid:104) F (cid:105) = (cid:104) γ opt , β opt | H P | γ opt , β opt (cid:105) . (25)V. P ERFORMANCE E VALUATION
The proposed QAOS algorithm is implemented using Cirq and TensorFlow-Quantum devel-oped for NISQ algorithm and quantum machine learning computation [9], [10].
DRAFT April 24, 2020
A. Software Implementation
The application of the quantum gates, the basic units of the quantum circuit, is expressed byunitary operators. Based on the definitions of Hamiltonians in Sec. IV, the objective operator U O ( γ ζ ) , constraint operator U C ( γ ζ ) , problem operator U P ( γ ζ ) , and mixing operator U M ( β ζ ) which are unitary operators can be defined as follows: U O ( γ ζ ) = e − iγ ζ H O , (26) U C ( γ ζ ) = e − iγ ζ ρH C , (27) U P ( γ ζ ) = U O ( γ ζ ) U C ( γ ζ ) = e − iγ ζ ( H O + ρH C ) , (28) U M ( β ζ ) = e − iβ ζ H M , (29)where γ ζ and β ζ are in γ ≡ γ · · · γ p and β ≡ β · · · β p , respectively: ζ ∈ Z + and ≤ ζ ≤ p .Note that implementing U P ( γ ζ ) and U M ( β ζ ) is the core of QAOS implementation.In Fig. 2, cirq.rz() and cirq.CZPowGate() are used for the implementation of U O ( γ ζ ) and U C ( γ ζ ) , respectively; and based on these, U P ( γ ζ ) is implemented as (28). Notice that cirq.rz() represents the rotation- Z gate, and cirq.CZPowGate() represents the quantumgate that applies a phase to the state | (cid:105) . In addition, U M ( β ζ ) is implemented using cirq.rx() which means the rotation- X gate.The part that finds the optimal parameters using Keras (one of well-known open-source deeplearning computation libraries) is (Step 2), from line to line , in Fig. 2. In this model,the parametrized quantum circuit (PQC) layer provides auto-management of variables in theparameterized circuit [10]. B. Results
The performance of our proposed QAOS algorithm is compared with random search andgreedy search. In addition, the QAOS algorithm executes with different p value settings wherethe p value means the number of alternation of U P ( γ ζ ) and U M ( β ζ ) in (28) and (29), i.e., ζ ∈ Z + and ≤ ζ ≤ p .For the performance evaluation, we generate random graphs with nodes, i.e., links inconflict graphs; and then random search, greedy search, and QAOS algorithms are performedfor the given random graphs. The measurement of each QAOS is performed , times in eachsimulation (i.e., in each randomly generated conflict graph), and the solution that is returned withthe maximum probability is selected as the solutions of each simulation. Then, the performanceof each algorithm is quantitatively measured as η (cid:44) ab where a and b are the summation ofweights of the scheduled nodes by the used algorithms and the summations of weights of thescheduled nodes by brute-force full search (i.e., exhaustive search), respectively, for the givenrandomly generated graphs. Then, the cumulative distribution functions (CDF) of η for eachalgorithm is computed and illustrated in Fig. 3.As presented in Fig. 3, QAOS algorithms with p ≥ present better performance thanrandom search and greedy search, in any kinds of randomly generated conflict graphs. In theserepeated simulations, the performances of QAOS algorithms are improved as p value increases.In particular, the performance of QAOS algorithm with p = 10 is much better than the QAOSalgorithms with p = 8 and p = 9 . As shown in Table I, the QAOS algorithm with p = 10 returnsoptimal solutions (i.e., equivalent to the solutions obtained by brute-force full search) with the April 24, 2020 DRAFT
Experiment Trials (%) C D F QAOS, p = 10 QAOS, p = 9 QAOS, p = 8 Greedy Random
Fig. 3: Performance Evaluation Results.ratio of . . Through these performance evaluation results, it has verified that our proposedQAOS algorithm presents desired results in terms of the accuracy of the solutions.TABLE I: Percentage of Optimal Solution Computation QAOS, p = 10 QAOS, p = 9 QAOS, p = 8 Greedy Random . % . % . % . % . % DRAFT April 24, 2020
VI. C
ONCLUDING R EMARKS
In wireless network research, the large-scale and multi-scale scheduling can be modeled withthe MWIS problem which is one of well-known NP-hard problems. In order to solve the MWISproblem, a QAOA-based scheduling algorithm, so called quantum approximate optimization forscheduling (QAOS) , is proposed. The performance of our proposed QAOS is evaluated via data-intensive simulations using Cirq and TensorFlow-Quantum. As a result, we confirm that ourproposed QAOS outperforms the other methods for the MWIS-based multi-scale schedulingproblem. R
EFERENCES [1] E. Farhi, J. Goldstone, and S. Gutmann, “A quantum approximate optimization algorithm,” arXiv:1411.4028 , 2014.[2] C. Rose and I. S. Mian, “Inscribed matter communication: Part I,”
IEEE T-MBMC , vol. 2, no. 2, pp. 209–227, 2016.[3] T. Nakano, “Molecular communication: A 10 year retrospective,”
IEEE T-MBMC , vol. 3, no. 2, pp. 71–78, 2017.[4] S. F. Bush, J. L. Paluh, G. Piro, V. S. Rao, R. V. Prasad, and A. W. Eckford, “Defining communication at the bottom,”
IEEE T-MBMC , vol. 1, no. 1, pp. 90–96, 2015.[5] J. Kim, G. Caire, and A. F. Molisch, “Quality-aware streaming and scheduling for device-to-device video delivery,”
IEEE/ACM Transactions on Networking , vol. 24, no. 4, pp. 2319–2331, August 2016.[6] J. Preskill, “Quantum computing in the NISQ era and beyond,”
Quantum , vol. 2, p. 79, August 2018.[7] S. Hadfield, Z. Wang, B. O’Gorman, E. G. Rieffel, D. Venturelli, and R. Biswas, “From the quantum approximateoptimization algorithm to a quantum alternating operator ansatz,”
Algorithms , vol. 12, no. 2, 2019.[8] S. Hadfield, “On the representation of Boolean and real functions as Hamiltonians for quantum computing,” arXiv:1804.09130 , 2018.[9] M. Fingerhuth, T. Babej, and P. Wittek, “Open source software in quantum computing,”
PLoS ONE , vol. 13, no. 12,December 2018.[10] M. Broughton, G. Verdon, T. McCourt, A. J. Martinez, J. H. Yoo et al. , “TensorFlow quantum: A software framework forquantum machine learning,” arXiv:2003.02989 , 2020., 2020.