# Quantum Natural Language Processing: Challenges and Opportunities
## 5 Quantum-Inspired Approaches
### Question Answering  
Another task for which the application of quantum approaches has met with particular success is Question Answering (QA). Differently from information retrieval, a QA task is often composed by a question identified by a piece of natural language contained into a sentence or multiple keywords. Candidate answers are usually shorter than documents in the information retrieval task, hence there is low probability of overlapping between question and answer sentences. For these reasons, approaching the QA task using semantic matching via neural network is very common in the literature. Given this premise, [PERSON]. [57] has proposed to improve the original QLM model designed only for the information retrieval task [53]. A Neural Network-based Quantum-like Language Model (NNQLM) has been developed and applied to the QA task. It utilizes word embedding vectors as the state vectors, from which a density matrix is extracted and integrated into an end-to-end Neural Network (NN) structure. Information about similarities between each question-answer pair is encoded by density matrices in a joint representation. This representation is the source where similarity features are extracted using a Convolutional Neural Network (CNN). The model has been tested on two datasets, TREC-QA, one of the standard benchmark resource for this task [84], and WikiQA [85], an open domain question answering dataset. For the evaluation, the MAP metric has been used, in order to make possible the comparison with previous works for the same task which use same datasets. Several experiments have been conducted to test NNQLM on both datasets. First, it has been compared to QLM, improving performance by 11.87% on TREC-QA, and by 27.15% on WikiQA using the MAP metric (results are shown in Table 2). These results show how positively the combination of the density matrix and the simple training algorithm can impact performance. A further comparison has been carried out between NNQLM and existing neural network-based approaches. The proposed model has achieved higher scores than most baselines (for instance the MAP score of the strong baseline proposed by [86] by 2.46% on WikiQA). However, NNQLM fails to overcome some of the baselines [87,88]. In fact--even if the model is able to learn similarity patterns--it does not take into account aspects such as structures and relations of sentences and this affects the overall performance. This work is continued and extended in [58] introducing Quantum Many-body Wave Function (QMWF) for language modeling (LM) to address QA task. QMWF-LM improves the representation space of QLMs being able to represent complex word interactions, using semantic basis vector corresponding to multiple word meanings. In addition, this word aims to solve the problem of the connection between QLMs and CNN. In particular,QMWF-LM uses a series of derivations based on projection and tensor decomposition to demonstrate that quantum representation and matching can be implemented by the CNN with a product pooling. Based on this assumption, QMWF-LM is presented as an efficient algorithm to represent and match the text/sentence pairs, and is therefore well suitable for QA tasks. QMWF-LM has been tested on different QA datasets; it has proven to be able to outperform quantum LM counterparts (i.e., QLM and NNQLM) and even to achieve better scores, whether compared with traditional CNN-based approaches on same datasets. Datasets taken into account are--similarly to previous works--TREC and WikiQA. Moreover, a third dataset has been added, YahooQA, typically used as benchmark dataset for community-based QA. Although QMWF-LM significantly improves the performance of the original QLM (0.695% MAP with respect to 0.512% on WikiQA) some clarifications should be made. The low performance of QLM is easily explained since--unlike later approaches (NNQLM and QMWF-LM)--it is trained in an unsupervised manner.