# Hybrid quantum cycle generative adversarial network
for small molecule generation

Matvei Anoshin  Terra Quantum AG, 9000 St. Gallen, Switzerland  Asel
Sagingalieva  Terra Quantum AG, 9000 St. Gallen, Switzerland  Christopher
Mansell  Terra Quantum AG, 9000 St. Gallen, Switzerland  Vishal Shete  Terra
Quantum AG, 9000 St. Gallen, Switzerland  Markus Pflitsch  Terra Quantum AG,
9000 St. Gallen, Switzerland  Alexey Melnikov  Terra Quantum AG, 9000 St.
Gallen, Switzerland

###### Abstract

The contemporary drug design process demands considerable time and resources
to develop each new compound entering the market. Generating small molecules
is a pivotal aspect of drug discovery, essential for developing innovative
pharmaceuticals. Uniqueness, validity, diversity, druglikeliness,
synthesizability, and solubility molecular pharmacokinetic properties,
however, are yet to be maximized. This work introduces several new generative
adversarial network models based on engineering integration of parametrized
quantum circuits into known molecular generative adversarial networks. The
introduced machine learning models incorporate a new multi-parameter reward
function grounded in reinforcement learning principles. Through extensive
experimentation on benchmark drug design datasets, QM9 and PC9, the introduced
models are shown to outperform scores achieved previously. Most prominently,
the new scores indicate an increase of up to $30\%$ in the druglikeness
quantitative estimation. The new hybrid quantum machine learning algorithms,
as well as the achieved scores of pharmacokinetic properties, contribute to
the development of fast and accurate drug discovery processes.

††preprint: APS/123-QED††preprint: APS/123-QED

##  I Introduction

In the current pharmaceutical landscape, the drug design process is a
prolonged and costly endeavor. It typically spans up to $15$ years
Hughes_Rees_Kalindjian_Philpott_2011  from target identification to clinical
application, incurring expenses of approximately $1$ billion for each new
drug. Machine Learning has shown successful uses through the different stages
of drug development, from the search for specific protein inhibitors
Wang_Chen_Yang_Akutsu_2022  to the evaluation of pharmacokinetic properties
and adverse effects.

Generative Adversarial Networks (GANs) goodfellow2014generative  have gained
prominence in molecular design. Their architecture is adept at generating a
vast array of potential drug candidates from extensive molecular spaces,
thereby facilitating more efficient preliminary screenings. GAN models,
especially when compared to recurrent neural networks schmidt2019recurrent
and variational autoencoders Kingma_2019 , have demonstrated superiority in
generating SMILES Weininger_1988  representations of compounds. The use of
graph representations of compounds, which are invariant to the permutations of
atom orders, has allowed GANs, particularly the MolGAN decao2022molgan , to
become state-of-the-art approach in generative chemistry.

Quantum-enhanced GANs, with their inherent probabilistic nature, offer a
moderate advantage over their classical counterparts by encompassing a broader
and more diverse chemical space Li_Topaloglu_Ghosh_2021 . However, in the
current Noisy Intermediate-Scale Quantum (NISQ) era, the feasibility of purely
quantum algorithms is limited. Here, hybrid algorithms may find a reasonable
equilibrium between the high expressivity of modern quantum simulators and the
stability of classical approaches.

Utilization of hybrid quantum neural networks (HQNNs) represents a convergence
of classical deep learning architectures with Quantum Machine Learning (QML)
algorithms jerbi2023quantum ; perez2022reduce ; marshall2022high ;
kordzanganeh2023parallel , specifically through Parameterized Quantum Circuits
(PQCs) senokosov2023quantum . This hybrid approach harnesses the strengths of
classical and quantum computing, introducing a system capable of efficiently
processing large datasets compared to classical deep learning architectures
alone li2020quantum ; Mitarai2020 . HQNNs have exhibited promising
applications across various industrial domains, including healthcare
houssein2022hybrid ; lusnig2023hybrid ; jain2022hybrid , chemistry
sedykh2023quantum ; kurkin2023forecasting , routing haboury2023supervised  and
aerospace rainjonneau2023quantum , also in image classification
sagingalieva2023hyperparameter ; landman2022quantum . While HQNNs have
demonstrated efficacy in these fields, further research is essential to
explore their potential in drug design fully and to refine algorithms for
enhanced robustness and scalability.

This article introduces the Hybrid Quantum Cycle MolGAN for generating graph
representations of small molecules. By incorporating a Cycle Component into
the Hybrid Quantum MolGAN (HQ-MolGAN), where both the Generator and the Cycle
Component are represented using an HQNN hybridTQ2022 ; qml_review_2023 , we
have been able to stabilize the training process for molecular samples and
improve key metrics. This includes increases of up to $30\%$ in the
Quantitative Estimate of Druglikeness (QED score)
Bickerton_Paolini_Besnard_Muresan_Hopkins_2012 . Such models, have shown
quantum superiority over classical MolGAN in all three key metrics QED,
Synthesis Accessibility score (SA) Ertl_Schuffenhauer_2009  and logP
(characteristic of the hydrophilicity and lipophilicity of a drug)
Leo_Hansch_Elkins_1971 ), as well as an advantage over nearest competitors
among quantum models.

This work contributes insights into the potential of QML for small molecule
generation, emphasizing the benefits of hybrid quantum-classical approaches in
drug design. The results underscore the significance of employing quantum-
enhanced models to achieve improved performance across essential molecular
optimization metrics.

##  II Results

Figure 1: Histograms of distribution of values of QED, SA and LogP scores in
QM9 and PC9 datasets. The mean QED and LogP scores for molecules in the PC9
dataset are greater than those in QM9, while the mean score for SA is lower.

