{'fraction_non_alphanumeric': 0.03498047206656478, 'fraction_numerical': 0.013528046640629423, 'mean_word_length': 4.436307692307692, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Quantum-inspired satin bowerbird algorithm with Bloch spherical search for constrained structural optimization

To enhance the optimization ability of the satin bowerbird optimization (SBO) algorithm, in this paper, a novel quantum-inspired SBO with Bloch spherical search is proposed. In this algorithm, satin bowerbirds are encoded using qubits described on the Bloch sphere, each satin bowerbird occupies three locations in the search space and each location represents an optimization solution. Using the search method of general SBO to adjust the two parameters of the qubit, qubit rotation is performed on the Bloch sphere, which simultaneously updates the three locations occupied by a qubit and quickly approaches the global optimal solution. Finally, the experimental results of five examples of structural engineering design show that the proposed algorithm is superior to other state-of-the-art metaheuristic algorithms in terms of the performance measures.


1.
Introduction. Quantum computation is a novel inter-discipline that includes quantum mechanics and information science. Since D. Deutsch first proposed the Deutsch-Jozsa algorithm in 1985 [11], quantum computation many researchers have paid attention to quantum computation. For example, in 2000, Han K M, et al. proposed a new intelligent algorithm that combines quantum coding with the genetic algorithm (GA) [15], which uses quantum bits to represent individuals and quantum revolving gates to update individual positions.
In 2003, Zhang G, et al. proposed a novel parallel quantum GA [43]. Hui C, et al. proposed a chaos updating rotated gates quantum-inspired GA [17]. In 2004, Wang L, et al. used a hybrid GA based on quantum computing for numerical optimization and parameter estimation [40]. In 2008, Li Panchi, et al. used a quantum-inspired evolutionary algorithm for continuous space optimization based on the Bloch coordinates of qubits [25]. Additionally, the rotation angle of the quantum revolving gate is fixed, and it is not sufficiently flexible to solve some complex problems. Some quantum intelligent algorithms are expressed using vectors, and the quantum characteristics are not sufficiently obvious. In this paper, a satin blue gardener optimization algorithm using Bloch spherical coding is proposed, which contains two adjustable parameters. To verify its superiority, it is applied to solve constrained structural optimization problems.
With the development of intelligent algorithms, many scholars have proposed many new intelligent algorithms, such as the GA [10], particle swarm optimization (PSO) [21] ant colony optimization (ACO) [12], differential evolution (DE) [39] and artificial bee colony algorithm (ABC) [19]. In recent years, new metaheuristic algorithms have been proposed, such as cuckoo search (CS) [14], grey wolf optimization (GWO) [32], dragonfly algorithm (DA) [31] and flower pollination algorithm (FPA) [42]. Seyed H. S. M, et al. proposed the satin bowerbird optimization algorithm in 2017 [33]. To enhance the optimization ability of the satin bowerbird optimization (SBO) algorithm, in this paper, a novel quantum-inspired SBO with the Bloch coordinates of quantum bits (QBSBO) is proposed. In the proposed algorithm, satin bowerbirds are encoded by qubits described on the Bloch sphere, each satin bowerbird occupies three locations in the search space and each location represents an optimization solution. Using the search method of general SBO to adjust the two parameters of the qubit, qubit rotation is performed on the Bloch sphere, which simultaneously updates the three locations occupied by a qubit and quickly approaches the global optimal solution. The experimental results of five examples of application structural engineering design show that the proposed algorithm is superior to other state-of-the-art metaheuristic algorithms in terms of the performance measures.
The remainder of this paper is organized as follows: In Section 2, the basic principle of SBO algorithm is introduced. In Section 3, the basic principle of Bloch spherical coding is introduced. QBSBO is used to solve constrained structural optimization problems in Section 4. In Section 5, this paper is summarized and future work is proposed.

Satin bowerbird optimizer (SBO).
According to the habits of satin bowerbirds, males need to build nests to attract females and reproduce their offspring. The location of the nest determines its attractiveness to females. In the process of nesting, males destroy the nests built by other males. All males tend to learn from the best nests. To summarize, the SBO algorithm has the following steps.
2.1. Random initialization of the bowerbird's position. The number of individual nests is randomly generated between the upper and lower bounds. Each nest is a D-dimensional vector. The dimension of parameter D is the same as the number of parameters required to solve the optimization problem.

2.2.
Calculation of the attraction probability for each bowerbird. The nests built by males have an attraction probability, which determines whether females are attracted to them. The higher the probability, the easier it is for nests to attract females. The probability formula is where fit i is the fitness of the i-th solution and is the number of bowers. The value of fit i is obtained using where f (x i ) is the value of the cost function of the i-th position or i-th bird. The cost function is a function that should be optimized.
2.3. Bowerbird position update. Many intelligent algorithms adopt an elite strategy, which retains the position and fitness of the best individual in each iteration of the algorithm. For the SBO algorithm, as the number of nests built by males increases, the experience of nest building also increases. Experienced males are better at building attractive nests. In each iteration, the most experienced males are preserved, and other males learn from the most experienced birds. Elite hero birds affect other male nests.
In each cycle of the algorithm, new changes at any bower are calculated according to where x i is the ith bower or solution vector and x ik is the kth member of this vector. x i is determined as the target solution among all solutions in the current iteration. In Eq. 3, the value j is calculated based on probabilities derived from positions. In fact, the value j is calculated using the roulette wheel procedure, which means that the larger the probability, the greater chance the solution has to be selected as x j . x elite indicates the position of the elite individual, which is saved in each cycle of the algorithm. In fact, the position of the elite is the position of the bowerbird whose fitness is the highest in the current iteration.
Parameter λ k determines the attraction power of the goal bowerbird, where λ k determines the number of step, which is calculated for each variable. This parameter is where α is the greatest step size and p j is the probability obtained by Eq. 1 using the goal bower.
2.4. Bowerbird mutation. In nature, when males are busy building a bower on the ground, they may be attacked by other animals or be completely ignored. In many cases, stronger males steal materials from weaker males, or even destroy their bowers. Hence, at the end of each cycle of the algorithm, random changes are applied with a certain probability. In this step, random changes are applied to x ik with a certain probability. In this case, for the mutation process, a normal distribution (N ) is used with an average of x old ik and variance of σ 2 To help understanding and calculation, the probability formula is transformed into the following formula where the value of σ is a proportion of the space width and calculated as where var max and var min are the upper bound and lower bound assigned to variables, respectively. The z parameter is the percentage difference between the upper and lower limits, which is variable.

Principle of QBSBO.
3.1. Spherical description of qubits. In quantum computing, a qubit is a twolevel quantum system, which is described by a two-dimensional complex Hilbert space as shown in Figure 1. From the superposition principles, any state of the qubit can be expressed as follows Therefore, unlike the classical bit, which can only be set to 0 or 1, the qubit resides in a vector space parameterized by the continuous variables θ and φ. Thus, continuous states are allowed. The Bloch sphere representation is useful for considering qubits because it provides a geometric picture of the qubit and the transformations that can be performed on the state of the qubit. Due to the normalization condition, the qubit's state can be represented by a point on a sphere of unit radius called the Bloch sphere. This sphere can be embedded in a three-dimensional space of Cartesian coordinates (x = cos φ sin θ, y = sin φ sin θ, z = cos θ). By definition, a Bloch vector is a vector whose components (x, y, z) single out a point on the Bloch sphere. We can say that the angles and define a Bloch vector, as shown in Fig. 1. In Fig. 1 if x = cos ϕ sin θ, y = sin ϕ sin θ and z = cos θ, then the quantum state can be written as This sphere can be embedded in a three-dimensional space of Cartesian coordinates described as Encoding method for QBSBO. In QBSBO, all satin bowerbirds are encoded by qubits described on the Bloch sphere. Set the swarm size to NB and the space dimension to D. Then the ith satin bowerbird's nest is encoded as where 0 ≤ θ ij ≤ π, 0 ≤ ϕ ij ≤ 2π, i = 1, 2, . . . , NB and j = 1, 2, . . . , D.

3.3.
Satin bowerbird position update. Nest renewal is achieved by the quantum revolving gate U , and the optimal solution is obtained by updating the location of the nest on the sphere. The formula of the quantum revolving gate U is as follows cos ∆ϕ cos ∆θ − sin ∆ϕ cos ∆θ sin ∆θ cos(ϕ + ∆ϕ) sin ∆ϕ cos ∆θ cos ∆ϕ cos ∆θ sin ∆θ sin(ϕ + ∆ϕ) In Eq. 12, the rotation of the quantum revolving gate U updates the quantum bit through ∆ϕ and ∆θ. The parameters ∆ϕ and ∆θ are updated using 3.4. Satin bowerbird mutation. To improve the individual diversity of QBSBO from iteration period to the later stage and prevent it from falling into a local optimum, the satin bowerbird's nest mutates according to a certain probability. The quantum nongate V mutates an individual qubit as follows From Eq. 16, the purpose of V is to make the nest position rotate along the sphere in the late iteration period. The rotation angle is large, which is conducive to determining the optimal position. 3.5. Projection measurement of qubits. Because the optimization problem is real, a quantum bit is projected onto the x-axis, y-axis and z-axis. The projection formula is as follows For the ith individual jth qubit |ϕ ij , the projection of the coordinates of the measurement is where i = 1, 2, . . . , NB and j = 1, 2, . . . , D. Here, QBSBO individuals are composed of quantum bits, whose coordinates on the spherical X, Y , Z axes are regarded as three parallel genes. Hence, QBSBO individuals have three gene chains.
3.6. Solution space transformation. In QBSBO, each individual contains 3n Bloch coordinates of n qubits that can be transformed from unit space [−1, 1] n to the solution space of the continuous optimization problem. Each Bloch coordinate corresponds to an optimization variable in the solution space. Let the jth variable of the optimization problem be X i ∈ [A i , B i ], and (x ij , y ij , z ij ) denotes the coordinates of the jth qubit for the ith individual. Then the corresponding variables (X ij , Y ij , Z ij ) in the solution space are computed as follows, respectively where i = 1, 2, . . . , NB and j = 1, 2, . . . , D.

3.7.
Optimal solution is updated. The three solutions . . , Z i,D ) described by the ith individual are substituted into the fitness function. Let fit best denote the best fitness so far. Then the optimal solution is obtained  Calculate the probability of an individual by Eq. 1 6.
for every bower 7.
Update the individual position phase using the quantum rotating gate 9.
end for 10.
Rank individuals according to the fitness values 11.
Update the elite individual 12.end while 13.Return the best individual by Eq. 22 4. QBSBO for constrained structural optimization problems. In this section, the QBSBO algorithm is used to solve some constrained structural problems, including pressure vessel design [31], welded beam design [27], tensile/compression spring design [35,2], cantilever Beam design [4] and reducer design [13]. 4.1. Pressure vessel design. The optimization algorithm is used to optimize the parameters of the pressure vessel design problem to minimize the objective function, as shown in Figure 2. The objective function of the pressure vessel design problem and the constraints of related parameters are as follows. Consider with variables in range In Eq. 23, the main parameters are the thickness of the shell(T s ), thickness of the head(T h ), inner radius(R) and length of the cylindrical section without considering the head(L).   Table 1 shows that by comparing the QBSBO algorithm with the SBO, GA, GSA, PSO and other algorithms, the QBSBO algorithm is more accurate under constraints. The QBSBO algorithm has obvious advantages in the solving pressure vessel design problem. Table 2 shows that the QBSBO algorithm has a smaller average and standard deviation than the original algorithm, and the best results are more accurate than those of the original algorithm, which shows the advantages of the improved algorithm.

