The present study aims to explore the feasibility of language translation using quantum natural language processing algorithms on noisy intermediate-scale quantum (NISQ) devices. Classical methods in natural language processing (NLP) struggle with handling large-scale computations required for complex language tasks, but quantum NLP on NISQ devices holds promise in harnessing quantum parallelism and entanglement to efficiently process and analyze vast amounts of linguistic data, potentially revolutionizing NLP applications. Our research endeavors to pave the way for quantum neural machine translation, which could potentially offer advantages over classical methods in the future. We employ Shannon entropy to demonstrate the significant role of some appropriate angles of rotation gates in the performance of parametrized quantum circuits. In particular, we utilize these angles (parameters) as a means of communication between quantum circuits of different languages. To achieve our objective, we adopt the encoder-decoder model of classical neural networks and implement the translation task using long short-term memory (LSTM). Our experiments involved 160 samples comprising English sentences and their Persian translations. We trained the models with different optimisers implementing stochastic gradient descent (SGD) as primary and subsequently incorporating two additional optimizers in conjunction with SGD. Notably, we achieved optimal results-with mean absolute error of 0.03, mean squared error of 0.002, and 0.016 loss-by training the best model, consisting of two LSTM layers and using the Adam optimiser. Our small dataset, though consisting of simple synonymous sentences with word-to-word mappings, points to the utility of Shannon entropy as a figure of merit in more complex machine translation models for intricate sentence structures.
翻译:本研究旨在探索在嘈杂中等规模量子(NISQ)设备上,利用量子自然语言处理算法实现语言翻译的可行性。经典自然语言处理方法在处理复杂语言任务所需的大规模计算时面临挑战,而NISQ设备上的量子NLP有望利用量子并行性和纠缠效应高效处理和分析海量语言数据,从而可能革新NLP应用。我们的研究致力于为量子神经机器翻译铺平道路,未来其可能相较于经典方法展现优势。我们采用香农熵证明,适当的旋转门角度在参数化量子电路性能中发挥关键作用。特别地,我们利用这些角度(参数)作为不同语言量子电路间的通信媒介。为实现目标,我们采用经典神经网络的编码器-解码器模型,并使用长短期记忆网络完成翻译任务。实验包含160个样本,涵盖英文句子及其波斯语翻译。我们使用不同优化器训练模型,以随机梯度下降(SGD)为基础,随后结合SGD引入两种额外优化器。值得注意的是,通过训练包含两个LSTM层并使用Adam优化器的最佳模型,我们取得了最优结果:平均绝对误差0.03,均方误差0.002,损失值0.016。尽管小规模数据集仅包含简单同义句和词对词映射,这仍表明香农熵可作为更复杂机器翻译模型中处理复杂句子结构的性能指标。