In this study, we introduce several models for small molecule generation.
Firstly, we present a refined classical MolGAN with a halved parameter count,
drawing inspiration from the state-of-the-art classical MolGAN architecture
decao2022molgan . Secondly, in Sec. II we present an HQ-MolGAN, fusing
classical and quantum computing approaches for enhanced capabilities. Notably,
we propose the novel classical Cycle MolGAN, incorporating a multi-parameter
reward function based on reinforcement learning principles, inspired by the
state-of-the-art Cycle MolGAN
Maziarka_Pocha_Kaczmarczyk_Rataj_Danel_Warchoł_2020a . Additionally, in Sec.
II, we introduce the innovative Hybrid Quantum Cycle MolGAN (HQ-Cycle-MolGAN).
Through rigorous experimentation on the QM9 and PC9 datasets, described in
Sec. II, our results demonstrate that models trained on PC9 exhibit higher
LogP scores than their QM9 counterparts. Furthermore, the hybrid quantum
models showcase superior performance, achieving the highest QED, SA, and LogP
metrics scores. Remarkably, our hybrid quantum model outperforms a similar
QGAN-HG MR hybrid model from Ref. Li_Topaloglu_Ghosh_2021  and QuMolGAN from
Ref. Kao_2023 , emphasizing the efficacy of our proposed approaches in small
molecule generation. We summarize our conclusions and outline future research
directions in Sec. III.

### Dataset

This study employed two datasets for model training: QM9 and PC9. In this
paper, two datasets were used for the training procedure. The QM9 dataset
ramakrishnan2014quantum ; Ruddigkeit_vanDeursen_Blum_Reymond_2012 , a well-
established benchmark in small molecule drug design since 2012, comprises
approximately $134,000$ neutral molecules, each with no more than nine atoms
$(C,O,N,F)$ apart from hydrogen. Its comprehensive and diverse chemical space
makes it particularly relevant for this field.

The second dataset, PC9, is a subset of the extensive PubChem database,
containing around $99,000$ molecules
Glavatskikh_Leguy_Hunault_Cauchy_DaMota_2019 . A notable distinction between
QM9 and PC9 is that the latter includes not only neutral molecules but also
those with a multiplicity greater than one. While PC9 was initially proposed
as a replacement for the QM9 dataset, its practical usage alongside QM9 has
demonstrated benefits in generating a more diverse set of molecular
structures.

Fig. 1 shows that the mean QED and LogP scores for molecules in the PC9
dataset are higher than those in QM9, while the mean score for Synthesis
Accessibility (SA) is lower. Theoretically, this suggests that models trained
on the PC9 dataset might be inclined to generate samples with higher values in
these two key metrics than similar models trained on QM9. However, as detailed
in Sec. II, this is not always the case.

It is important to note that during training, normalized values of logP, NP,
and SA scores were evaluated and optimized.

### HQ-MolGAN

Figure 2: (a) Structure of HQ-Cycle-MolGAN: Generator (G), Discriminator (D),
Cycle Component (C). Highlighted with green part of HQ-Cycle-MolGAN is same
for HQ-MolGAN. (b) Illustration of work of Cycle Components Let’s suppose Z is
a space of normally distributed noise vectors, $Y$-chemical space of datasets.
Then Generator maps $X$ to some chemical space $Y^{\prime}$, and after Cycle
Component restores vector G(Z) back to noise. Then accuracy of these
restorations is optimized. (c) Quantum Depth-Infused Neural Network Layer that
was used as HQ-Cycle component. Figure 3: Chart of (a) QED, (b) LogP, and (c)
SA scores during training of classical MolGAN and Hybrid MolGAN. It can be
seen that while MolGAN limits its scores to a narrow beam of values even after
$50,000$ iterations, when Hybrid MolGAN presents a wider range of compounds,
covering greater scores of key metrics.

In this section we introduce the HQ-MolGAN, which is based on classical MolGAN
architecture decao2022molgan . As depicted in Fig.2 (a), green rectangular,
the architecture of HQ-MolGAN is comprised of three primary components: the
Generator (G), the Discriminator (D), and the Reward component (R). This model
operates on the principles of the Wasserstein Generative Adversarial Network
arjovsky2017wasserstein , wherein the Generator endeavors to synthesize
molecular graph representations indistinguishable from authentic ones, thereby
“deceiving” the Discriminator. The training regimen of HQ-MolGAN encapsulates
a min-max optimization game, wherein the Generator and Discriminator engage in
a continuous adaptive process to refine the generative quality of molecular
representations:

$\displaystyle\min_{G}\max_{D\in\mathcal{D}}\mathbb{E}_{\boldsymbol{y}\sim
P_{\text{data }}}[D(\boldsymbol{y})]-\mathbb{E}_{\boldsymbol{z}\sim
P_{\boldsymbol{z}}}[D(G(\boldsymbol{z}))]-$
$\displaystyle-\underbrace{\lambda\mathbb{E}_{\hat{\boldsymbol{y}}\sim
P_{\hat{\boldsymbol{y}}}}\left[\left(\left\|\nabla_{\hat{\boldsymbol{y}}}D(\hat{\boldsymbol{y}})\right\|_{2}-1\right)^{2}\right]}_{\text{gradient
penalty }}.$

The Reward Component in our HQ-MolGAN architecture functions as a
sophisticated Reinforcement Learning objective, tasked with evaluating the
Generator’s output based on several chemical property metrics. This evaluation
extends beyond the conventional metrics of Quantum Estimation of QED, LogP,
and SA scores. It incorporates a comprehensive assessment of “validity”,
quantified as the ratio of valid molecular samples to the total number of
generated samples. Furthermore, it considers “novelty”, defined by the
proportion of generated valid samples not present in the training dataset.
Additionally, the Reward Component assesses “diversity”, a measure of the
variance in the chemical structures of the generated molecules, and the
“Natural Product likeness” (NP) score, as delineated by
Ertl_Roggo_Schuffenhauer_2007 . These multifaceted evaluation criteria enable
a more nuanced and thorough assessment of the Generator’s performance,
aligning the generated molecules more closely with desired chemical
characteristics.

