Quantum k-community detection: algorithm proposals and cross-architectural evaluation

Emerging quantum technologies represent a promising alternative for solving hard combinatorial problems in the post-Moore’s law era. For practical purposes, however, the current number of qubits limits the direct applicability to larger real-world instances in the near-term future. Therefore, a promising strategy to overcome this issue is represented by hybrid quantum classical algorithms which leverage classical as well as quantum devices. One prominent example of a hard computational problem is the community detection problem: a partition of a graph into distinct communities such that the ratio between intra-community and inter-community connectivity is maximized. In this paper, we explore the current potential of quantum annealing and gate-based quantum technologies to solve the community detection problem for an arbitrary number of communities. For this purpose, existing algorithms are (re-)implemented and new hybrid algorithms, that can be run on gate-model devices, are proposed. Their performance on standardized benchmark graphs has been evaluated and compared to the one of a state-of-the-art classical heuristic algorithm. Although no quantum speed-up has been achieved, the existing quantum annealing-based methods as well as the novel hybrid algorithms for gate-based quantum computers yield modularity values, which are similar to those of the classical heuristic. However, the modular architecture of the used algorithms allows for fast utilization of more powerful quantum technologies once they become available. Reproducibility: Our code and data are publicly available (Github in Quantum Modularization. https://github.com/jku-win se/quantum_modularization 2021).

These are considered the most promising candidates for demonstrating quantum advantage in solving a computationally hard problem faster than a classical stateof-the-art algorithm [35]. The recent review by Akbar & Saritha [1] provides a comprehensive overview to the field, which got established under the term quantum community detection. The review also contains a comparative analysis with a focus on quantum inspired algorithms, like the quantum inspired evolutionary algorithm [18].
However, current implementations of those quantum computing technologies are still in its infancy and are highly limited in its number of qubits. Because of this, the use of hybrid algorithms is considered a necessity for practical community detection problems [33]. In those hybrid algorithms (e.g., [30,33,35]), the overall solution is still handled by a classical framework, but adequately formulated sub-problems are solved by a quantum device (followed by the re-integration of the correspondingly determined solutions into the classical framework). As an example, the Quantum Local Search (QLS) algorithm [33] allows for a bipartition of a graph into two communities, where the manageable problem size significantly exceeds the potential of current quantum machines.
Here, machines for QA-based approaches are certainly more scalable with respect to the number of qubits that can be applied. For example, the D-Wave Advantage [24] (which is suitable for QA-based approaches) can handle up to 5000 qubits, while gate-based approaches rely on machines (e.g., by IBM or Google) that can handle a bit more than 100 qubits (with very impressive and ambitious roadmaps toward thousands of qubits though). 1 Using, e.g., an one-hot encoding as proposed in [29], this allows QA-based approaches the direct detection of a discrete number k of communities, while, to the best of our knowledge, all gate-based approaches proposed thus far are limited to detecting k = 2 communities only. Obviously, this makes comparing the current potential of QA-based and gate-based approaches impossible for identifying an arbitrary number of k communities in a given graph.
Moreover, existing QA-based solutions such as proposed in [29] and [30] have not been evaluated yet on recent hard-and software. Furthermore, Negre et al. (2020) [29] evaluated the algorithm for various real-world networks against a classical annealer, but no time metric is stated which indicates how long it took the algorithms to yield the given results.
Overall, this leaves a situation with multiple approaches utilizing quantum technologies to tackle the community detection problem. However, there is no comprehensive comparison between the, respectively, proposed quantum community detection solutions available yet.
This paper aims to fill the gap by, first, contributing two novel algorithms for gatebased devices (for k ≥ 2 communities), called GB1 and GB2 in the following. Second, reimplementing the QA-approaches reviewed above, which are subsequently called QA1 and QA2, utilizing current hard-and software. Finally (third), a structured comparative evaluation with standardized real-world and artificially generated benchmark graphs. The following discusses the research questions that guided our research. The utilized algorithms and according differences to previous work are summarized in Table 1.

Research Questions:
The overall objective of this paper is to evaluate the current potential of quantum computing for the k-community detection problem. Therefore, the two main prevailing quantum computing architectures are evaluated by comparing their performance and the performance of a classical heuristic algorithm for a given set of test graphs. To enable such a comparison, the creation of novel hybrid algorithms, which are built to run on current gate-based quantum computers, is necessary. This leads to the first research question: -RQ1: How can possible gate-based hybrid algorithms for k-community detection be constructed? The classical framework is conceptually based on [30], but GB1 -utilizes QLS [33] instead of quantum annealing for bipartition to enable k-community detection on gate-based devices -utilizes modularity [8] rather than energy density as the objective function, and -does not perform initial random bipartition of the graph GB2 QLS [33] is recursively applied for search space reduction.

QA1
Utilizes D-Wave's hybrid solver for discrete quadratic models [26] QA2 Is a re-implementation of the solution proposed in [30] on current hard-and software The newly developed algorithms as well as the quantum annealing and classical method are evaluated on a test graph. Furthermore, the impact of the quantum parts within the new gate-based algorithms is assessed via a substitution and subsequent evaluation with simulated annealing methods. Therefore, the following two research questions are answered: -RQ2: How do the new hybrid gate-based algorithms, the quantum annealing based methods, and the classical benchmark heuristic perform in k-community detection? -RQ3: What is the performance impact of quantum processing within the gate-based hybrid algorithms?
Due to current hardware limitations [33], the evaluation considers only on a small test graph. However, quantum annealing devices provide a higher number of qubits for combinatorial optimization problems and have already been utilized for a direct encoding of the k-community detection problem [29]. Therefore, we further evaluate the performance of the quantum annealing methods on more advanced larger test graphs, leading to the fourth research question.
-RQ4: How do current quantum annealing based hybrid methods perform on artificially generated benchmark graphs compared to a classical heuristic algorithm?
The new developed hybrid algorithms, together with an implementation of the other algorithms used throughout this paper, are publicly available on Github [17] for reproducibility of the obtained results.
Structure of the paper The remainder of this paper is structured as follows. In Sect. 2, background information concerning the community detection problem and optimization on NISQ devices is given. This also includes a short description of the implemented algorithms which have been proposed in previous work. Section 3 presents the new hybrid algorithms for the k-community detection problem, which utilize gate-based quantum computers, providing an answer to the RQ1 (design question). In Sect. 4, the evaluation methodology, the obtained results of the experiments, and the critical discussion of the obtained results are stated. Therefore, RQ2, RQ3 and RQ4 (knowledge questions) are answered within this section. Finally, the conclusion can be found in Sect. 5. In addition, more details concerning the methodology are given in the appendix.

Background
This section provides introductory information concerning the problem of community detection and appropriate mathematical descriptions as well as the optimization approaches on current NISQ devices. Within the later, the focus lies on existent quantum or hybrid algorithms dealing with community detection.

Community detection problem
The most commonly used measure for the quality of a detected community is the socalled modularity as it has been defined by Newman and Girvan [1,8]. Although the modularity must not be considered as generalizable to all random graphs, the mathematical formulation fits the requirements of quantum computation. Many optimization problems in quantum computing are stated in Ising form [35]. This mathematical abstraction represents the energy of n discrete spin variables s i ∈ {−1, 1}, 1 ≤ i ≤ n with an according local field h i and interactions J i j between different spins. With this approach, the energy of a configuration is denoted by the Hamiltonian function [35]: An equivalent formulation is the Quadratic Unconstrained Binary Optimization (QUBO) form. With the appropriate variable substitution, one obtains [35]: Using one of these forms apparently constraints the problem to a binary form. For each node of a graph G = (V , E) representing one variable (s i or x i ), the modularity of at most two communities is therefore given by [1]: with m being the sum over all edge weights w i j of the graph and the modularity matrix In this context, the node degree is g i = j A i j where A i j represents the according adjacency matrix elements. Similarly, the modularity for a discrete number of communities is given by [8]:

Optimization on NISQ devices
The most prominent quantum approaches designed for NISQ devices are the Quantum Approximate Optimization Algorithm (QAOA) and Quantum Annealing (QA), both of which are inspired by the adiabatic theorem [35]. In QA, the system starts in the ground state of the initial Hamiltonian H I and evolves according to [35]: to the final state, which is denoted by H C in Ising form (Eq. 1). QAOA applies the logic of QA to gate-based quantum computers. Here, the time evolution operator of the system is represented by an alternating application of quantum operators, which are constructed by either H M or H C and according parameters β, γ . The resulting trial states Ψ (β, γ ) for different parameter settings are measured, and the parameters are optimized classically to produce the ground state of H C [35]: An existent hybrid quantum-classical algorithm for community detection which implements QA or QAOA for sub-problem optimization is the Quantum Local Search (QLS) algorithm [33], which has also been implemented within a multi-level approach [35]. The algorithm starts with a random solution and iteratively populates subsets, which are optimized by QA or QAOA. The sub-problem is formulated by fixing the community assignment for all nodes which are not in the subset and encoding them as boundary conditions. The convergence criterion is defined by three iterations without any further improvement in modularity. For quantum annealing devices only, the concept of logical super-nodes has been introduced, which allows to handle the k-community detection problem on such devices [29]. The higher number of available qubits enables the use of one-hot encoding. This approach has been tested with the D-Wave 2000Q and the qbsolv software. However, the recently launched D-Wave Advantage and the hybrid solver for discrete quadratic models (refer to the appendix), which builds on the super-node logic, have not been tested for community detection so far. These technologies have been used in the first quantum annealing approach (QA1) in the experiments stated in Sect. 4. An alternative approach which utilizes quantum annealing has been suggested by Reittu et al. (2020) [30]. The algorithm is based on the Szemeredi's Regularity Lemma, which is defined for large bipartite graphs. After an initial bipartition of the given graph, iteratively the strongest communities (based on the connectivity) are detected and removed from the graph. In contrast to other algorithms, the underlying metric for optimization is not the modularity but rather the difference in energy density compared to a mean. The D-Wave 2000Q and qbsolv have been utilized for the experiments. An implementation of this approach represents our second quantum annealing method (QA2).

Methods for gate-based k-community detection
To the best of our knowledge, there is currently a lack of hybrid algorithms for the k-community detection problem, which can be run on gate-based devices. For the purpose of evaluating the potential of currently available quantum architectures, novel algorithms have been created, which are inspired by previous work [29,30,33].

Density-based community detection algorithm
The first gate-based algorithm (GB1) works similarly to the one proposed by Reittu et al. (2020) [30] as it iteratively finds the strongest communities within a given graph. However, GB1 is designed for gate-based devices rather than quantum annealing machines and does not bipartite the graph randomly. Therefore, the Szemeredi's Regularity Lemma which addresses large bipartite graphs cannot be taken as a mathematical foundation for this algorithm. However, for smaller graphs a random bipartition affects the community structure more likely and more severe. For this reason, which has also been tested experimentally, we decided to omit the initial bipartition of the graph. This experiments have been conducted for design purposes and are therefore not stated in the paper. Due to the higher number of available qubits in quantum annealing devices, the algorithm proposed by Reittu et al. (2020) [30] can directly solve subproblems (the identification of just two communities for a given set of nodes in the graph) via quantum annealing. However, for gate-model machines the use of a hybrid algorithm which can handle a larger number of vertices for these subproblems is necessary. We implemented QLS [33] for this task. Furthermore, to assure that all proposed algorithms optimize the same objective function, the modularity (Eq. 4) has been taken for this purpose rather than an energy density deviation from the mean as it is used in the Szemeredi's Regularity Lemma. The algorithm is outlined in Algorithm 1. store V as community

15: return communities
It is assumed that the maximum number of communities does not exceed √ n with n being the number of nodes in the graph [36]. The loop searches for the strongest community, with the modularity per node as the underlying metric. This criterion is not based on mathematical analytical reasoning, but rather on heuristics. After the strongest community has been detected, it is stored and the according nodes are deleted from the original graph before the procedure repeats for the remaining nodes. The algorithm stops if the graph does not contain vertices anymore. An alternative breaking scenario occurs in case there is no initial improvement possible within the inner loop (i.e., m < 0). It is assumed that the algorithm works best for graphs with heterogeneous community structure, because of the logic of iteratively detecting communities based on their connectivity.

Recursive-QLS community detection algorithm
The second gate-based algorithm (GB2) represents a recursive application of QLS. Here, the original system is separated into 2 x communities using the recursive_QLS function as it is outlined in Algorithm 2. In each recursion, the function adds an attribute to all individual nodes according to the binary community assignment. The sub-graphs detected in that way serve as the graph parameter in the subsequent recursion. After a defined number of recursions has been executed, the given attributes of a node encode its final community. In our approach, we define this upper boundary as the next higher integer after log 2 (k), where again k is given by √ n. Using GB2, the maximum modularity can then be found by a brute-force search in the space defined by the power set with the detected communities as its elements. Alternatively, one could look for the highest modularity in the set of community constellations of the respective recursions by iteratively skipping the last node attribute. Which alternative is appropriate depends on the existing knowledge concerning the topology and community structure of the graph. Although the scalability of the proposed algorithms is not within the scope of this paper, GB2 could be applied to larger graphs by considering the initially detected communities as nodes in a subsequent optimization iteration similarly like it happens within the Louvain algorithm [3]. Thereby, a considerable part of the limitations in the search space, which are induced by the recursive GB2, could be compensated.
However, the mentioned search space limitations suggest, that GB2 works best for a graph with 2 x communities. Furthermore, it is expected that GB2 is faster than GB1, because the number of nodes which have to be optimized in a binary manner reduces faster with each recursion of GB2 than it does for the iterations in GB1.

Experiments and results
The overall objective of the paper is to evaluate the current potential of gate-model and quantum annealing based devices for the k-community detection problem. The introduction of the novel hybrid algorithms for gate-based devices (Sect. 3) enables an initial comparative evaluation of the different architectures.
The conducted experiments are twofold. The first part considers the performance of all algorithms that have been described above on a real social network, referring to research question RQ2 and RQ3. As the hybrid solver for discrete quadratic models [26] is considered the most suitable for scaled up problems, the algorithm is further tested and compared with a classical state-of-the-art algorithm on four artificial test graphs in the second part. Therefore, research question RQ4 is answered within this scope. The subsequent chapters deal with the underlying methodology of the experiments, the obtained results and the discussion of those results.

Methodology
General procedure. In order to assess the performance of the algorithms described above, they have been applied to standardized graphs. The metrics of interest are -Time-to-solution: How long does it take the algorithm to find the solution? -Quality: What is the modularity of the obtained solution as it has been defined in Sect. 2.1. (Eq. 4)?
Every experiment has been conducted five times in order to be able to state an average, best and worst result for each constellation. It has been criticized in [12] that in almost any paper, where a new method for community detection is introduced, the testing consists in applying the method to a small set of simple benchmark graphs. However, within the scope of this paper we have to follow this tradition by evaluating the algorithms on one prominent real-world dataset or several artificial benchmark graphs, respectively. Further research on the scalability and specificity of the proposed algorithms may be the subject of future work. The general framework is implemented in Python 3.8 with NetworkX for network analysis operations. For statistical testing of the obtained results, the Mann-Whitney U test [2] has been used, which is equivalent [23] to the Wilcoxon ranksum test. This test allows comparison between two solution sets without the assumption of normal distribution. The significance level has been chosen to be 95% (α = 0, 05). The chosen classical state-of-the-art algorithm for community detection for benchmarking is the Louvain algorithm [3,12].
First part. Every method described above (QA1, QA2, GB1, GB2, Louvain) has been tested on the Zachary Karate Club Graph [37], which consists of 34 nodes and 78 edges. This graph has been extensively used to benchmark graph algorithms and is considered to be by far the most investigated system [12]. The various methods utilize different hardware and software. However, our framework is modular and can easily be extended to utilize other quantum computing architectures as they become available. For details concerning the used technologies, we kindly refer the interested reader to the appendix.
Within the first quantum annealing approach (QA1), the problem is solved by the D-Wave Hybrid Solver Service [26] with the D-Wave Advantage quantum annealer [24] as the underlying hardware. This hybrid solver allows to directly address discrete quadratic problems. Due to a high degree of automation, a parameter tuning like it has been conducted in [29] was not possible. The implementation of QA2 also runs on the D-Wave Advantage quantum annealer with the parameters set to the default values. Automatically minor embedding has been used, which is re-calculated each time a sampling method is called. The simulated annealing methods make use of the dwave-neal software tool. Therefore, the problem runs on servers of Amazon Web Services. This shall enhance the comparability of the obtained results as currently running quantum algorithms represent a form of online computation.
Concerning the gate-based algorithms, these utilize the Qiskit Aqua library, which provides an implementation of QAOA with the MinimumEigenOptimizer as a wrapper. Another implementation of QAOA is publicly available [17], but has not been used in the experiments. Communication with the hardware happened via the Qiskit IBM Quantum Provider. The problems have been sent to the IBM Melbourne quantum computer (15 qubits) with a QLS subset size of 12. The convergence criterion in QLS has been set to 3 iterations. To estimate the impact of the subset size on the number of required iterations, tests have been conducted with a subset size of 16 using simulated annealing. Hereby, one iteration is defined as one sub-problem optimization.
It has to be mentioned, that different definitions of the time-to-solution have been used. In QA1 and the Louvain algorithm, the overall time required to obtain a solution has been regarded, which is more meaningful for practical applications. Within QA2, GB1 and GB2, the time-to-solution is defined as the sum of all quantum processing (or simulated annealing) parts within the hybrid algorithm. Therefore, the queueing time is not considered in the metric, which makes it more representative. Furthermore, the biases of local computation differences are reduced. Additional information concerning timing issues of the utilized quantum systems are stated in the appendix. This mixed evaluation is justified by the overall objective of the paper, which is to assess the current potential of quantum technologies for the k-community detection problem in general, thus allowing to compare the different state-of-the-art of quantum annealing and gate-based methods.
Second Part. The second part extends the evaluation of the QA1. For this purpose, 12 test graphs of different size and density have been generated. These are the planted l-partition graph [9] and the LFR-benchmark graph [20], which are considered prominent artificial graphs for testing community detection algorithms [1,12]. The planted l-partition graph shows a homogeneous community structure, whereas the LFR-benchmark graph is heterogeneous in community size and connectivity [12]. Both types of graphs have been generated with 100, 246, 496, 747, 1000 and 1500 nodes, with parameters that ensure a rather well-defined community structure and stable degree (for further details please consult to the appendix).

Results
This section states the results of the experiments, which are going to be discussed in the subsequent chapter. All raw result data are publicly available [17]. The experimental results concerning the first part are stated in Table 2 for the average, best and worst performance values out of the 5 runs, based on the modularity. All time values are in milliseconds. The obtained results for simulated annealing are stated in brackets. Furthermore, the results concerning the impact of the subset size in QLS are stated in Table 3. Table 4 provides information concerning the statistical significance of the obtained modularity values yielded by the compared algorithms. All time values are considered to be significant. The modularities obtained by utilizing the IBMQ Melbourne or simulated annealing for sub-problem optimization show no significant difference for GB1 and GB2.
The experimental results concerning the second part are stated in Table 5 for the average, best and worst performance values, based on the modularity. Time values are given in milliseconds. Table 5 additionally states, whether the difference in the obtained modularity values can be considered as statistically significant.

Discussion of results
The discussion is structured according to the two parts of the experimental setup: the first one considering the performance on the Zachary Karate Club Graph only (RQ2, RQ3), and the second one extending the experiments for QA1 to artificially generated test graphs (RQ4). To our knowledge, the best modularity value for the Zachary Karate Club Graph is 0,4198 [3,6], resulting in 4 communities. The subsequent interpretation of the results requires to consider the following aspects: -Varying certain elements of the hybrid algorithms (e.g., different QAOA implementation, different subset size and convergence criterion in QLS, parameter tuning in QA2) may significantly alter the performance of the algorithms, although they have been set consciously. -The characteristics of the Zachary Karate Club Graph, with its 4 communities, fit the recursive nature of GB2. However, QA2 struggles with such small graphs due to the applicability of the Szemeredi's Regularity Lemma and the initial random bipartition of the network. -The Louvain algorithm is explicitly designed to solve the community detection problem especially for larger networks. GB1, GB2, QA1 and QA2 just need minor adoptions to the underlying optimization function to be more generally applicable.
Answering RQ2. The QA1 is able to reach the highest known modularity in all runs, but needs considerable time to do so. Due to the arguments mentioned above, the QA2 performs rather poor on the small Zachary Karate Club Graph. More interestingly, GB1 and GB2 both show no significant difference in the obtained modularities compared to the state-of-the-art classical Louvain algorithm. Although GB2 performs significantly slightly better than GB1 in this particular experiment, the later is considered the more versatile algorithm.
The values for the time-to-solution appear to vary notably between the utilized algorithms. A decrease in the time-to-solution for GB1 and GB2 could happen via a lower number of iterations per run. This in turn is indicated by the results to be possible with larger subset sizes. However, the downturn of larger sub-problems may be longer times for the solution per iteration. Which effect dominates in practice may be the subject of further studies. How different subset sizes may affect not only the number of iterations but also the obtained modularity and time-to-solution could be roughly extracted from the data provided on Github [17], but does not lie within the focus of this paper.
Lastly, it shall be mentioned that due to practical run-time reasons, the maximum number of iterations in the inner loop of GB1 has been set to 5. This number has sometimes been reached in our experiments, indicating that with more computation time even better modularity values may be possible.
Answering RQ3. Substituting QAOA within GB1 and GB2 with simulated annealing shows no significant differences in the obtained modularity values, which indicates a rather high solution quality of the IBMQ Melbourne concerning small problems. The values for the time-to-solution on the other hand vary notably with the use of simulated annealing.
For this reason, the proposed hybrid classical-quantum algorithms are considered to yield practical value only after the sub-problem optimization by QAOA exceeds simulated annealing methods, which heavily depends on future advances on the physical hardware level.
Answering RQ4. Concerning the obtained modularity values, it can be observed that for smaller graphs (e.g., PP100, PP246, LFR496) the QA1 and Louvain Algorithm (LA) yield equal values. This indicates that the global optimum may has been found, Fig. 1 Time-to-solution against number of nodes for the QA1 or both get easily trapped in the same local minimum. For graphs of up to 747 nodes, the QA1 yields equal results for every run which are better or worse than the ones of the LA and are probably caused by same partitions of the graph. The obtained results for larger graphs show a higher variance for both algorithms which may be caused by the according larger search spaces. This may also be the reason for the statistical differences when it comes to larger problem instances. What could also be noticed is a trend for better performance of the QA1 for more heterogeneous graphs (LFR-graphs). This may be caused by a potentially larger spectral gap between the different community assignments which in turn would be favorable for quantum annealing. Concerning the obtained time-to-solution values, the QA1 scales linearly or even slightly better as it is shown in Fig. 1, whereas the LA appears to run in time O(n*logn) [19]. Figure 1 shows that there is almost no difference in the obtained values for PP and LFR graphs. This may be caused by the hybrid solver framework of D-Wave which unfortunately does not provide transparent analysis of the conducted steps. Looking at the time values in Table 5 clearly shows the longer, but more robust, running times of QA1.
Overall, it was not possible to identify an remarkable increase in solution quality or time-to-solution with the QA1 compared to a state-of-the-art heuristic classical solver. However, as [25] claims accelerated time-to-solutions for very large problems, it would be interesting to extend the evaluation to graphs of bigger sizes.
But not only the graph size and density shall be considered. The obtained results show that there are significant performance differences which arise only due to the community structure of the graph, which is defined by its homogeneity, average degree, ratio of intra-and inter-community connectivity, etc. Therefore, as criticized in [12], the specificity of the algorithms for given problems has to be examined without restrictions to size and density.
Finally, it should be mentioned that both the D-Wave Advantage and the hybrid solver for DQM where utilized in their first version, suggesting space for near-term efficiency improvements.

Threats to validity
Although already partially mentioned in the previous discussions, this section provides a structured review of the threads to validity following the scheme of [31].

Construct validity.
To assess the current potential of quantum computing for the k-community detection problem, existing and novel algorithms have been utilized. However, varying parameters in the hybrid algorithms or optimizing pre-and postprocessing of each quantum query [21] could affect the obtained results. These effects are not within the scope of this work, because hybrid applications for practical usage require automatized parameter settings. Therefore, the automatic parameter setting by the vendors has been used or a conscious setting of the given parameters has been conducted (e.g., a subset size of 12 to account for ancillary qubits [21]).

Internal validity.
Concerning the obtained modularity results of the substitution with simulated annealing, we regard the quality of the IBMQ Melbourne as the prevailing cause. However, there is still the possibility of leveling of poor results by the hybrid algorithm. As the research question concerns only the affect within the hybrid algorithm, the quality of the QAOA results has not been further investigated.
External validity. The proposed hybrid algorithms should be considered just as prototypes of possible quantum computing approaches for tackling the k-community detection problem. The mentioned specificity and dependence on the given problem, the parameter setting, as well as the underlying quantum parts make generalizing a difficult endeavor. In this sense, QAOA and quantum annealing are still to be considered in an early stage where their characteristics are being figured out currently (e.g., [38], [22]) and improvements are made on a regular basis (e.g., [39], [7]). For this reasons, we expect the algorithms to show similar performance when applied to similar problem instances as those examined in this work. However, we cannot state further generalizations as a sound sensitivity analysis is not within the scope of this paper, but may be a subject of future work. Furthermore, in the first part of this evaluation, no statements concerning the scaling of the proposed algorithms are made. Accounting for the criticism in [12], we stated the graph features carefully and varied certain parameters only while keeping others stable to ensure a higher degree of causality. Specific details are stated in previous sections and in the appendix.

Reliability.
Although dealing with heuristic algorithms, which are stochastic in nature, we specified the used technologies and methodology in detail and provide all code and raw data on Github [17] for reproducibility. In order to be able to state statistically significant results, the Wilcoxon ranksum test has been applied.

Conclusion
In this paper, we have evaluated the potential of current NISQ devices for the k-community detection problem. Therefore, we have proposed novel hybrid algo- rithms for gate-model devices and compared their performance to existing quantum annealing-based approaches and a state-of-the-art classical heuristic solver. We ran our experiments on the 15 qubit IBMQ Melbourne and the D-Wave Advantage devices. Furthermore, the quantum processing parts have been substituted with simulated annealing to obtain information concerning the impact of quantum computing within the hybrid algorithms. The obtained answers to the given research questions are summarized in Table 6.
Considering the modularity obtained with the various methods on the Zachary Karate Club Graph (RQ2), the QA1 which utilizes the D-Wave hybrid solver for discrete quadratic models performs best. GB1 and GB2 show no significant difference to the classical benchmark method (Louvain algorithm). The substitution with simulated annealing (RQ3) does not yield any significant difference in modularity, whereas the time-to-solution is notably decreased.
Utilizing the hybrid solver for discrete quadratic models provided by D-Wave, we were able to obtain modularity values similar to those of the Louvain algorithm, but got much longer time-to-solution values (RQ4). Furthermore, the results show that not only the graph size and density should be considered in the evaluation due to the significant impact of other factors which are related to the underlying community structure. These may be highly specific to each utilized algorithm.
Overall, quantum computing for the k-community detection problem has been figured out to yield good modularity values for small graphs, but still the computation times are too high to be of practical relevance. Given the current and near-term hardware limitations, we consider versatile and modularizable hybrid quantum classical algorithms, like the ones outlined, to be crucial for proceeding toward practical usage of NISQ devices, and therefore, for justification of quantum computing in general. As the potential of available NISQ devices increases, we are optimistic that similar methods can lead to a broad utilization of quantum computing to a variety of real-world applications.
Future Work: We are currently experimenting with quantum algorithms other than QAOA, such as the Grover Adaptive Search [15], in our proposed hybrid algorithms. Furthermore, we are working on a concept, how to model the use of these algorithms according to Model Driven Software Engineering principles [5]. In this sense, we will investigate how to reuse existing algorithms for a particular problem, but also how to model the hybrid workflows of solving combinatorial optimization problems on NISQ devices. The scalability and specificity of the proposed algorithms may be an additional subject of further studies.
Funding Open access funding provided by Johannes Kepler University Linz.
Availability of data and material All raw data are publicly available on Github [17].
Code availability All source code is publicly available on Github [17]. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Appendix
This section provides more details concerning the hardware and software used throughout the experiments as well as timing information concerning the utilized quantum systems. Furthermore, information about the generated benchmark graphs is given. The reason for choosing 5 times as the number of repetitions for each constellation is twofold. First, one run on the IBM hardware needs an effective time of approx. one day. Second, this number allowed the evaluation utilizing D-Wave technology without the necessity to acquire extensive computation time.

D-Wave systems:
For QA1, the Hybrid Solver Service provided by D-Wave has been utilized, which allows to directly address discrete quadratic models (DQM) [26]. The hybrid solvers implement state-of-the-art classical algorithms together with intelligent allocation of the quantum processing unit. This high degree of automation comes with a lack of adjustable parameters and transparency. The hybrid DQM solver version 1 can read discrete problems with up to a maximum of 2 billion total input weights [26]. Like with the other hybrid solvers offered by D-Wave, queries can be sent to the Advantage quantum processing unit. This quantum device has been launched in September 2020 and contains 5000 qubits, which is about 2.5 times more than in its predecessor, the D-Wave 2000Q. Another important difference lies in the connectivity enhancing Pegasus typology of the device, which comes with 15 couplers per qubit instead of 6 [24]. The Advantage-System 1.1 has been used throughout this project. The time per instance sent to the D-Wave Advantage within QA2 is defined as the QPU access time plus an post-processing overhead time, where the QPU access time consists of the following [35]. qpu_access_time = qpu_ pr ogramming_time +N * (annealing_time + delay_time + readout_time) The first is a one-time initialization step to program the QPU once per call. N denotes the number of samples which linearly impacts the QPU sampling time. The adjustable parameters for the experiments have been set to the default values according to D-Wave Hybrid 0.6.1 Documentation (N = 100, annealing_time = 20μs). Adjustment of these parameters may lead to significant changes in the overall performance of the QA2 but has not been studied within this project.

IBM systems:
The Qiskit library is an open-source framework which allows to work with IBM quantum computers 2 . For the experiments, Qiskit 0.23.2 has been used. Within Qiskit, the Qiskit Aqua software tool represents the element of the library for building algorithms and applications such as QAOA. The IBM Melbourne quantum computer consists of 15 qubits and reaches a quantum volume of 8. It therefore cannot be regarded a stateof-the-art quantum computer (e.g., IBM claimed to have reached a quantum volume of 64 with a 27 qubits system in August 2020 3 ). However, it represents the most powerful device which is publicly available. Version 2.3.4 has been used throughout this project. The time-to-solution of GB1 and GB2 heavily depends on the parameters of the QLS algorithm. Varying the size of the subsets and the convergence criterion significantly impacts the number of iterations and therefore should have an effect on the time-to-solution metric. However, smaller subsets may also lead to faster results per iteration on the quantum computer. Furthermore, the implementation using the MinimumEigenOptimizer creates multiple equal jobs for one optimization problem with 1024 shots each. An alternative implementation like the one provided on Github [17] may be more efficient in that sense. A further possibility of improving the QAOA efficiency is via tensor-network based approaches which allow classical training of certain QAOA instances [34] . In this project, only the running time of the instances sent to the IBM device has been considered. The queuing, validation, and creation times have been omitted.
Artificially generated benchmark graphs: The planted l-partition model partitions a graph with n = g * l nodes into l groups consisting of g vertices each. The nodes within one group are linked with probability p in , whereas the nodes of different groups are linked with probability p out . Therefore, the average degree of a node can be calculated via k = p in * (g−1)+ p out * g * (l−1) = z in + z out with z in = p in (g − 1) and z out = p out * g * (l − 1). If p in > p out , the intra-group edge density exceeds the inter-group edge density and the graph shows a community structure [12]. For the graphs in this paper the following parameters have been used to ensure a stable ratio of p in p out and a relatively stable average degree: -PP100: l = 5, g = 20, p in = 0.8, p out = 0.16 → p in = 5 * p out , z in = 15.2, z out = 12.8, k = 28 -PP246: l = 6, g = 41, p in = 0.3, p out = 0.06 → p in = 5 * p out , z in = 12, z out = 12.3, k = 24.3 -PP496: l = 8, g = 62, p in = 0.18, p out = 0.036 → p in = 5 * p out , z in = 10.98, z out = 15.62, k = 26.6 -PP747: l = 9, g = 83, p in = 0.125, p out = 0.025 → p in = 5 * p out , z in = 10.25, z out = 16.6, k = 26.85 -PP1000: l = 20, g = 50, p in = 0.1, p out = 0.02 → p in = 5 * p out , z in = 4.9, z out = 19, k = 23.9 -PP1500: l = 15, g = 100, p in = 0.075, p out = 0.015 → p in = 5 * p out , z in = 7.425, z out = 21, k = 28.425 The LFR-benchmark graph is more heterogeneous than the planted l-partition graph, assuming that the distributions of degree and community size follow power laws, with exponents τ 1 and τ 2 . The mixing parameter μ (0 ≤ μ ≤ 1) denotes the fraction of a node's edges which it shares with nodes of other communities [12]. The parameter values for typical networks are reported [20] to be 2 ≤ τ 1 ≤ 3 and 1 ≤ τ 2 ≤ 2. To ensure similar properties compared to the planted l-partition graph, a parameter fit has been conducted. The parameters used for the experiments are: