Large-scale portfolio optimization using Pauli correlation encoding Authors: Vicente P. Soloviev, Michal Krompiec Published: 2026 ABSTRACT Portfolio optimization is a cornerstone of financial decision-making, traditionally relying on classical algorithms to balance risk and return. Recent advances in quantum computing offer a promising alternative, leveraging quantum algorithms to efficiently explore complex solution spaces and potentially outperform classical methods in high-dimensional settings. However, conventional quantum approaches typically assume a one-to-one correspondence between qubits and variables (e.g. financial assets), which severely limits the applicability of gate-based quantum systems due to current hardware constraints. As a result, only quantum annealing-like methods have been used in realistic scenarios. In this work, we show how a gate-based variational quantum algorithm can be applied to a real-world portfolio optimization problem by assigning multiple variables per qubit, using the Pauli Correlation Encoding algorithm. Specifically, we address a problem involving over 250 variables, where the market graph representing a real stock market is iteratively partitioned into sub-portfolios of highly correlated assets. A classical postprocessing step is run to build a reduced, optimized assets portfolio. This approach enables improved scalability compared to traditional variational methods and opens new possibilities for quantum-enhanced financial applications. Introduction Portfolio optimization has become a trending problem in financial decision-making, which involves optimal allocation of capital among a set of financial assets to achieve specific investment objectives. It usually consists of maximizing expected return while minimizing the risk1. However, as real-world constraints and the dimensionality of financial markets increase, classical optimization approaches often encounter computational bottlenecks due to the complexity of the problem. Recent advances in quantum computing have opened new avenues for addressing such combinatorial optimization challenges2. Recent gate-based approaches for portfolio optimization include Quantum Approximate Optimization Algorithm (QAOA)3–7 and Variational Quantum Eigensolver8–10. However, the main limitation of these approaches is the scalability to real use cases. Specifically, the number of qubits required (n) increases linearly with the number of assets (m), i.e., \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(n)$$\end{document}, which quickly exceeds the capacity of current quantum devices as m grows. To mitigate this, recent research has explored circuit cutting, which partition large quantum circuits into smaller, more manageable subcircuits that can be executed independently and recombined classically11. Nevertheless, even with these advancements, the largest portfolio optimization problems addressed to date remain limited to fewer than m=100 assets, underscoring the ongoing challenge of scaling gate-based quantum algorithms for practical financial optimization tasks. In addition to gate-based quantum algorithms, alternative approaches such as quantum annealing and digital annealer12,13 have been explored for portfolio optimization, particularly for large-scale and combinatorial instances. They both utilize specialized hardware or algorithms to mimic the annealing process and solve similar Quadratic Unconstrained Binary Optimization (QUBO) formulations at scale. These methods have demonstrated the ability to handle portfolio problems involving hundreds or even thousands of assets, offering a level of scalability that currently surpasses gate-based quantum devices. However, despite their practical utility, neither quantum annealing nor digital annealing has yet exhibited a clear quantum advantage over state-of-the-art classical optimization algorithms7. In this paper we use a recently developed qubit encoding14 in which each of the qubits in the quantum system encodes more than one variable of the optimization problem. By using this encoding in combination with a variational approach we drastically reduce the required number of qubits, and solve a portfolio optimization problem over a market graph with more than m=250 variables (number of stock assets). As a result, different clusters of redundant assets are identified, where a classical postprocessing will identify a new reduced portfolio construction based in the historical returns. We show an extensive benchmarking against QAOA (for small instances) and a classical optimizer (for large instances), following an iterative bipartition strategy. The article is structured as follows: "Background" section describes the main concepts regarding portfolio optimization and the qubit encoding used in the approach; "Method and results" section describes the followed methodology and results found; "Conclusions" section rounds the paper off with some further conclusions and future research lines. Background Portfolio optimization Portfolio optimization is a key component of contemporary quantitative finance, which focuses on allocating capital across a group of assets in order to strike the best possible balance between risk and projected return. Markowitz1 developed the traditional mean-variance paradigm, which represents a portfolio’s expected return as the weighted sum of the returns of its individual assets:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mu _p = \sum _{i=1}^N w_i \mu _i \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _p$$\end{document} is the expected portfolio return, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w_i$$\end{document} is the weight of asset i in the portfolio, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _i$$\end{document} is the expected return of asset i, and N is the total number of assets. Risk is typically quantified by the portfolio variance, which incorporates both the variances of individual assets and their pairwise correlations:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \sigma _p^2 = \sum _{i=1}^N \sum _{j=1}^N w_i w_j \sigma _{ij} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{ij}$$\end{document} is the covariance between assets i and j. The covariance can be further expressed in terms of the correlation coefficient \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\rho _{ij}$$\end{document} and standard deviations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _i, \sigma _j$$\end{document}:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \sigma _{ij} = \rho _{ij} \sigma _i \sigma _j \end{aligned}$$\end{document}The correlation coefficient \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\rho _{ij}$$\end{document} measures the linear relationship between the returns of assets i and j:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \rho _{ij} = \frac{\text {Cov}(r_i, r_j)}{\sigma _i \sigma _j} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_i$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_j$$\end{document} are the returns of assets i and j, respectively. In addition to the mean-variance framework, a widely used metric for evaluating portfolio performance is the Sharpe ratio, introduced by Sharpe (1966). The Sharpe ratio measures the risk-adjusted return of a portfolio by comparing its excess return over a risk-free rate to its standard deviation:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Sharpe Ratio} = \frac{\mu _p - r_f}{\sigma _p} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _p$$\end{document} is the expected portfolio return, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_f$$\end{document} is the risk-free rate, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _p$$\end{document} is the standard deviation of portfolio returns. A higher Sharpe ratio indicates a more favorable risk-return trade-off, making it a key criterion in portfolio selection and optimization. Unlike raw return metrics, the Sharpe ratio accounts for volatility, thus enabling more robust comparisons across strategies with differing risk profiles. This metric is particularly relevant in the context of this study, where multiple optimization strategies are benchmarked not only by their absolute returns but also by their ability to manage risk effectively. In subsequent sections, we use the Sharpe ratio to evaluate the performance of portfolios. Several real-world limitations, including minimum/maximum position sizes, cardinality constraints, and transaction costs, affect portfolio optimization in practice. As a result, the problem is frequently non-convex and computationally difficult. In the last decades, several approaches directly address the graph representation of the stock market to design efficient portfolios. Thus, a market graph is constructed by representing the financial assets as nodes in the graph and the conditional relationships, such as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\rho _{ij}$$\end{document} or \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{ij}$$\end{document}, as edges. Fig. 1Number of qubits, and layers as a function of the number of variables in the problem to be solved. Number of qubits, and layers as a function of the number of variables in the problem to be solved. Pauli correlation encoding Pauli Correlation Encoding (PCE)14 introduces a novel approach for embedding more than one optimization variable per qubit in the system. Specifically, the number of binary variables (m) using n qubits are encoded as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(n^k)$$\end{document}, where k is the order chosen by the user. This encoding is achieved by using a sign function over the Pauli-matrix correlations across multiple qubits (k). Thus, each binary variable is defined as:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} x_i = \text {sgn}({\langle {\Pi _{i}}\rangle }) \hspace{2em} \forall i \in m, \end{aligned}$$\end{document}where sgn is a sign function, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\langle {\Pi _{i}}\rangle } = {\langle {\Psi }|} \Pi _{i} {|{\Psi }\rangle }$$\end{document} is the expectation value of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi _{i}$$\end{document}, over a quantum system Ψ. The definition of the Pauli strings (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi _{i}$$\end{document}) depends on the order (k) chosen by the user. The seminal paper suggests that a quadratic order will return better results when m is small, and cubic order will outperform the former for an increasing number of variables. Then, we define \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi ^k = \{\Pi _1^k, \dots , \Pi _m^k\}$$\end{document} where each \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi _i^k$$\end{document} is a permutation of either \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X^k \otimes I^{n-k}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y^k \otimes I^{n-k}$$\end{document} or \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Z^k \otimes I^{n-k}$$\end{document}, which are mutually commuting. Fig. 2HEA built with a linear entangling structure and CZ gates, used in PCE strategy approach where m = 10, n=4, k=2 and p=2. HEA built with a linear entangling structure and CZ gates, used in PCE strategy approach where m = 10, n=4, k=2 and p=2. By using this encoding, the number of optimization variables improves upon the one-hot-encoding used in traditional approaches such as QAOA (equivalent to k=1). Figure 1(left) shows the scaling of n as a function of m and k where k=3 shows an improvement for larger m. Another differentiating feature of this approach against other quantum variational approaches is that the quantum circuit used during the runtime is not dependent on the target problem; hence, the ansatz’s ability to generate rich correlations and explore diverse regions of the Hilbert space becomes the principal requirement. Measures such as expressibility and entangling capability15 have been proposed to quantify this capacity, with more expressive and trainable16 circuits accessing a larger portion of the unitary space and better approximating Haar distributions. In this paper, we use the Hardware Efficient Ansatz17 circuit, composed of alternating layers of single-qubit rotations and entangling gates. Figure 2 shows a visual representation of the HEA where m = 10, n=4, k=2 where we define the number of layers (p) as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=\lfloor m/n \rfloor = 2$$\end{document} (Fig. 1(right)). HEA is known to exhibit such high expressibility while maintaining shallow, hardware-compatible depths, making them suitable for near-term hybrid algorithms. Additionally, balancing expressivity with trainability is critical in variational approaches, and HEA offers this trade-off effectively by providing sufficient expressive capacity without excessive depth growth18,19. The variational approach consists in optimizing the parameters according to a cost function that reflect the optimization task to be solved. The seminal PCE paper14 proposes the following function:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mathcal {L} = \sum _{(i, j) \in E} w_{ij} \; \tanh {(\alpha {\langle {\Pi _{i}}\rangle })} \; \tanh {(\alpha {\langle {\Pi _{j}}\rangle })} + \mathcal {L}^{reg}, \end{aligned}$$\end{document}where E is the number of edges in the original graph, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {L}^{reg}$$\end{document} is a regularization term defined as8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} L^{reg}=\beta \left[ \frac{1}{m}\sum _{i}^{n}{\tanh \left( \alpha \left\langle \Pi _i\right\rangle \right) ^2}\right] ^2, \end{aligned}$$\end{document}where β is a parameter that regulates the influence of the regularization term. Following the seminal paper14, we define it as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta = w(G)/4 + w(T_{min})/8$$\end{document} where w(G) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w(T_{min})$$\end{document} are the weights of the graph and of its minimum spanning tree, respectively. Note that, the parameter α rescales the expectation values to avoid restricting the \tanh function to its nearly linear regime which would difficult its training. By choosing α > 1, the \tanh enters its non-linear regime, improving optimization while retaining the relaxation of the binary problem. Following the seminal paper, we define \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = n^{\lfloor k/2 \rfloor }$$\end{document}. Method and results Fig. 3Market graph with m nodes where nodes represent stock assets. Market graph with m nodes where nodes represent stock assets. Table 1Market graph characteristics across different graph sizes.# Nodes# EdgesDensityAverage degreeClustering coefficient10390.8677.800.95201370.72113.70.92302300.52815.30.70507140.56028.00.7710031540.63063.080.8015076060.680101.40.82200141630.710141.630.85250209480.660166.910.83 Table 1Market graph characteristics across different graph sizes.# Nodes# EdgesDensityAverage degreeClustering coefficient10390.8677.800.95201370.72113.70.92302300.52815.30.70507140.56028.00.7710031540.63063.080.8015076060.680101.40.82200141630.710141.630.85250209480.660166.910.83 Market graph characteristics across different graph sizes. Market graph representation As explained in "Portfolio optimization" section, a market graph is a representation of a real stock market. In this paper, we work with real data from the S&P 500 stock market1 containing 5 years of data. Since we perform the benchmark for various sizes of the portfolio, the experiment with m assets will use the first m columns of the dataset. Thus, the results for bigger m will partially overlap with the results for smaller subsets of assets. The market graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} assigns each asset to a node and contains an edge between nodes i and j only if their pairwise Pearson correlation (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\rho _{ij}$$\end{document}) is above a certain threshold λ, and no edge otherwise. It has been widely studied that an all-to-all graph connectivity in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} does not represent the real behavior of the stock market20,21. Thus,9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} w_{ij} = {\left\{ \begin{array}{ll} 1 - |\rho _{ij}| & \text {if} |\rho _{ij}| > \lambda \\ \emptyset & \text {otherwise} \end{array}\right. }, \end{aligned}$$\end{document}where |· | is the absolute value and \emptyset means that no edge is drawn. Fig. 4Iterative partition of the market graph (a) with m=5 nodes, into two (b) and three (c) subgraphs by performing cuts over the representation. Cuts are represented with red dashed lines, and same color nodes represent correlated assets within the same cluster. Iterative partition of the market graph (a) with m=5 nodes, into two (b) and three (c) subgraphs by performing cuts over the representation. Cuts are represented with red dashed lines, and same color nodes represent correlated assets within the same cluster. The optimal choice of cuts over \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document}, will find the optimal portfolio for the desired strategy of investment. This graph-based approach has been traditionally exploited for portfolio diversification from the classical computation perspective for multiple purposes such as dynamic optimization22, risk analysis23 and community detection24; but also from the quantum computing perspective for portfolio diversification11,25. In this paper, our experiments show results for graphs sizes of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m \in \{10, 20, 30, 50, 100, 150, 200, 250\}.$$\end{document} Figure 3 shows the graph representations for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m \in \{10, 20, 30\}$$\end{document} and Table 1 summarizes the structural characteristics of market graphs for the interest of visualization. For each graph size, the number of edges, graph density, average node degree, and average clustering coefficient are shown. These metrics provide insight into the connectivity and local structure of the graphs. As the number of nodes increases, both the average degree and the clustering coefficient tend to grow, indicating a denser and more interconnected topology. The density remains relatively stable across scales. While some works7,26 state the efficiency of classical solvers for sparse graphs, our study focuses on dense market graphs (see as shown in table), where classical cut-finding becomes computationally demanding and quantum methods may offer practical advantages. Bipartition strategy Building upon the market graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} introduced in the previous section, we propose a recursive bipartitioning methodology aimed at decomposing the graph into a predefined number of subgraphs. The core principle of this approach is to iteratively split \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} into two disjoint subsets by optimizing a cost function that reflects the structural dependencies among assets. Specifically, the algorithm seeks to maximize the number of cuts performed, thereby ensuring that each resulting subgraphs comprises assets that are highly correlated within each subgraph. To formalize this, we define the following cut function:10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Cut}(\mathcal {G}, \boldsymbol{x}) = \sum _{v_i, v_j \in E} w_{ij}x_i(1 - x_j), \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{x} \in \{0,1\}^m$$\end{document} is a binary vector of length \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m = |V(\mathcal {G})|$$\end{document}. Each entry \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i$$\end{document} denotes the assignment of asset i to one of the two subgraphs: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i = 0$$\end{document} if asset i belongs to subgraph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}_0$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i = 1$$\end{document} otherwise. The edge weights \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w_{ij}$$\end{document} correspond directly to those defined for the market graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} in Eq. 9, reflecting the pairwise correlation-based relationships between connected assets i and j. In our framework, the binary variables \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i$$\end{document} are not obtained from single-qubit measurements. Instead, each variable is defined as the sign of a Pauli correlation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\langle \Pi _i \rangle$$\end{document}, as introduced in "Pauli correlation encoding" section. To illustrate the mapping, consider a system with n=3 qubits and order k=2. In this setting, up to m=9 variables can be encoded through the mutually commuting Pauli strings\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \Pi ^{(2)} = \{XXI,\; XIX,\; IXX,\; YYI,\; YIY,\; IYY,ZZI,\; ZIZ,\; IZZ \}. \end{aligned}$$\end{document}After preparing the variational state \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${|{\Psi }\rangle }$$\end{document}, the expectation values are computed as\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \langle \Pi _i \rangle = {\langle {\Psi }|} \Pi _i {|{\Psi }\rangle }, \quad i=1,\dots ,9. \end{aligned}$$\end{document}We collect these expectation values into the vector\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \boldsymbol{\langle \Pi \rangle } = \begin{bmatrix} \langle \Pi _1 \rangle \\ \langle \Pi _2 \rangle \\ \vdots \\ \langle \Pi _9 \rangle \end{bmatrix} = \begin{bmatrix} {\langle {\Psi }|}XXI{|{\Psi }\rangle } \\ {\langle {\Psi }|}XIX{|{\Psi }\rangle } \\ \vdots \\ {\langle {\Psi }|}IZZ{|{\Psi }\rangle } \end{bmatrix}. \end{aligned}$$\end{document}The binary variables are then obtained component-wise as\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} x_i = \textrm{sgn}\!\left( \langle \Pi _i \rangle \right) , \quad i=1,\dots ,9, \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i \in \{0, 1\}$$\end{document}. The binary vector \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{x} = [x_1, \dots , x_9]$$\end{document} is obtained as\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} x_1&= \textrm{sgn}({\langle {\Psi }|}XXI{|{\Psi }\rangle }), \\ x_2&= \textrm{sgn}({\langle {\Psi }|}XIX{|{\Psi }\rangle }), \\&\;\vdots \\ x_9&= \textrm{sgn}({\langle {\Psi }|}IZZ{|{\Psi }\rangle }). \end{aligned}$$\end{document}The resulting binary vector \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{x}$$\end{document}, obtained from the sign of the Pauli correlation expectations, is then substituted into Eq. 10 to evaluate the cut value associated with the corresponding partition. By maximizing it, the algorithm encourages the separation of weakly connected components while preserving strong intra-subgraph connectivity. This results in partitions that are internally cohesive and externally sparse, which is a desirable outcome for our approach. Iterative bipartition strategy Algorithm 1 describes the proposed strategy, where by performing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{splits}$$\end{document} splits, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{splits} + 1$$\end{document} subgraphs are generated. The algorithm iteratively calls \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\texttt {bipartition}(G_{\text {aux}}, \texttt {measurement}, k)$$\end{document} (line 22) over graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_{\text {aux}}$$\end{document} from which two subsets of assets are returned. The algorithm iteratively splits the subgraphs until the convergence criteria is met (line 19). This ensures that highly correlated assets are grouped while uncorrelated ones are separated. Additionally, since only edges above a certain correlation threshold (λ in Eq. 9) are considered, even in smaller subgraphs the level of correlation among remaining assets may vary, making it still meaningful bipartite at each step. In our experiments we use the statevector simulation as the measurement in the approach, although it is generalizable to other types of shot-based measurements, as suggested in14 for PCE approach. The function bipartition (line 3) executes the PCE approach ("Pauli correlation encoding" section) to solve the loss function (Eq. 10) and maps the resultant binary string into two subgraphs. This function internally computes the required number of qubits (line 5) and corresponding number of layers (line 6) for the HEA circuit (line 7). A classical optimizer is run to optimally tune the parameters (line 14). In this paper, the COBYLA optimizer27 was used. Algorithm 1Generate n portfolio partitions via PCE bipartitioning Generate n portfolio partitions via PCE bipartitioning Figure 4 shows a toy example of the partition approach where a real market graph with m=5 nodes (a) is split \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{splits} = 1$$\end{document} (b), and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{splits} = 2$$\end{document} (c) times, respectively. Same color nodes represent highly correlated nodes within the same cluster of assets. The outcome of Algorithm 1 is a collection of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{\text {splits}} + 1$$\end{document} disjoint clusters, each comprising a subset of highly correlated assets. These clusters, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{L_1, L_2, \dots , L_{n_{\text {splits}} + 1}\}$$\end{document}, serve as the foundation for constructing a diversified portfolio. To ensure that the portfolio captures the most promising investment opportunities within each cluster, we select a single representative asset from each group according to its historical performance. Fig. 5Aggregate of stock values in S&P 500 stock market along time. Blue and red parts represent training (80%) and testing (20%) fractions of the dataframe, respectively. Aggregate of stock values in S&P 500 stock market along time. Blue and red parts represent training (80%) and testing (20%) fractions of the dataframe, respectively. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i = [L_i^1, \dots , L_i^{|L_i|}]$$\end{document} denote the set of assets in cluster \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$|L_i|$$\end{document} is the cardinality of the cluster. For each asset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i^j$$\end{document} in the cluster, we compute its return \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _i^j$$\end{document} using a predefined return function (see Eq. 1). This yields a return vector:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\mu }_i = [\mu _i^1, \dots , \mu _i^{|L_i|}],$$\end{document}which encapsulates the performance of all assets within cluster \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document}. The representative asset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_i$$\end{document} for cluster \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document} is then selected as:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_i = \arg \max _{j \in \{1, \dots , |L_i|\}} \mu _i^j,$$\end{document}i.e., the asset with the highest return within its respective cluster. This selection criterion ensures that the final portfolio is composed of top-performing assets from structurally coherent groups, thereby balancing diversification with return optimization. We aware here that other approaches have been used in the literature such as analyzing the sign of the pairwise correlation (4) among the assets within the same cluster \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document}28,29. The resulting portfolio, composed of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r} = \{r_1, r_2, \dots , r_{n_{\text {splits}} + 1}\}$$\end{document}, is expected to exhibit reduced internal redundancy due to the high intra-cluster correlation and enhanced overall performance due to the return-based selection mechanism. Results This section presents the experimental results obtained by applying the methodology outlined in "Bipartition strategy" section to the problem instances described in "Market graph representation" section. The dataset was partitioned into training and testing subsets, comprising 80% and 20% of the original data, respectively. The partitioning strategy was applied to the training set to identify a subset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r}$$\end{document} of representative assets. The performance of the selected assets was subsequently evaluated on the testing set. Figure 5 illustrates the temporal evolution of the aggregate value of all assets in the dataset, providing an overview of the dataset’s dynamics over time, where blue and red parts represent the training and test fractions, respectively. Fig. 6Hierarchical clustering dendrogram for m=50 assets. The height indicates distances between clusters at each merge. For clarity, individual assets have been anonymized and represented by numerical identifiers. Hierarchical clustering dendrogram for m=50 assets. The height indicates distances between clusters at each merge. For clarity, individual assets have been anonymized and represented by numerical identifiers. As described previously, the iterative partitioning procedure recursively divides a subset of assets into two distinct subsets at each iteration. The dendrogram presented in Fig. 6 visually captures the hierarchical structure resulting from the algorithm outlined in Algorithm 1. Each leaf node in the dendrogram corresponds to a group of highly correlated assets, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document}, for the case where m = 50. For clarity, individual assets have been anonymized and represented by numerical identifiers. Table 2Gate counts for QAOA (built with CZ) with different number of layers (p) and PCE with different orders (k) across graph sizes.# Nodes# EdgesQAOA (p=1)QAOA (p=2)PCE (k=2)PCE (k=3)10395910825252013717733461613023029055091915071481415781481451003154335466082982951507606790615662430433200141631456328926586595250209482144842646715730 Table 2Gate counts for QAOA (built with CZ) with different number of layers (p) and PCE with different orders (k) across graph sizes.# Nodes# EdgesQAOA (p=1)QAOA (p=2)PCE (k=2)PCE (k=3)10395910825252013717733461613023029055091915071481415781481451003154335466082982951507606790615662430433200141631456328926586595250209482144842646715730 Gate counts for QAOA (built with CZ) with different number of layers (p) and PCE with different orders (k) across graph sizes. The vertical axis of the dendrogram reflects the depth of the recursive partitioning process, effectively mapping the sequence of iterations. Notably, the dendrogram reveals that the cardinality of the leaf-level groups \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_i$$\end{document} remains relatively balanced across the entire set, a structural property that persists consistently across all tested values of m. This observation suggests that the partitioning algorithm tends to produce evenly sized clusters. In this study, we assess the performance of our proposed method across different problem instances, with sizes ranging from m = 10 to m = 250, as summarized in Table 1. To benchmark our approach against established optimization techniques, we consider two representative algorithms: QAOA, serving as a quantum method, and Estimation of Distribution Algorithms (EDAs), representing classical heuristics. QAOA is configured with p = 5 layers and applied exclusively to the smallest instance (m = 10), where the use of one-hot encoding within the partitioning framework remains computationally feasible. For larger instances (m \ge 10), EDAs are employed due to their scalability and adaptability to high-dimensional combinatorial spaces. To ensure fair comparison across varying problem sizes, the number of recursive splits in the partitioning process is tuned according to instance size: specifically, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_{\text {splits}} = \{2, 4, 6, 9\}$$\end{document} for m < 100, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_{\text {splits}} = (m/10) - 1$$\end{document} for m \ge 100. The PCE order is set to k=3 to keep the number of qubits below 10 (Fig. 1). For parameter optimization, the COBYLA optimizer with its default configuration in Scipy 30 is used, as it has demonstrated good performance in other variational approaches31,32. Note that \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r_{\text {splits}}$$\end{document}, k, and the optimizer can be adjusted by the user, and the approach is robust to reasonable variations in these parameters. Fig. 7Comparison of cumulative portfolio value over time between a passive investment in the S&P 500 index (green dashed line) and the proposed portfolio optimization strategies. Optimized portfolios obtained via PCE, QAOA, and EDA are shown in orange, purple, and blue, respectively. Comparison of cumulative portfolio value over time between a passive investment in the S&P 500 index (green dashed line) and the proposed portfolio optimization strategies. Optimized portfolios obtained via PCE, QAOA, and EDA are shown in orange, purple, and blue, respectively. Figure 7 presents the benchmarking results, where QAOA (p = 5), PCE (k = 3), and EDA are depicted as red, orange, and green lines, respectively. Each algorithm executes the procedure described in Algorithm 1, using historical data from the training set to identify an optimal subset of representative assets \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r}$$\end{document}. The resulting portfolios are then evaluated on the test dataset, and their performance is visualized in the corresponding subplots. The figure illustrates the evolution of an initial investment of $1000 over time, following the portfolio strategy derived from each optimizer, and compares it against the baseline performance of the full set of m assets without optimization. The performance for m=10 for QAOA and PCE is very similar in terms of the selection of assets. However, since QAOA is limited by the qubit encoding used, the problem instances tested might not be enough to conclude the performance of the approach. Table 2 reports the gate counts required by QAOA and PCE algorithms across a range of graph sizes, characterized by the number of nodes and edges. The QAOA gate counts are shown for two circuit depths, p = 1 and p = 2, while PCE shows order k = 2 and k = 3. As expected, the gate complexity for QAOA increases significantly with both the number of nodes and the circuit depth, reflecting the quadratic scaling of entangling operations in dense graphs. For instance, QAOA with p = 2 requires over 42,000 gates for a graph with 250 nodes and nearly 21,000 edges. In contrast, PCE exhibits a much more modest growth in gate count, remaining under 750 gates even for the largest instance tested. This highlights the scalability advantage of PCE over QAOA, particularly for large problem instances where quantum resource constraints are prohibitive. Since p=5 has been chosen for this problem instance, the scalability of QAOA is limited by the depth and number of qubits used. Fig. 8Comparison of the Sharpe ratio obtained by the optimized portfolios and the non-optimized S&P 500 baseline as a function of the number of assets n in train (80%) and test (20%) datasets, respectively. Comparison of the Sharpe ratio obtained by the optimized portfolios and the non-optimized S&P 500 baseline as a function of the number of assets n in train (80%) and test (20%) datasets, respectively. For greater number of nodes m \ge 10, it is observed that the proposed strategy always outperforms the baseline for all the tested cases, regardless of the optimization procedure used. PCE shows the most robust and stable growth trajectory across all problem sizes. Its portfolio value steadily increases over time, often maintaining a clear lead over both EDA and the S&P 500. This suggests that PCE is effective at identifying representative assets that contribute to long-term portfolio growth. EDA, while also outperforming the baseline, exhibits greater volatility. It occasionally reaches higher peaks than PCE (m=100 and m=250) but also experiences sharper drawdowns. This behavior indicates that while EDA can capture short-term opportunities, it may be more sensitive to market fluctuations or local optima in the asset selection process. The iterative behavior exhibited by the EDA reveals a distinct partitioning strategy, wherein a small number of nodes are incrementally separated from the main graph structure during each iteration. This contrasts with PCE, which consistently performs more balanced splits, typically dividing the graph into two subsets of comparable size. Such divergence in partitioning dynamics reflects fundamental differences in the underlying heuristics of each method and may influence the granularity and stability of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r}$$\end{document} found. Since the original market graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {G}$$\end{document} encodes pairwise Pearson correlations among stock assets, the optimization strategy initially focuses on structural properties rather than asset returns. Consequently, the selection of representative assets \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r}$$\end{document} is performed over the decision made in the graph. To evaluate the effectiveness of the selected representatives, Fig. 8 presents a comparative analysis of the Sharpe ratio (Eq. 5) for the PCE strategy and the baseline, shown as orange and blue bars, respectively, across both training and test datasets. Figure 8a shows that the PCE approach successfully identifies a subset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{r}$$\end{document} that yields a higher Sharpe ratio than the baseline, indicating superior risk-adjusted performance. This trend is consistent in the test dataset, as shown in Fig. 8b, where PCE continues to outperform the baseline in most experiments. These results suggest that the proposed strategy effectively balances return maximization and risk minimization, as captured by the Sharpe ratio, despite its initial reliance on correlation structure rather than direct return information. To assess the computational efficiency of the proposed methods, Fig. 9 shows a runtime analysis for a single iteration of Algorithm 1 with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n_{\text {splits}} = 1$$\end{document}. Figure 9 presents the runtime as a function of the number of nodes (m) involved in the optimization. As illustrated, QAOA exhibits the highest computational cost, with its runtime for m = 10 comparable to that of the PCE approach for m = 150. Notably, PCE is capable of solving instances with m \ge 200 in approximately one hour, indicating its practical viability for real-world applications. Note that statevector simulation was used for these experiments, and this runtime may decrease if a different measurement strategy or a real quantum device were used. Although the classical heuristic (EDA) generally requires less computational effort, its runtime may vary depending on the configuration of its hyperparameters. Fig. 9Times comparison (algorithm execution for single optimization problem). Times comparison (algorithm execution for single optimization problem). Conclusions In this work, we proposed a graph-based portfolio optimization strategy that iteratively bipartitions a market graph representing the S&P 500, where each node corresponds to a stock asset and edges encode pairwise Pearson correlations. From each identified group of correlated assets, a representative is selected to construct an optimized portfolio. Traditional quantum gate-based models such as QAOA face scalability limitations due to one-hot encoding, which maps each asset to a separate qubit. To address this, we propose the usage of PCE method, enabling the representation of multiple optimization variables per qubit. Our results demonstrate that instances involving more than m > 250 assets can be solved within approximately one hour using a statevector simulator, surpassing the scalability constraints of conventional quantum approaches. The proposed strategy effectively balances return maximization and risk minimization, as evidenced by superior Sharpe ratio performance compared to baseline methods. Although this study scales up to m = 250 and n=9, the approach is designed to potentially accommodate the full S&P 500 stock market or larger asset sets at a cost of increasing the number of qubits n. While the current implementation of PCE utilizes a Hardware-Efficient Ansatz, future work include the exploration of alternative quantum circuit architectures tailored to this problem. Additionally, further research will investigate enhanced methods for selecting representative assets from each correlated group to improve portfolio construction. Finally, we also propose the analysis of quantum noise resilience as a further step and the usage of shot-based backend or real quantum devices.