In the architecture of HQ-MolGAN, a pivotal role is played by the Variational
Quantum Circuit (VQC), which is integrated as the initial layer in MolGAN’s
generator. The VQC operates by encoding a noise vector into $N$ qubits.
Subsequent to the application of rotation and entanglement gates, the VQC
outputs a probability distribution vector, denoted as $[p(0),...,p(2^{N}-1)]$,
where each element represents the probability of a corresponding quantum
state. This vector, with a dimensionality of $2^{N}$, undergoes a truncation
process where only the first $2^{N-N_{\text{ancilla}}}$ elements are retained.
The truncated vector is then fed into a classical fully-connected layers,
which constitutes the remaining component of HQ-MolGAN’s generator.

In our experimental analysis, two distinct configurations of the VQC were
evaluated: the Vanilla Variational Repetitive Quantum Layer (VVRQ)
kordzanganeh2023benchmarking  and the Exponential Fourier Quantum Layer (EFQ)
Kordzanganeh_2023 . These configurations offer different approaches to quantum
state transformation, thus providing a comparative understanding of their
efficacy in the context of molecule generation.

The operational mechanism of the VVRQ layer within our HQ-MolGAN framework
(Fig. 2 (a)) is as follows: encoding the noise vector directly onto the qubits
in a single step using angle embedding PhysRev.70.460  (green rectangles in
Fig. 2 (a)). Following this initialization, the VVRQ layer implements several
variational layers which consist of a sequence of Rot (rotation) gates (blue
rectangles in Fig. 2 (a))

$\text{Rot}(\theta_{1},\theta_{2},\theta_{3})=Ry(\theta_{1})\cdot
Rz(\theta_{2})\cdot Ry(\theta_{3})$
$Ry(\theta)=\begin{pmatrix}\text{cos}(\frac{\theta}{2})&-\text{sin}(\frac{\theta}{2})\\\
\text{sin}(\frac{\theta}{2})&\ \text{cos}(\frac{\theta}{2})\end{pmatrix}\ \
Rz(\theta)=\begin{pmatrix}\text{exp}(-\frac{\theta}{2})&0\\\
0&\text{exp}(\frac{\theta}{2})\end{pmatrix}$

and controlled NOT (CNOT) gates.

$\text{CNOT}=\begin{pmatrix}1&0&0&0\\\ 0&0&0&1\\\ 0&0&1&0\\\ 0&1&0&0\\\
\end{pmatrix}$

Originally this approach was proposed in Tsang_West_Erfani_Usman_2023  for
image generation, but it can be applied to any generative task. The CNOT gates
are applied between sequentially adjacent qubits, i.e., between qubit $i$ and
qubit $i+1$, thereby facilitating quantum entanglement and information
propagation across the qubit array.

This process is iteratively repeated for three variational layers, ensuring a
thorough and complex manipulation of the quantum state. The final step in the
VVRQ process involves measuring the probability distribution of the quantum
states of the qubits. These measurements yield a probability vector that
encapsulates the resultant quantum state post-entanglement and rotation,
reflecting the encoded information from the initial noise vector.

In the EFQ layer the data encoding process is distinctly characterized by a
dual-phase approach. Initially, the input data is encoded onto the qubits
using angle embedding. This is followed by several variational layers, and
after this, a second encoding phase, wherein the amplitude of the rotational
gates is systematically increased to double its initial value.

This dual encoding scheme, particularly with the amplified rotational
amplitude in the second phase, is designed to enhance the expressive power of
the quantum circuit schuld_fourier . By manipulating the amplitude of
rotations in this manner, the EFQ layer is potentially able to induce a more
diverse and complex quantum state space.

### HQ-Cycle-MolGAN

The Cycle-MolGAN model introduces an innovative “Cycle component” (C) (Fig. 2
(b)) to the established MolGAN architecture. This component is ingeniously
designed to reverse the molecule generation process. Specifically, it converts
the generated molecular samples back into their originating noise vectors and
assesses the accuracy of this reverse conversion. This approach, as proposed
by Maziarka_Pocha_Kaczmarczyk_Rataj_Danel_Warchoł_2020a , has been identified
as particularly advantageous in the realm of molecular optimization tasks. It
contributes significantly to the stability of the training performance and is
instrumental in suppressing the training of the non-isomorphic generator
compounds within the Hybrid-MolGAN framework, especially pertinent in the
generation of small molecules.

Practically implemented, the Cycle component takes the form of a Multi-Layer
Perceptron (MLP) model. This model effectively combines the adjacency matrix
and the feature matrix of each generated molecular sample into a singular,
unified tensor. Following this integration, the Cycle component proceeds to
“mirror” the layers of the Generator, albeit in reverse order. This mirroring
process is a critical step as it compresses the expanded dimensions of the
combined tensor, specifically $\textbf{batch\\_size}\times 405$ from the
adjacency matrix and $\textbf{batch\\_size}\times 45$ from the feature matrix,
down to a more manageable size of $\textbf{batch\\_size}\times 8$. This
reduction is pivotal for effectively re-encoding the complex molecular
information back into the concise form of noise vectors.

In the development of the Hybrid Cycle component within the Cycle-MolGAN
framework, we adhere to the classical design but with a crucial modification
in the final layer. This layer is replaced by a Quantum Depth-Infused Neural
Network Layer, as described in
Sagingalieva_Kordzanganeh_Kenbayev_Kosichkina_Tomashuk_Melnikov_2023 . This
quantum depth-infused layer undertakes the task of encoding a vector of size
$\textbf{batch\\_size}\times 64$ into $8$ qubits through a series of $8$
repetitive encoding layers (blue rectangles in Fig. 2 (c)).

