## 2 Experimental Section
### Quantum Fireworks Algorithm
#### 2.1.3 Quantum Fireworks Algorithm  
Parameters Initialized  
In the solution space, randomly generate \(N\) fireworks, and initialize their coordinates. Here, we use the probability amplitude of quantum bits to encode the current position of fireworks, and the encoding method is used by the following formula:  
\[P_{i}=\left[ \begin{array}{c}\cos(\theta_{i1})\cos(\theta_{i2})\cdots\cos( \theta_{in})\\ \sin(\theta_{i1})\sin(\theta_{i2})\cdots\sin(\theta_{in})\end{array} \right] \tag{8}\]  
where \(\theta_{ij}=2\pirand()\), \(rand()\) is a random number between 0 and 1; \(i=1,2,\cdots,m\); \(j=1,2,\cdots,n\); \(m\) is the number of fireworks, \(n\) is the number of solution space. Therefore, the corresponding probability amplitude of individual fireworks for the quantum states \(|0>\) and \(|1>\) are as follows:  
\[P_{ic}=(\cos(\theta_{i1}),\cos(\theta_{i2})\cdots\cos(\theta_{in})) \tag{9}\]  
\[P_{is}=(\sin(\theta_{i1}),\sin(\theta_{i2})\cdots\sin(\theta_{in})) \tag{10}\]  
Solution Space Conversion  
The searching process of a fireworks optimization algorithm is carried out on the actual parameter space \([a,b]\). Due to the probability amplitude of fireworks location being in the range of \([0,1]\), it needs to be decoded into the actual parameter space \([a,b]\) to search in the fireworks algorithm. Let the \(\Delta\theta_{jd}^{k+1}\)th quantum bit for the individual \(\alpha_{jd}^{k+1}\) is \(\left[\alpha_{i}^{j},\beta_{i}^{j}\right]^{T}\), and its corresponding conversion equations be:  
\[X_{ic}^{j}=\frac{1}{2}[b_{i}(1+\alpha_{i}^{j})+a_{i}(1-\alpha_{i}^{j})]\ if\ rand()<P_{id} \tag{11}\]  
\[X_{is}^{j}=\frac{1}{2}[b_{i}(1+\beta_{i}^{j})+a_{i}(1-\beta_{i}^{j})]\ if\ rand()\geq P_{id} \tag{12}\]where \(rand()\) is a random number between \([0,1]\); \(X_{ic}^{j}\) is the actual parameter value in \(j\) th dimension position when the quantum state of \(i\) th fireworks individual is \(|0>\), \(X_{is}^{j}\) is the actual parameter value in \(j\) th dimension position when the quantum state of the \(i\) th fireworks individual is \(|1>\). \(b_{i}\) and \(a_{i}\) are the lower and upper limits. Assuming the FA is searching in two-dimensional space, that means \(j=1,2\). Initialize the position of population: \(InitX_{-}\_axis\); \(InitY_{-}\_axis\); and the position of individuals can be determined as follows:  
\(if\;rand()<P_{id}\):  
\[X(i) =X_{-}\_axis+\frac{1}{2}[b_{i}(1+\alpha_{i}^{1})+a_{i}(1-\alpha_{i}^{1})]\] (13) \[Y(i) =Y_{-}\_axis+\frac{1}{2}[b_{i}(1+\alpha_{i}^{2})+a_{i}(1-\alpha_{ i}^{2})]\] (14) \(if\;rand()\geq P_{id}\):  
\[X(i) =X_{-}\_axis+\frac{1}{2}[b_{i}(1+\beta_{i}^{2})+a_{i}(1-\beta_{i}^{2})] \tag{15}\] \[Y(i) =Y_{-}\_axis+\frac{1}{2}[b_{i}(1+\beta_{i}^{2})+a_{i}(1-\beta_{i }^{2})] \tag{16}\]  
Calculate the Fitness Value \(f(x_{i})\) of Each Individual, and Obtain the Explosion Radius and Generated Sparks Number \(S_{i}\)  
\[S_{i} =M\times\frac{y_{\max}-f(x_{i})+\varepsilon}{\sum\limits_{i=1}^{N }\left(y_{\max}-f(x_{i})\right)+\varepsilon} \tag{17}\] \[R_{i} =\hat{R}\times\frac{f(x_{i})-y_{\min}+\varepsilon}{\sum\limits_{i= 1}^{N}\left(f\left(x_{i}\right)-y_{\min}\right)+\varepsilon} \tag{18}\]  
Individual Position Updating  
The individual position update is operated by using a quantum rotating gate using the following equation:  
\[\left[ \begin{array}{c}\alpha_{id}^{k+1}\\ \beta_{id}^{k+1}\end{array} \right]=\left[ \begin{array}{cc}\cos\theta_{id}^{ k+1}&-\sin\theta_{id}^{k+1}\\ \sin\theta_{id}^{k+1}&\cos\theta_{id}^{k+1}\end{array} \right]\left[ \begin{array} []{c}\alpha_{id}^{k}\\ \beta_{id}^{k}\end{array}