4.2.
Welded beam design problem. The optimization algorithm is used to optimize the parameters of the welded beam design problem to minimize the objective function, as shown in Figure 3. The objective function of the pressure vessel design problem and the constraints of related parameters are as follows. Consider with variables in range , P = 6000lb, L = 14in, δ max = 0.25in, E = 30 * 10 6 psi, G = 12 * 10 6 psi, τ max = 13.600psi, σ max = 30000psi.
In Eq. 24, the four variables thickness of the weld h, length of the clamped bar l, height of the bar t and thickness of the bar b need to be optimized.    Table 3 also shows that the QBSBO algorithm has the same advantages as those for the solving pressure vessel design problem, and has a higher accuracy than the SBO, GA, GSA, PSO and other algorithms. Table 4 shows that the average and standard deviation of the QBSBO algorithm are smaller than those of the original algorithm, which shows the effectiveness of the improved algorithm.

4.3.
Tension compression spring design problem. The QBSBO algorithm is used to solve the spring optimization problem as shown in Figure 4, and the performance of objective function minimization under constraints is verified. The objective function and parameter constraints are as follows. Consider Subject to with variables in range In Eq. 25, the variables wire diameter d, mean coil diameter D and length (or number of coils) N need to be optimized.   As shown in Table 5, the QBSBO algorithm also has advantages in solving the pressure spring problem. Table 6 shows that the accuracy of the original algorithm is improved.