To optimize the performance of the Generator within this architecture, we
employ a combined loss function, articulated as follows:

$\begin{aligned} L(\theta)=\lambda\cdot
L(\theta)_{\text{WGAN}}+(1-\lambda)\cdot L(\theta)_{\text{Cycle}}+\gamma
L(\theta)_{\text{Reward}}\\\ \gamma,\ \lambda\in[0,1]\end{aligned}.$

This loss function integrates the Wasserstein GAN loss
($L(\theta)_{\text{WGAN}}$), the Cycle loss ($L(\theta)_{\text{Cycle}}$), and
the Reward loss ($L(\theta)_{\text{Reward}}$). The coefficients $\gamma$ and
$\lambda$ regulate the relative influence of each component in the overall
loss calculation. In our experiments, we set $\lambda$ to $0.5$, thereby
assigning equal importance to both cycles of transformation (from noise vector
$Z$ to generated sample $Y^{\prime}$, and back from $Y^{\prime}$ to $Z$), as
illustrated in Fig. 2 (b).

### Training and Results

Figure 4: (a) Samples generated by HQ-MolGAN-VVRQ trained on QM9. (b) “Highly
entropy state”: HQ-MolGAN-VVRQ generated inappropriate samples and RDKit
rewarded them with average metric of LogP $\propto$ 0.9. (c) Samples generated
by HQ-Cycle-MolGAN-VVRQ trained on Both datasets. (d) Samples generated by
MolGAN with HQ-Cycle trained on Both datasets.

The models in this study were implemented using Python3, leveraging the
PyTorch framework PyTorch  and PennyLane Pennylane  for quantum computations.
For the evaluation of the chemical properties of the synthesized compounds,
the RDKit library was employed. The computational experiments were conducted
on high-performance GPU hardware, specifically the Tesla V100 and the RTX
3060.

For the classical MolGAN models, the generator’s architecture was scaled down
by reducing the number of parameters in each layer by half, resulting in a
total of $157,570$ parameters in the Generator. The classical models,
including both the standard MolGAN and Cycle-MolGAN, underwent a training
regime of $200,000$ iterations with a batch size of $10$ samples. In contrast,
the hybrid quantum models were subjected to a shorter training duration of
$50,000$ iterations. The validation set size was limited, containing either
$100$ samples when training on a single dataset or $250$ samples in cases
where multiple datasets were employed. In both EFQ and VVRQ models number of
ancilia qubits is equal to $2$.

The experimental investigation was conducted in three distinct stages:

  * •

The First Stage (Sec. II.1): This phase focused on evaluating the performance
differences between the VVRQ and EFQ layers when integrated into the hybrid
generator in HQ-MolGAN.

  * •

The Second Stage (Sec. II.2): The objective was to assess the impact of the
classical Cycle Component on the performance of MolGAN and HQ-MolGAN.

  * •

The Third Stage (Sec. II.3): This stage involved an analysis of the Hybrid-
Cycle Component, including a comparative study against the classical Cycle
Component.

These three stages are described in detail in the next three subsections.

###  II.1 HQ-MolGAN

The investigation into the efficacy of the Hybrid Generator within the MolGAN
framework commences with a comparative analysis focusing on the chemical
properties of the generated molecular samples. Specifically, this analysis
evaluates the logP and the QED scores. By contrasting the logP and QED scores
yielded by the molecules generated from each model, we aim to quantify and
elucidate the impact of the Hybrid Generator’s integration on the model’s
performance in generating chemically viable and optimally structured
molecules.

Fig. 3 illustrates a notable distinction in the behavior of the classical
MolGAN and the HQ-MolGAN in terms of their generated molecular score
distributions. The classical MolGAN model demonstrates a tendency to produce
scores that converge towards a relatively narrow range. In contrast, the
molecular samples generated by HQ-MolGAN exhibit an oscillatory behavior in
their score values. This variability in the HQ-MolGAN’s scores can
significantly influence the model’s training dynamics, particularly due to the
Reward component which calculates the product of these metric values.

A potential explanation for the discontinuous score trends observed in the HQ-
MolGAN could be attributed to its limited validation set size.

Nevertheless, the HQ-MolGAN capable to generate molecular samples with
competitive scores in terms of Drug-likeness, Synthesizability, and
Solubility, as depicted in Fig. 4(a). As shown in Table 3, the HQ-MolGAN-VVRQ
model trained on the QM9 dataset achieves a LogP score of $0.84$, the HQ-
MolGAN-EFQ model trained on the PC9 dataset results in a QED score of $0.62$,
and the HQ-MolGAN-EFQ model trained on both datasets attains an SA score of
$0.84$.

The HQ-MolGAN-VVRQ model exhibits a propensity for generating samples with
higher SA scores. In contrast, the HQ-MolGAN-EFQ model demonstrates superior
performance in achieving greater QED and LogP scores.

Furthermore, a dataset-dependent variance in performance is observed. Models
trained on the PC9 dataset consistently reach higher LogP scores compared to
those trained on the QM9 dataset. This trend aligns with the inherent
distribution of scores within these datasets, as illustrated in Fig. 1.
However, such a correlation does not extend to the QED scores, where no
discernible pattern is evident based on the choice of training dataset.

These findings underscore the nuanced impact of model configuration and
training dataset on the performance of HQ-MolGAN in generating molecular
samples with desired chemical properties. They highlight the need for careful
consideration of both the model architecture and the dataset characteristics
in optimizing the performance of molecule generation models.

