Open
Description
What is the expected enhancement?
Something that came up in the review on Qiskit/qiskit#7740 is that it would be good for retworkx to have a function to find the densest subgraph in a graph. To start we can just reuse the algorithm from the DenseLayout
pass which just performs a BFS list from every node in the graph (in parallel) and takes the first n
nodes from that and applies the weights and picks the most connected one with the best score from the weights. I'm not familiar with the literature on this problem space, but if there is a better algorithm that offers a faster or more complete solution we can look at implementing that too.