4.4.
Cantilever beam design problem. The QBSBO algorithm is used to solve the cantilever beam design problem, as shown in Figure 5. The objective function and related parameters are constrained as follows. Consider with variables in range In Eq. 26, the variables x 1 , x 2 , x 3 , x 4 , x 5 need to be optimized.   Table 7 also shows that the QBSBO algorithm has the same advantages over other commonly used algorithms in solving the cantilever problem. The QBSBO algorithm in Table 8 has a smaller average value and better quality than the original algorithm, which verifies the effectiveness of the improvement.

4.5.
Speed reducer design problem. We continue to use the QBSBO algorithm to test and solve the reducer design problem as shown in Figure 6, and verify the effect of its improvement. The objective function is as follows. Minimize where 2.6 ≤ x 1 ≤ 3.6, 0.7 ≤ x 2 ≤ 0.8, 17 ≤ x 3 ≤ 28, 7.3 ≤ x 4 ≤ 8.3, 7.3 ≤ x 5 ≤ 8.3, 2.9 ≤ x 6 ≤ 3.9, 5.0 ≤ x 7 ≤ 5.5. Table 9 Comparison results for the speed reducer design problem  The experimental results show that the QBSBO algorithm is also effective in solving the speed reducer design problem. Table 10 shows that the QBSBO algorithm has higher convergence accuracy than the original algorithm. Through simulation experiments, the QBSBO algorithm was used to solve five types of engineering optimization problems. A comparison of the accuracy and average value of the results verified that the QBSBO algorithm is superior to other commonly used algorithms. In fact, no algorithm is perfect and can solve all optimization problems. QBSBO still has some shortcomings regarding solving individual problems; however, through simulation experiments for constrained structural problems, it is sufficient to show that QBSBO has the ability to deal with relatively complex problems. Conclusions and future work. In this paper, we proposed a quantum coding gardener algorithm based on the Bloch sphere, which was improved based on the SBO algorithm. Quantum coding for an individual in the algorithm improved the convergence speed and accuracy of the original algorithm, improved the diversity of the population and effectively avoided local convergence. The simulation results showed that the QBSBO algorithm has certain advantages in dealing with some complex problems. In future work, the application scope of the QBSBO algorithm will be expanded and more practical problems will be solved that are difficult to solve using more complex common methods.