During our experiments, a notable limitation of the Hybrid models was
observed, characterized by a tendency of the generator to gravitate towards a
“high entropy state”. This phenomenon is illustrated in Fig. 4(b)). In this
state, the generator predominantly produces molecular structures that are
either bare, unbound atoms or a collection of disconnected small molecules.
Intriguingly, despite their simplistic and fragmented nature, these structures
are often assigned high scores in terms of LogP and SA by the RDKit library
within the Reward component. This paradoxical scoring poses a challenge to the
model’s reliability in generating chemically meaningful and complex molecules.

This observation indicates a critical issue in the mapping process of the
generator. Essentially, a variety of noise samples $Z$ are being mapped to a
limited and similar region in the chemical space $Y^{\prime}$, resulting in
repetitive and high-entropy molecular samples. Such a mapping significantly
diminishes the expressivity of the Generator, constraining its ability to
generate a diverse range of molecular structures.

Figure 5: Comparison of combined losses during training on the QM9 dataset.
(a): Cycle-MolGAN versus MolGAN models, Cycle-MolGAN has a more stable
training process compared to the MolGAN. (b): HQ-Cycle-MolGAN-EFQ versus
Hybrid-MolGAN-EFQ, no significant impact of Cycle component on Loss curve
observed. Figure 6: (a) Graph of combined losses of MolGAN and HQ-Cycle
Component MolGAN models trained on QM9 dataset. (b): Graph of combined losses
of HQ-Cycle-MolGAN-EFQ and HQ-MolGAN-VVRQ models trained on QM9 dataset.

To ensure that the models generate unique and varied molecular samples, it is
imperative to establish a one-to-one correspondence between different noise
vectors and distinct molecular structures. In other words, the model must
possess isomorphic properties to map distinct noise vectors to chemically
diverse molecular samples. To achieve this objective, the integration of a
Cycle component is proposed. The Cycle component is designed to reinforce the
isomorphic nature of the model by facilitating a more diverse and accurate
mapping from noise vectors to molecular samples and vice versa, thereby
enhancing the model’s capability to generate a wider array of unique molecular
structures.

Table 1: MolGAN and HQ-MolGAN

Model | Unique $(\%)$ | Valid $(\%)$ | Diversity | Druglikeliness | Synthesizability | Solubility
---|---|---|---|---|---|---
MolGAN (QM9) | $63.0$ | $1.1$ | $0.98$ | $0.47$ | $0.64$ | $0.52$
MolGAN (PC9) | $39.9$ | $14.6$ | $0.96$ | $0.51$ | $0.38$ | $0.80$
MolGAN (Both Datasets) | $46.2$ | $3.7$ | $0.99$ | $0.53$ | $0.42$ | $0.68$
HQ-MolGAN-VVRQ (QM9) | $\mathbf{71.1}$ | $14.3$ | $0.97$ | $0.53$ | $\mathbf{0.84}$ | 0.61
HQ-MolGAN-VVRQ (PC9) | $65.7$ | 3.2 | $0.99$ | $0.51$ | 0.40 | 0.66
HQ-MolGAN-VVRQ VVRQ (Both Datasets) | $68.8$ | 11.5 | 0.98 | $0.52$ | 0.63 | 0.75
HQ-MolGAN-EFQ (QM9) | $45.8$ | $5.4$ | $0.99$ | $0.50$ | $0.37$ | $0.79$
HQ-MolGAN-EFQ (PC9) | $53.8$ | $3.9$ | $0.97$ | $\mathbf{0.62}$ | 0.39 | 0.75
HQ-MolGAN-EFQ (Both Datasets) | $39.4$ | 12.9 | 0.97 | 0.53 | 0.49 | $\mathbf{0.84}$
QGAN-HG MR Li_Topaloglu_Ghosh_2021  | 54.0 | 44.0 | $\mathbf{1.00}$ | 0.51 | 0.11 | 0.49
P2-QGAN-HG MR Li_Topaloglu_Ghosh_2021  | 41.0 | $\mathbf{52.0}$ | $\mathbf{1.00}$ | 0.49 | 0.12 | 0.62
QuMolGAN Kao_2023  | 5.4 | 42.94 | $\mathbf{1.00}$ | 0.57 | 0.76 | 0.44

Table 2: MolGAN and HQ-MolGAN with classic Cycle component

Model | Unique $(\%)$ | Valid $(\%)$ | Diversity | Druglikeliness | Synthesizability | Solubility
---|---|---|---|---|---|---
Cycle-MolGAN (QM9) | $86.3$ | 0.7 | $\mathbf{1.00}$ | $0.47$ | 0.37 | 0.46
Cycle-MolGAN (PC9) | $67.8$ | 3.2 | $0.98$ | $0.48$ | 0.27 | 0.52
Cycle-MolGAN (Both Datasets) | $68.4$ | $4.2$ | 0.95 | 0.52 | 0.48 | 0.69
HQ-Cycle-MolGAN-VVRQ (QM9) | 64.2 | 4.3 | 0.97 | $0.54$ | 0.38 | 0.92
HQ-Cycle-MolGAN-VVRQ (PC9) | 73.8 | 14.5 | 0.99 | 0.51 | $\mathbf{0.50}$ | $\mathbf{0.93}$
HQ-Cycle-MolGAN-VVRQ (Both Datasets) | $\mathbf{86.7}$ | 6.8 | 0.98 | $\mathbf{0.58}$ | 0.48 | 0.75
HQ-Cycle-MolGAN-EFQ (QM9) | $66.9$ | 5.8 | 0.98 | 0.55 | 0.33 | 0.69
HQ-Cycle-MolGAN-EFQ (PC9) | $81.2$ | $\mathbf{22.1}$ | 0.96 | 0.54 | 0.40 | $\mathbf{0.94}$
HQ-Cycle-MolGAN-EFQ (Both Datasets) | $64.1$ | 7.5 | 0.98 | 0.53 | 0.35 | 0.66

