4.1. General Concept
For a truss system consisting of
N truss elements, a set of
C discrete choices is defined for the cross-sectional area of each truss element. For truss element
n, this set can be written as shown in Equation (
3).
To define the cross-sectional area of truss
n, a set of binary qubit variables is needed, each corresponding to one of the choices of cross-sectional area, as shown in Equation (
4):
The total cross-sectional area of truss
n can then be defined by the summation of the products of the discrete choices and their corresponding binary qubit variables as shown in Equation (
5).
In the case that, for truss
n, only one of the qubits in
is equal to 1, and the others are equal to 0, then this binary variable would correspond directly to a particular choice in cross-sectional area. For a truss system of
N truss elements and
C discrete choices per truss element, the number of variables needed would become
in total. Together, they form the solution vector of the problem. For example, for the two-truss problem, the solution vector would be defined as:
To select the mid-sized choice for each truss element in the two-truss problem, the solution vector would evaluate to:
It may be noted at this point that it is technically possible to select multiple cross-sectional areas for a single truss element. This would occur when a truss element has more than one associated binary variable set to a value of 1. As per Equation (
5), this would mean that the area of the truss element becomes the summation of multiple available choices. However, in this research the goal is to make a single distinct choice from the available set of choices. Solutions will be considered valid when exactly one cross-sectional area is selected per truss element. Any other potential solution, selecting either none or multiple cross-sectional areas per truss element, will be considered invalid.
With the truss cross-sectional area defined in terms of qubit variables as shown above, a symbolic solution process for the truss optimization problems has been conceived, such that the objective function would eventually be expressed as a QUBO function of these qubit variables. We would then use QA to find the solutions of these qubit variables which would minimize the objective function. The following steps summarize this symbolic solution process:
Using the expression for the truss cross-sectional area, the element stiffness matrices of the truss members can also be written in terms of the qubit variables.
Using the FEM assembly procedure, the symbolic global stiffness matrix of the entire truss structure can be assembled from each of the element stiffness matrices.
Proceed as normal with the FEM analysis, taking into account of the boundary conditions and applied loads. By inverting the symbolic global stiffness matrix, and multiplying this inverse matrix with the load vector, a symbolic vector of nodal displacements can be obtained.
Using the symbolic vector of nodal displacements and the known initial length of every truss element, symbolic expressions for the strains of the truss elements can be set up.
By multiplying the symbolic expressions of the truss strains with the Young’s modulus, symbolic expressions for the truss stresses are obtained.
The symbolic expressions for the truss stresses will be used to construct an objective function for which the minimum solution encodes the optimal choice of cross-sectional area for every truss element in the structure.
The symbolic objective function will be transformed into a QUBO format, then sent to D-Wave to find the minimum solution.
4.4. Iterative Non-Fractional Approximations to the Fractional Objective Function
Ajagekar et al. have developed a method with which the optimum solution to fractional objective functions can be found by iteratively solving an adaptive non-fractional function [
32]. The iterative scheme described by the authors is presented in Equation (
24).
In this scheme, the fractional objective function , expressed in terms of the binary problem variables , is rewritten into a non-fractional form. This happens in step 3 of the scheme, where the non-fractional objective is formed. If this non-fractional function can be written in a QUBO form, then its optimal solution can be found using the QA in step 4. In step 6, the objective function value of the original fractional function is evaluated using . When the difference between the objective function values found in consecutive iterations is less than , the while loop is broken and the analysis has converged. Ultimately, the final solution that is found for will be the minimum solution to the original fractional objective function.
The above-mentioned method has been implemented in Python scripts for the discrete truss sizing optimization problems [
31]. Here, the method has been slightly extended, to include a user-defined maximum number of iterations. This has been added as an additional condition to the while loop in step 1 of Equation (
24). In other words, step 1 is defined as:
Setting a maximum number of iterations will help prevent wasting excessive quantum computational time in cases where the analysis has difficulty converging on an optimal solution.
4.5. Objective Function Processing to Yield a QUBO Problem
With the iterative scheme by Ajagekar et al. [
32], the solution to the fractional objective function for the discrete truss sizing optimization problem can be found by iteratively minimizing an adaptive non-fractional function. Once this non-fractional form is determined, there are a number of processing and simplification steps to take to eventually transform it into a QUBO form. By reducing the complexity of the objective function, the QA might be able to more easily identify the global optimum solution. The processing steps will allow the user to fine-tune the performance of the QA and to aid in finding valid solutions to the problem. In the following sections, the simplifications and processing steps are discussed.
4.5.1. High-Order Truncation
The first simplification to the rewritten non-fractional objective function is to truncate the excessively high-order terms. Specifically, for a system with N truss elements, any term in the objective function that is above order can be truncated, since for a valid solution to the truss optimization problem, only N qubits are expected to end in a 1 state, while all other qubits should end in a 0 state. Therefore, all terms in the objective function that are above order do not contribute to valid solutions. These terms can, therefore, be safely truncated to simplify the overall objective function without any influence on the validity of the solution.
The objective functions generally contain every possible unique multiplication between the qubit variables. Therefore, truncating the excessively high-order terms from the objective function can have a very large impact on the overall complexity of the objective function. This was investigated with a simple Excel sheet, which is made available online [
31]. For example, in the two-truss problem, a total of six qubit variables are used. In total, this gives 63 different unique multiplications of qubit variables from first to sixth order. For this problem, all terms above second order only contribute to the invalid solutions, as valid solutions are expected to have exactly two qubit variables with a value of 1. Therefore, terms above second order can all safely be removed from the objective function. After truncating the terms above second order, only 21 total first- and second-order terms remain in the objective function, resulting in a 66% reduction in the number of terms in the objective function. In a similar vein, for the three-truss problem, this truncation reduces the number of terms in the objective function by roughly 75%. For the four-truss problem, the reduction is approximately 80%. It is expected that such a significant reduction in the complexity of the objective function will allow the QA to more easily find valid global minimum solutions to the truss sizing optimization problems.
4.5.2. Linear Scaling
When submitting problems to the QA, there are a number of parameters that can be fine-tuned to alter or improve the performance of the QA. The relative magnitudes of these parameters are typically what matters to the performance of the QA. To set a consistent baseline for solving the truss sizing optimization problems, it is, therefore, convenient to scale the magnitude of the objective function to a user-defined value. In this way, the magnitude of other constraints can be scaled accordingly. Thus, a linear scaling of each of the terms in the objective function can be performed, to ensure that the terms have consistent and controllable magnitudes.
First of all, the term with the maximum absolute magnitude in the objective function,
, must be found. Then, every term in the objective function
F can be divided by this magnitude to perform the linear scaling. A user-defined parameter,
, is introduced to ensure that the maximum magnitude of the terms in the objective function can be exactly specified. Thus, the linear scaling of the objective function
F is performed as shown in Equation (
26).
Inside the linearly scaled objective function , the term with the maximum magnitude will have a magnitude of . By altering the value of , the user is able to control the relative importance of the objective function with respect to other problem-specific parameters such as constraints.
4.5.3. Non-Linear Scaling
During the brute-force testing of the objective functions for the different sample problems in
Section 4.3, it was seen that with certain objective functions the global minimum solution and other local minimum solutions can have nearly identical function values. This was especially the case for the three-truss problem with the original, fractional objective function. When the differences between solutions are small, it becomes difficult for the QA to find the global optimum solution. The very small differences between local minima and the global minimum are mainly due to some terms in the objective function having very small, high-precision coefficients.
Due to analog control errors, small and high-precision coefficients are difficult for the QA to correctly take into account [
33]. Furthermore, when a problem is submitted to the D-Wave QA, it is by default automatically scaled (by
auto_scale) to ensure the problem coefficients fall inside the controllable range of the QA. For linear QUBO coefficients, this range is between −2 and 2. For the quadratic QUBO coefficients, the maximum available range is between −2 and 1 [
34]. By default, the QA uses a range between −1 and 1. These ranges can be directly queried from the D-Wave solver using Python commands:
DWaveSampler().properties[’h_range’]
DWaveSampler().properties[’j_range’]
It is good to be mindful of this automatic scaling before submitting problems to the QA to prevent cases where a problem is unexpectedly scaled down to a magnitude that cannot feasibly be controlled by the QA.
To assist the QA with small high-precision coefficients, it would be beneficial if these coefficients could be amplified. In turn, this might also amplify the differences between the global and other local minimum solutions. This would potentially help the QA find the global optimum solution. Furthermore, this would also help the QA more effectively utilize information from the objective function, as previously insignificant terms might be amplified to a magnitude that the QA could actually take into account. With this idea in mind, a non-linear scaling method has been developed, with which very small coefficients in the objective function can be scaled to become larger and more influential, while terms that are already significant are not scaled as much.
A Python function has been created to perform this non-linear scaling. The method relies on simple user-defined parameters which allow for manual tweaking once the objective function has been fully implemented for use on the QA. Given the user-defined scaling parameter
, a positive coefficient
from the objective function is input into the non-linear scaling function. The non-linearly scaled coefficient
is then expressed by Equation (
27).
For negative input coefficients,
, the non-linear scaling is performed by Equation (
28), yielding the negative non-linearly scaled coefficient
.
To determine if the input coefficient must be scaled using either Equation (
27) or Equation (
28), a simple if statement is used. By setting
to be a certain small number, such as 0.025, the amount of scaling applied to small coefficients is much higher than that applied to large coefficients.
As a demonstration of the non-linear scaling, several plots are given in
Figure 10, showing the influence of changing the parameter
. It can be seen that the scaling is much more significant for smaller coefficients than for larger ones. However, with very aggressive values of
, such as 0.001, this can also cause all relatively large coefficients to become essentially equal. The use of this non-linear scaling function will, therefore, be a balancing act of increasing the importance of smaller coefficients without losing the distinction between the larger ones. The Python code for the non-linear scaling function, and for producing the plot from
Figure 10, is available online [
31].
The effect of the non-linear scaling was also investigated for the specific truss sizing sample problems. The non-linear scaling was performed during the iterative solving procedure. Specifically, it was performed between steps 3 and 4 of the procedure outlined in Equation (
24), and was applied to the rewritten non-fractional objective function. The effect of the non-linear scaling was investigated for the first iteration of the sample problems. This first iteration is convenient to investigate as Equation (
24) shows that
, meaning that the objective function in step 3 in Equation (
24) only involves the numerator of the original fractional objective function. The rewritten non-fractional function was firstly linearly scaled, choosing the user-defined maximum coefficient to be
. This brought the function values to a reasonable range for the QA. Then, the non-linear scaling was applied, using a scaling parameter of
. The plots in
Figure 11,
Figure 12 and
Figure 13 show both the original (linearly scaled) and non-linearly scaled energy landscapes of the first iteration in the solving procedure for the sample truss problems. It can be seen that the small fluctuations in the energy landscape are amplified, which should make the problem easier to solve for the QA. Therefore, the non-linear scaling has been applied when submitting problems to the QA.
It is important to note that this non-linear scaling method is developed solely for the purpose of increasing the differences between the global and local minima in the energy landscapes of this study. It is not intended to be used as a general-purpose tool for problems with unknown energy landscapes, since using overly aggressive scaling factors for
may cause the global minimum solution to change. However, this is not expected to be an issue for the truss sizing optimization problems here. In step 6 of the iterative solving procedure in Equation (
24), the interim solution
is evaluated with the original fractional objective function, meaning that the iterative procedure should eventually converge on the global optimum of the original fractional objective function.
4.5.4. Truncation of Insignificant Terms
Once the linear and non-linear scaling has been performed, it is possible to further simplify the objective function. After all the scaling has been applied, certain terms in the objective function may still have magnitudes very close to zero. Such terms would be difficult for the QA to consider as there is a finite precision with which qubit biases can be controlled within the QA hardware [
33]. If the magnitudes of the terms in the objective function were smaller than the analog control error of the QA for the qubit biases, they would not be reliably taken into account by the QA. Thus, terms that are too small in magnitude can simply be removed from the objective function, as including them is akin to simply introducing noise into the function. A conservative truncation approach is to remove terms with magnitudes smaller than
, which is beyond the precision that the QA can control. This reduces the complexity of the objective function, facilitating the QA in finding the global optimum solution.
4.5.5. Unary Constraint
The majority of the solutions to the truss optimization problems are invalid, i.e., when an incorrect number of cross-sectional areas are selected. In other words, when either zero or more than one cross-section is selected for a truss member, the solution is invalid. Solutions can only be valid when exactly one cross-sectional area is chosen for every truss member. To promote the selection of valid solutions, the unary constraint is implemented.
For every truss element
n in a truss system, with a total of
C possible choices of cross-sectional area, Equation (
29) must hold for valid solutions to the truss sizing optimization problem.
Since only one of the qubits on which this constraint acts can take a value of 1, while the others must all equal 0, this constraint is, therefore, referred to as the
unary constraint. Further elaboration on the unary constraint is given in [
35]. In the context of the truss optimization problem, it enforces that only one cross-section is chosen per truss element. However, in the form shown in Equation (
29), the constraint cannot be directly applied in the QUBO problem framework because it is written as an equality constraint, which by definition is incompatible with the quadratic
unconstrained binary optimization format. For the constraint to become QUBO-compatible, it must be rewritten as an objective function of a minimization problem. A common method is to rewrite the equality constraint as a penalty function using a ‘squared-error’ approach [
36,
37]. This approach is also used, for example, in the work of Van Vreumingen et al. and Neukart et al. [
10,
11]. Here, the constraint can be rewritten as shown in Equation (
30).
Now, adding in a penalty scaling factor
, the Hamiltonian energy penalty function for the unary constraint becomes:
For the truss sizing optimization problems, only three possible choices of cross-sectional area are available per truss element, i.e.,
. Therefore, Equation (
31) can be expanded and simplified, as shown in Equation (
32).
Knowing that
, which means that
, the expression can be further simplified:
Finally, the constant term can be dropped, since it is independent of the qubit variables, and does not affect the minimization problem. This makes the unary constraint penalty function compatible with the QUBO problem framework, since it can now be written as a pure summation of linear and quadratic terms, as shown in Equation (
34).
By adding the unary constraint of each truss element to the overall objective function, the QA is more likely to find valid solutions. The strength of the unary constraint can be fine-tuned by altering the value of the user-defined parameter . By trial and error, it has been found that a good starting value of is twice the magnitude of the maximum term in the objective function. However, if invalid solutions are consistently found, the strength of the constraint can be increased until noncompliance with the constraint stops occurring.
4.5.6. Quadratization
Up until this point, the objective function has been manipulated, scaled, and truncated in order for it to become more compatible with the QUBO problem formulation. However, one key issue has yet to be solved: the function may still contain many terms that are higher than second order. Therefore, it still cannot be used on the QA, since by definition the QA can only solve quadratic problems. Performing a quadratization of a high-order objective function ensures that it is rewritten as a quadratic function with equivalent solutions.
There are many different methods of quadratization in literature. An extensive overview on the topic is given by Dattani [
38]. Some of these methods utilize auxiliary variables to rewrite the high-order objective function into an equivalent quadratic-order expression, while others achieve this without the auxiliary variables. Each method has its respective benefits and drawbacks. For example, it is convenient when no auxiliary variables are needed, yet in that case it may require much more effort to rewrite the objective function in an equivalent quadratic form. Alternatively, if a method uses auxiliary variables, it may be easier to find an equivalent quadratic form, but the additional variables would increase the complexity of the objective function, making it more difficult for the QA to find the optimum solution [
38].
The quadratization has already been implemented in D-Wave [
39]. In their implementation, all the high-order terms of the objective function are rewritten and replaced by auxiliary variables, such that the final expression is at most quadratic. An additional user-defined parameter is used to select the strength with which the quadratization is enforced [
39]. If the quadratization is not enforced correctly, this can result in a poor approximation of the original high-order objective function. The quadratization strength is problem-dependent and must be tuned such that the quadratization is always obeyed, so as to have an accurate representation of the original high-order objective function.
With the quadratization, the discrete truss sizing optimization problems can finally be written as QUBO problems. This vital step concludes all the necessary preparatory work for the problems to be made compatible with the quantum computing hardware. They can now be solved using the D-Wave QA. In the next section, some notable parameters that influence the solution process of the QA are discussed.
4.6. Parameter Tuning
In the previous sections, a number of user-defined parameters have been introduced which influence the objective functions of the three truss sizing problems. Their values need to be chosen before the problems can be submitted to the QA. In summary, values for the following parameters need to determined:
To aid in finding sensible values for most of the above parameters, without wasting the limited amount of quantum computational time available, an alternative classical solver was used before running on the QA. D-Wave provides a simulated annealing (SA) algorithm, which can be used to solve QUBO problems. The SA solver only relies on the local classical computing hardware and does not expend any of the quantum computational time allowance. The SA solver was, therefore, used first to test the functionality of the Python code, and to find initial values for the relevant problem parameters.
Values for the parameters related to the iterative solving procedure were determined first. Testing via the initial SA analyses showed that around five iterations were needed to find a converged solution. This value was tripled for the quantum annealing analyses to give enough room for the iterations to converge. Thus, the maximum number of iterations within one solving attempt was set to 15. If the procedure could not converge after the maximum number of iterations was reached, the analysis would be stopped to prevent excessive expending of computational time. The convergence threshold
for the iterative procedure (as seen in Equation (
24)) was set to
, the same as the one used by Ajagekar et al. [
32].
Starting values for the different objective function processing parameters were also determined from the initial SA analyses. First of all, the highest order of terms allowed in the objective function for each of the sample problems was set equal to the number of truss elements. Second, the linear scaling maximum magnitude was set to a value of 1 for all analyses. Third, the non-linear scaling parameter was set to a value of 0.1 for all analyses. During the brute-force testing, it was observed that this value improved the distinction between minima in the energy landscapes of the sample problems, while preserving the location of the global minima. Fourth, the unary constraint strength was set to a value of 10 for the two- and three-truss problems. For the four-truss problem it was set to a value of 20. Testing via SA showed that with these settings the constraint was obeyed consistently, yielding valid solutions to the truss sizing problems. Fifth, terms that had a magnitude smaller than were truncated to slightly reduce the number of terms in the objective functions. This is a conservative truncation as it is well beyond the precision that the QA hardware can control. Finally, the quadratization strength was set to a value of 10 for the two- and three-truss problems, and a value of 20 for the four-truss problem, such that it could match the strength of the unary constraint.
For the QA, some additional parameters are needed to solve the sample problems. The number of reads describes the number of times a specific problem is solved by the QA before the final best-performing solution is returned to the user. Increasing the number of reads increases the likelihood of obtaining optimal solutions at the expense of additional computational time. To minimize the expenditure of quantum computational time, a viable number of reads needs to be firstly estimated.
Using the SA solver, some test runs were firstly performed in which the numbers of reads were set to values of 16, 64, and 256, for each of the three sample problems. For the two-truss problem, the global optimum results were obtained every single time, regardless of the number of reads. For the three-truss problem, using 64 and 256 reads reliably gave optimal or near-optimal results. For the four-truss problem, only when setting the number of reads to 256 was the global optimum result reliably obtained. The settings for the number of reads for the QA analyses were, therefore, chosen based on the above tests. Namely, for the two-truss problem, the number of reads was set to 16 and 64. For the three-truss problem the number of reads was set to 64 and 256. Finally, for the four-truss problem, the number of reads was only set to 256.
The chain strength parameter for the QA relates to a physical issue called chain break, which can occur while the QA is solving problems. To explain the fine-tuning of the chain strength parameter, some context on the chaining of qubits is firstly given. A QUBO problem is defined through an upper-triangular
matrix
. The terms on the diagonal of the matrix
relate only to a single problem variable, while the off-diagonal terms describe an interaction between two different variables. On the D-Wave 2000Q used in this research, each qubit can only directly interact with at most six other qubits [
8]. This limited connectivity between qubits can present an issue for larger QUBO problems where more connectivity may be needed. When a QUBO is submitted to the QA, it must be embedded onto the physical architecture of the QPU. The embedding translates the logical structure of a QUBO problem to the physical structure of the QA. This also means that the logical problem variables are translated to the physical qubits on the QPU. However, when the QUBO problem necessitates a high connectivity between logical problem variables, it can become impossible to directly embed every logical variable onto an individual single qubit. By chaining together strings of multiple qubits and forcing them to act as single logical problem variables, the connectivity between the embedded logical variables can be increased beyond the limitations of the physical hardware [
40].
In practice, problems can become very challenging for the QA to solve if the number of interactions between variables is high. A QUBO problem with high connectivity requirements will lead to embeddings with very long qubit chains. In turn, the longer the qubit chains are, the more difficult it is to force the chained qubits to act in unison. When a qubit chain is working as intended, the chained qubits will all end up in the same final ground state, i.e., all being either 0 or 1. However, when a qubit chain is broken, the qubits in the chain will end up in a mixture of 0 and 1 states. This makes the final state of the qubit chain and the intended final state of the corresponding logical problem variable unclear. By increasing the chain strength, the risk of chain breaks occurring is reduced. However, overly high chain strength should be avoided as the relative strength of the objective function itself is reduced, potentially making it more difficult to obtain the true global optimum solution.
In this work, a chain strength of 10 was selected initially, but it was seen that chain breaks would still occur for the three- and four-truss problems. For those problems a chain strength of 30 performed better, preventing chain breaks from occurring.
There are many additional parameters that can be tuned to alter the performance of the quantum annealer, but these are left in their default configurations [
41]. In
Table 3, a summary is given for all the parameters used in each analysis. Parameters that are irrelevant or not applicable for an analysis are indicated by NA.