Table 3: MolGAN and HQ-MolGAN with Hybrid-Quantum Cycle component

Model | Unique $(\%)$ | Valid $(\%)$ | Diversity | Druglikeliness | Synthesizability | Solubility
---|---|---|---|---|---|---
Cycle-MolGAN (QM9) | $92.4$ | 2.7 | $\mathbf{0.99}$ | $0.47$ | $0.35$ | 0.64
Cycle-MolGAN (PC9) | $93.2$ | 5.1 | 0.97 | $0.46$ | $0.28$ | 0.65
Cycle-MolGAN (Both Datasets) | $\mathbf{93.9}$ | $6.52$ | $0.99$ | $\mathbf{0.49}$ | $0.25$ | $0.78$
HQ-Cycle-MolGAN-VVRQ (QM9) | $60.4$ | 8.7 | 0.94 | $0.53$ | $0.38$ | 0.61
HQ-Cycle-MolGAN-VVRQ (PC9) | $67.8$ | 9.1 | 0.94 | $0.53$ | $\mathbf{0.50}$ | 0.93
HQ-Cycle-MolGAN-VVRQ (Both Datasets) | $65.5$ | $\mathbf{15.0}$ | $0.98$ | $0.51$ | $0.35$ | $\mathbf{0.95}$
HQ-Cycle-MolGAN-EFQ (QM9) | $76.8$ | 4.1 | $0.98$ | $0.51$ | $0.42$ | 0.63
HQ-Cycle-MolGAN-EFQ (PC9) | $88.8$ | 11.0 | $0.98$ | $0.50$ | $0.35$ | 0.69
HQ-Cycle-MolGAN-EFQ (Both Datasets) | $74.7$ | 9.3 | 0.96 | $0.52$ | $0.49$ | 0.73

###  II.2 HQ-Cycle-MolGAN

Prior to assessing the effect of the Cycle component on the training of HQ-
MolGAN, it is essential to first examine its impact on the conventional MolGAN
framework. As indicated in Fig. 5(a), the incorporation of the Cycle component
into MolGAN (termed Cycle-MolGAN) results in a more stable training process
compared to the ordinary MolGAN model. This stability significantly enhances
the quality of the generated molecular samples, as reflected in their improved
Diversity scores (Table 3, 3). Furthermore, the Cycle component contributes to
the generation of more complex and “bounded” molecular structures, indicating
a higher degree of chemical realism.

In the context of HQ-MolGAN, while the integration of the Cycle component does
not markedly alter the Loss curve as depicted in Fig. 5(b), its influence is
evident in the improved key metric scores of the final HQ-Cycle-MolGAN models.
Whether trained on the PC9 dataset or on a combination of datasets, the HQ-
Cycle-MolGAN demonstrates superior performance in key metrics, as shown in
Table 3. The stabilizing properties of the Cycle component aid the model in
consistently generating “bounded” molecular samples. Notably, both the VVRQ
and EFQ variants of HQ-MolGAN achieve significant scores in terms of LogP
($\mathbf{0.93}$ and $\mathbf{0.94}$) and QED.

Additionally, an analysis of Tables 3 and 3 reveals that models equipped with
the Cycle component are capable of producing a greater number of unique
samples. This finding aligns with the intended objective of the Cycle
component, which is to navigate through the “high entropy state” and enhance
the diversity and uniqueness of the molecular samples generated by the model.

###  II.3 Hybrid-Quantum Cycle MolGAN

In the third and final stage of our experimental series, we focused on
evaluating the impact of the Hybrid-Quantum Cycle Component on both the
classical MolGAN and the HQ-MolGAN architectures.

Fig. 6 presents a comparative analysis of the Generator losses between MolGAN
and HQ-MolGAN models with and without the Hybrid-Quantum Cycle Component.
According to the data presented in Table 3, the incorporation of the Hybrid-
Quantum Cycle Component does not result in significant improvements in most of
the desired metrics, except for a notable LogP score of $0.95$ achieved by the
HQ-Cycle-MolGAN-VVRQ model trained on both datasets.

This absence of a marked enhancement in performance metrics for models
incorporating the HQ-Cycle component, as compared to their counterparts
without it, could potentially be attributed to an insufficient number of
training iterations. This hypothesis is supported by the observations from
Fig. 6, where the training losses of MolGAN and MolGAN with the HQ-Cycle
component exhibit minimal divergence, suggesting that extended training might
be necessary for realizing the full potential of the HQ-Cycle Component.

Interestingly, the introduction of the Hybrid-Quantum Cycle Component appears
to significantly elevate the “Unique” score of the models, surpassing even
that achieved with the standard Cycle component. This outcome validates our
initial hypothesis that a more precise generation of unique molecular samples
is feasible, even with complex models like HQ-Cycle-MolGAN-EFQ or HQ-Cycle-
MolGAN-VVRQ. This finding underscores the effectiveness of the HQ-Cycle
Component in enhancing the diversity and uniqueness of the generated molecular
structures.

##  III Discussion

In this article, we propose a novel approach leveraging QML for small molecule
generation. Our chosen task of small molecule generation serves as a benchmark
for the performance of hybrid quantum machine learning models.

To enhance the classical MolGAN, we introduce two solutions: the incorporation
of VQCs as the initial layer of the generator and the utilization of a cycle
component to restore the original data from the graph representation of the
generated molecule.

Our empirical results substantiate the merit of diversifying training
datasets, not limiting to the QM9 dataset alone but also incorporating the PC9
dataset or a combination of both. Notably, the HQ-MolGAN model, with their
Generator’s layers scaled down by half and trained for a quarter fewer
iterations, has outperformed the classical MolGAN model decao2022molgan  and
its hybrid quantum analogues Li_Topaloglu_Ghosh_2021 ; Kao_2023  across key
chemical metrics: QED, logP, SA and uniqueness.

The introduction of the HQ-Cycle-MolGAN, and especially its variant with the
HQ-Cycle component, marks a significant advancement in the training of hybrid
quantum models. These models not only enhance the desired uniqueness score but
also effectively mitigate the occurrence of the “high entropy state”, a
notable challenge in molecular generation tasks. Consequently, these models
hold substantial promise for applications in the domain of small drug compound
design, both for commercial and scientific purposes within the pharmacology.

This work contributes insights into the potential of QML for small molecule
generation, emphasizing the benefits of hybrid quantum-classical approaches in
drug design. The results underscore the significance of employing quantum-
enhanced models to achieve improved performance across essential molecular
optimization metrics.

Looking ahead, we see a potential for hybrid quantum machine learning models
to further advance the field of molecule generation using hybrid quantum
models. We plan to delve deeper into refining the model architecture,
particularly focusing on optimizing the balance between the quantum and
classical components. This involves experimenting with different
configurations and parameters to enhance the overall efficiency and accuracy
of the models. Another critical avenue we intend to pursue is the expansion of
our training datasets. By incorporating a broader range of chemical compounds
and molecular structures, we aim to increase the diversity and
representativeness of our models. This expansion is expected to improve the
models’ generalization capabilities and their applicability. Through these
focused research efforts, we aspire to contribute significantly to the
advancement of hybrid quantum computing in drug discovery, ultimately aiding
in the development of more effective and innovative therapeutic solutions.

## References

  * (1) James P Hughes, Stephen Rees, S Barrett Kalindjian, and Karen L Philpott.  Principles of early drug discovery.  British journal of pharmacology, 162(6):1239–1249, 2011.
  * (2) Feiqi Wang, Yun-Ti Chen, Jinn-Moon Yang, and Tatsuya Akutsu.  A novel graph convolutional neural network for predicting interaction sites on protein kinase inhibitors in phosphorylation.  Scientific reports, 12(1):229, 2022.
  * (3) Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, et al.  Generative Adversarial Networks.  arXiv preprint arXiv:1406.2661, 2014.
  * (4) Robin M. Schmidt.  Recurrent Neural Networks (RNNs): A gentle Introduction and Overview.  arXiv preprint arXiv:1912.05911, 2019.
  * (5) Diederik P. Kingma and Max Welling.  An introduction to variational autoencoders.  Foundations and Trends® in Machine Learning, 12(4):307–392, 2019\.
  * (6) David Weininger.  Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules.  Journal of Chemical Information and Computer Sciences, 28(1):31–36, 1988.
  * (7) Nicola De Cao and Thomas Kipf.  MolGAN: An implicit generative model for small molecular graphs.  arXiv preprint arXiv:1805.11973, 2022.
  * (8) Junde Li, Rasit O. Topaloglu, and Swaroop Ghosh.  Quantum generative models for small molecule drug discovery.  IEEE Transactions on Quantum Engineering, 2:1–8, 2021.
  * (9) Sofiene Jerbi, Lukas J Fiderer, Hendrik Poulsen Nautrup, Jonas M Kübler, Hans J Briegel, and Vedran Dunjko.  Quantum machine learning beyond kernel methods.  Nature Communications, 14(1):517, 2023.
  * (10) Adrián Pérez-Salinas, Radoica Draškić, Jordi Tura, and Vedran Dunjko.  Reduce-and-chop: Shallow circuits for deeper problems.  arXiv preprint arXiv:2212.11862, 2022.
  * (11) Simon C Marshall, Casper Gyurik, and Vedran Dunjko.  High dimensional quantum learning with small quantum computers.  arXiv preprint arXiv:2203.13739, 2022.
  * (12) Mo Kordzanganeh, Daria Kosichkina, and Alexey Melnikov.  Parallel hybrid networks: an interplay between quantum and classical neural networks.  Intelligent Computing, 2:0028, 2023.
  * (13) Arsenii Senokosov, Alexander Sedykh, Asel Sagingalieva, and Alexey Melnikov.  Quantum machine learning for image classification.  arXiv preprint arXiv:2304.09224, 2023.
  * (14) YaoChong Li, Ri-Gui Zhou, RuQing Xu, Jia Luo, and WenWen Hu.  A quantum deep convolutional neural network for image recognition.  Quantum Science and Technology, 5(4):044003, 2020.
  * (15) Kosuke Mitarai, Makoto Negoro, Masahiro Kitagawa, and Keisuke Fujii.  Quantum Circuit Learning.  Physical Review A, 98(3):032309, 2018.
  * (16) Essam H Houssein, Zainab Abohashima, Mohamed Elhoseny, and Waleed M Mohamed.  Hybrid quantum-classical convolutional neural network model for COVID-19 prediction using chest X-ray images.  Journal of Computational Design and Engineering, 9(2):343–363, 2022\.
  * (17) Luca Lusnig, Asel Sagingalieva, Mikhail Surmach, Tatjana Protasevich, Ovidiu Michiu, Joseph McLoughlin, et al.  Hybrid quantum image classification and federated learning for hepatic steatosis diagnosis.  arXiv preprint arXiv:2311.02402, 2023.
  * (18) Prateek Jain and Srinjoy Ganguly.  Hybrid quantum generative adversarial networks for molecular simulation and drug discovery.  arXiv preprint arXiv:2212.07826, 2022.
  * (19) Alexandr Sedykh, Maninadh Podapaka, Asel Sagingalieva, Nikita Smertyak, Karan Pinto, Markus Pflitsch, et al.  Quantum physics-informed neural networks for simulating computational fluid dynamics in complex shapes.  arXiv preprint arXiv:2304.11247, 2023.
  * (20) Andrii Kurkin, Jonas Hegemann, Mo Kordzanganeh, and Alexey Melnikov.  Forecasting the steam mass flow in a powerplant using the parallel hybrid network.  arXiv preprint arXiv:2307.09483, 2023.
  * (21) Nathan Haboury, Mo Kordzanganeh, Sebastian Schmitt, Ayush Joshi, Igor Tokarev, Lukas Abdallah, et al.  A supervised hybrid quantum machine learning solution to the emergency escape routing problem.  arXiv preprint arXiv:2307.15682, 2023.
  * (22) Serge Rainjonneau, Igor Tokarev, Sergei Iudin, Saaketh Rayaprolu, Karan Pinto, Daria Lemtiuzhnikova, et al.  Quantum algorithms applied to satellite mission planning for Earth observation.  IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 16:7062–7075, 2023.
  * (23) Asel Sagingalieva, Andrii Kurkin, Artem Melnikov, Daniil Kuhmistrov, et al.  Hybrid quantum ResNet for car classification and its hyperparameter optimization.  Quantum Machine Intelligence, 5(2):38, 2023.
  * (24) Jonas Landman, Natansh Mathur, Yun Yvonna Li, Martin Strahm, Skander Kazdaghli, Anupam Prakash, et al.  Quantum methods for neural networks and application to medical image classification.  Quantum, 6:881, 2022.
  * (25) Michael Perelshtein, Asel Sagingalieva, Karan Pinto, Vishal Shete, et al.  Practical application-specific advantage through hybrid quantum computing.  arXiv preprint arXiv:2205.04858, 2022.
  * (26) Alexey Melnikov, Mohammad Kordzanganeh, Alexander Alodjants, and Ray-Kuang Lee.  Quantum machine learning: from physics to software engineering.  Advances in Physics: X, 8(1):2165452, 2023.
  * (27) G Richard Bickerton, Gaia V Paolini, Jérémy Besnard, Sorel Muresan, and Andrew L Hopkins.  Quantifying the chemical beauty of drugs.  Nature chemistry, 4(2):90–98, 2012.
  * (28) Peter Ertl and Ansgar Schuffenhauer.  Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions.  Journal of cheminformatics, 1:1–11, 2009.
  * (29) Albert Leo, Corwin Hansch, and David Elkins.  Partition coefficients and their uses.  Chemical Reviews, 71(6):525–616, 1971.
  * (30) Łukasz Maziarka, Agnieszka Pocha, Jan Kaczmarczyk, Krzysztof Rataj, Tomasz Danel, and Michał Warchoł.  Mol-cyclegan: A generative model for molecular optimization.  Journal of Cheminformatics, 12(1), 2020.
  * (31) Po-Yu Kao, Ya-Chu Yang, Wei-Yin Chiang, Jen-Yueh Hsiao, Yudong Cao, Alex Aliper, et al.  Exploring the Advantages of Quantum Generative Adversarial Networks in Generative Chemistry.  Journal of Chemical Information and Modeling, 63(11):3307–3318, 2023.
  * (32) Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole Von Lilienfeld.  Quantum chemistry structures and properties of 134 kilo molecules.  Scientific data, 1(1):1–7, 2014.
  * (33) Lars Ruddigkeit, Ruud van Deursen, Lorenz C. Blum, and Jean-Louis Reymond.  Enumeration of 166 billion organic small molecules in the chemical universe database gdb-17.  Journal of Chemical Information and Modeling, 52(11):2864–2875, 2012.
  * (34) Marta Glavatskikh, Jules Leguy, Gilles Hunault, Thomas Cauchy, and Benoit Da Mota.  Dataset’s chemical diversity limits the generalizability of machine learning predictions.  Journal of Cheminformatics, 11(1):69, 2019.
  * (35) Martin Arjovsky, Soumith Chintala, and Léon Bottou.  Wasserstein GAN.  arXiv preprint arXiv:1701.07875, 2017.
  * (36) Peter Ertl, Silvio Roggo, and Ansgar Schuffenhauer.  Natural product-likeness score and its application for prioritization of compound libraries.  Journal of Chemical Information and Modeling, 48(1):68–74, 2007\.
  * (37) Mohammad Kordzanganeh, Markus Buchberger, Basil Kyriacou, Maxim Povolotskii, Wilhelm Fischer, Andrii Kurkin, et al.  Benchmarking simulated and physical quantum processing units using quantum and hybrid algorithms.  Advanced Quantum Technologies, 6(8):2300043, 2023.
  * (38) Mo Kordzanganeh, Pavel Sekatski, Leonid Fedichkin, and Alexey Melnikov.  An exponentially-growing family of universal quantum circuits.  Machine Learning: Science and Technology, 4(3):035036, 2023.
  * (39) F. Bloch.  Nuclear Induction.  Physical Review, 70(7-8):460–474, 1946.
  * (40) Shu Lok Tsang, Maxwell T. West, Sarah M. Erfani, and Muhammad Usman.  Hybrid quantum–classical generative adversarial network for high-resolution image generation.  IEEE Transactions on Quantum Engineering, 4:1–19, 2023.
  * (41) Maria Schuld, Ryan Sweke, and Johannes Jakob Meyer.  Effect of data encoding on the expressive power of variational quantum-machine-learning models.  Physical Review A, 103(3), 2021.
  * (42) Asel Sagingalieva, Mohammad Kordzanganeh, Nurbolat Kenbayev, Daria Kosichkina, Tatiana Tomashuk, and Alexey Melnikov.  Hybrid quantum neural network for drug response prediction.  Cancers, 15(10):2705, 2023.
  * (43) PyTorch — Machine Learning framework.  https://pytorch.org/, 2022.
  * (44) Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, M Sohaib Alam, et al.  PennyLane: Automatic differentiation of hybrid quantum-classical computations.  arXiv preprint arXiv:1811.04968, 2018.