Fingerprinting-Based Indoor Localization With Hybrid Quantum-Deep Neural Network

This paper presents an approach for enhancing indoor localization accuracy using a hybrid quantum deep neural network model (H-QDNN). To improve the accuracy of indoor localization based on contemporary techniques, we employ the combined strengths of quantum computing (QC) and deep neural networks (DNN). The strengths of QC, which accelerates the training process and enables efficient handling of complex data representations through quantum superposition and entanglement, were combined with DNN, known for its ability to extract meaningful features and learn complex patterns from data. The proposed model can be trained using small datasets, reducing the need for extensive data, particularly useful in indoor localization, where data collection can be time-consuming and resource-intensive. To evaluate the effectiveness of our proposed approach, we conduct extensive experiments and comparisons with existing state-of-the-art methods. The results demonstrate that the H-QDNN model significantly improves indoor localization accuracy compared to traditional techniques. Additionally, we provide insights into the factors contributing to enhanced performance, such as the quantum-inspired algorithms utilized and the integration of mixed fingerprints.


I. INTRODUCTION
Indoor localization techniques have been extensively studied to address the challenges associated with complex indoor environments.One such technique is fingerprinting, which relies on offline data for accurate online location estimation [1].Various fingerprinting-based techniques have been proposed, utilizing different signals such as Wi-Fi fine time measurements (FTM) [2], time of arrival (TOA) [3], received signal strength (RSS) [4], ultra-wideband (UWB) [5], and channel state information (CSI) [6], [7].However, the accuracy of these techniques can fluctuate due to sensor The associate editor coordinating the review of this manuscript and approving it for publication was Wei Liu.errors, noise, multipath effects, signal interference, and channel inconsistencies [8].Researchers have explored the use of machine learning (ML) algorithms to improve the accuracy of fingerprinting-based techniques [2], [6], [9], [10], [11], [12], [13], [14], [15].Deep neural networks (DNNs) have shown promising results in enhancing localization accuracy among ML algorithms.
DNNs can learn intricate spatial and temporal relationships in the data, enabling accurate positioning [15].However, classical DNNs face challenges such as the vanishing gradient problem and overfitting when applied to non-linear data such as signal fingerprint dataset [16], [17].In order to learn effectively and establish robust models, DNNs usually demand extensive sets of fingerprint data, a task made complex by the difficulty of collecting such data in busy environments [18].Quantum computing (QC) [19], [20] has emerged as a potential solution to the limitations of DNNs.Specifically, quantum neural network (QNN) [20], [21] can leverage the quantum parallelism and quantum entanglement principles of QC to solve problems beyond the reach of classical DNNs [19], [22].Some potential benefits of QNN to fingerprint-based scenarios include learning from fewer data, improved computational speed and run-time, and better coping with noisy data [23].
A. RELATED WORKS DNN-based algorithms [2], [6], [9], [10], [11], [12], [13], [14], [15], [24], [25] have exhibited significant improvements in fingerprinting-based localization accuracy.This progress can be attributed to the effective management of the fingerprinting dataset through multiple layers of representation.However, the requirement of large amounts of data by DNNs could pose a significant challenge when dealing with limited fingerprint datasets.Limited fingerprint data might not represent the entire indoor environment diversity; while data augmentation and transfer learning are effective strategies for working with limited datasets, they come with some drawbacks [26], [27].Recently, there has been an interest in the introduction of quantum ML (QML) algorithms aimed at accelerating specific ML tasks and dealing with more complex structures with fewer real-time datasets [20], [21].
QML algorithms such as variational quantum classifier (VQC) [28], quantum support vector machine (QSVM) [29], and QNN [20] have numerous contributions in coping with the classification and regression problems.The use of QML for sensing and localization is in its initial exploratory stages.QNNs have been studied for decades but are now being considered intensely as applications of near-term QC hardware.The concept of quantum entanglement can help prevent over-fitting by preventing the network from becoming too specialized for the training data [20].Additionally, Quantum parallelism allows QNN to perform multiple calculations simultaneously, accelerating the training process and reducing the need for extensive data [21].
QNN has the potential to alter how computation is performed to address previously untenable problems in fingerprinting-based localization scenarios, including better generalization and representation of the fingerprint dataset.Unlike classical DNNs, which often require large amounts of data and epochs to reach a threshold accuracy and converge to a stationary point, QNN offers the potential for faster convergence with fewer amounts of data.In addition, hybrid algorithms combining DNN and QNN have also been developed to optimize various tasks, such as prediction [30], [31], [32], [33], image generation and recognition [34], [35], and cost function optimization [36].These algorithms have showcased their significance in addressing issues leveraging quantum supremacy, parallelism, and entanglement principles.By merging QC with DNN, it becomes inherently feasible to address challenges characterized by complex input correlations, which might be exceedingly challenging for conventional computing systems [37].
Leveraging the recent advancements in QC [20], [22], [32], [35], this study is intended as an earlier attempt to integrate QC to improve the feature extraction capacity and learning capacity of DNN with a limited fingerprint dataset.This research aims to construct a fully connected hybrid quantum deep neural network (H-QDNN) model for enhancing localization accuracy.Our proposed model employs a method based on QCs, diminishing complexity by minimizing the count of variational parameters.We can further reduce the model's complexity by applying multiple qubit gates to neighboring qubits to uncover the hidden state and specifically apply the NOT gate operation.To evaluate the effectiveness of our proposal, we conduct experiments using a real environment comprising a limited time of flight (TOF) and RSS fingerprints collected with low-cost devices.

B. CONTRIBUTIONS
The key contributions of this study are as follows.
1) Motivated by the latest progress in QNNs [20], [22], [32], [35], this study represents one of the preliminary efforts to employ QNN approaches in localization contexts.To the best of our knowledge, this paper is the first to introduce the concept of H-QDNN in fingerprinting indoor localization.2) We propose an H-QDNN model that improves the DL feature extraction capacity, which is highly desired for better generalization and representation of the fingerprint dataset.The proposed H-QDNN is designed to leverage the superposition capability of QNN in both the preparation of input states and the representation of DNN feature mapping.This approach effectively minimizes the utilization of quantum bit resources.

3) We developed two different architectures of H-QDNN.
A multi-layered H-QDNN was initially constructed, drawing inspiration from [38].Subsequently, we incorporated a gradient descent mechanism, based on insights from [39], to optimize the model.This model could potentially obviate the necessity for large fingerprint data while maintaining impressive trainability.Remarkably, it achieves rapid convergence, surpassing specified accuracy benchmarks within a minimal epoch count.The remainder of this paper is organized as follows: Sec.II provides a comprehensive review of preliminaries on quantum computing.Sec.III presents the methodology and framework of our proposed model.Sec.IV describes the experimental setup.Sec.V presents the results and discusses the findings, highlighting the advantages of QNNs in indoor localization.Finally, Sec.VI concludes the paper and suggests potential avenues for future research.

1) NOTATIONS
The trace operator is represented as tr(•), while the Hadamard product is symbolized by ⊙.The symbols |•| and ∡• correspond to amplitude and angle, in that order.In the context of quantum computation, the quantum state vector within a Hilbert space uses the Dirac [40] notation, given by |•⟩.The Kronecker product operation is signified by ⊗.The expected value of an operator in the quantum state |ψ⟩ is expressed as ⟨ψ| |ψ⟩.Bold lowercase letters depict vectors, while bold uppercase letters represent matrices.The component found at the intersection of the i-th row and j-th column in the matrix A is denoted by [A] i,j .Similarly, [p] i points to the i-th component of the vector p.The sub-indices i, j cover all elements from i to j.By default, all vectors are considered column vectors unless specified differently.

II. PRELIMINARIES
Quantum computing (QC) represents a transformative change in the realm of ML, offering capabilities beyond traditional ML systems.Gaining a deep insight into QC requires a solid grasp of its fundamental concepts.In this section, we will review some preliminaries to understand the concept of QC.
A. BASIC CONCEPTS OF QC 1) QUANTUM BIT In QC, the fundamental unit for information storage and processing is the quantum bit, or qubit, analogous to the binary bit in traditional computation.A qubit possesses two primary states, denoted as |0⟩ and |1⟩.These states correspond to a two-level quantum system's ground and excited states.However, unlike the classical bit that can only take one value at any time, qubits state can be |0⟩ or |1⟩, and a probabilistic mixture of |0⟩ and |1⟩, called superposition [22].

2) QUANTUM ENTANGLEMENT
Quantum entanglement refers to the fact that two quantum particles can become linked so that their states depend on each other, even if large distances separate them.Suppose we have two qubits, labeled as qubit A and qubit B. The state of a single qubit can be represented using the Dirac notation as Where α, β, γ , and δ are complex probability amplitudes that determine the quantum state of each qubit.Entanglement occurs when the combined state of the two qubits cannot be factored into separate states for each qubit.This joint state is represented as: Equation ( 4) illustrates the mathematical representation of quantum entanglement and its implications on the behavior of entangled particles.This state indicates that qubits A and B are in a superposition of both being in the |0⟩ state and simultaneously being in the |1⟩ state.
3) QUANTUM GATES Quantum gates are the operations performed on qubits to manipulate their states [32].Given a QS |ψ⟩ and a quantum circuit with a sequence of gates represented by the unitary operators U 1 , U 2 , . . ., U m , the evolution of the state through the circuit can be written as, where |ψ ′ ⟩ is the final state of the circuit.Further details of commonly used quantum gates are presented in APPENDIX A VI, on page 13.

B. QUANTUM MEASUREMENT
To extract this information in QC, quantum measurements must be executed [38].Consider, for instance, undertaking a projective measurement on a qubit in state |φ⟩ = α|0⟩ + β|1⟩ using the observable M.This results in outcomes of 1 with a probability of p(1) = |α| 2 and −1 with a probability of p(−1) = |β| 2 .Post-measurement, the QS transitions instantaneously to |0⟩ or |1⟩.It's crucial to understand that these measurement outcomes are inherently probabilistic; a single measurement yields only one potential result in line with its associated likelihood.Hence, multiple measurements are essential to attain a more comprehensive understanding of the state.The expected value for a particular measurement observable M on the state |φ⟩ can be defined as: where M ≡ 1 0 0 −1 .

C. DATA ENCODING
This section presents two classical data encoding methods in QC.

1) ANGLE ENCODING
Referred to as qubit, tensor product, or angle encoding, this method facilitates efficient operations due to its inherent 142278 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
parallel processing capabilities, which operate consistently regardless of data volume [20].Nevertheless, the number of qubits needed scales with the data size, with each input vector component demanding a single qubit.Such an encoding strategy is highly advantageous, given that it necessitates the rotation of only one qubit.The most commonly used method in some literature is applying a feature map x i → cos x i 2 |0⟩ + sin x i 2 |1⟩ using the R Y (θ ) rotation operator as shown as in (7), 2) AMPLITUDE ENCODING The amplitude encoding approach offers the benefit of requiring only n = log(N ) qubits to represent an input with N features.By doing so, this method effectively reduces the number of qubits and subsequently decreases the circuit parameters.For example, given a classical vector, T , amplitude encoding can be employed to encode the classical vector into an n qubit QS expressed as:

III. PROPOSED H-QDNN FOR FINGERPRINTING-BASED LOCALIZATION METHOD
In this section, we outline the procedure to realize the proposed Hybrid Quantum-Deep Neural Network (H-QDNN) as depicted in Figure 1.The H-QDNN is designed with a focus on refining fingerprinting-based indoor positioning, integrating QNN and DNN techniques for superior results.

A. MEASUREMENT MODEL
Considering a 2-dimensional indoor environment that consists of L transmitter, also known as anchors, and an unknown receiver device operating on an IEEE 802.15.4 Wi-Fi card, otherwise known as tags.We have defined the true and known location of the anchors as l l ∈ R 2×1 , l = 1, . .., L where the true but unknown location of tag is defined as p ∈ R 2×1 .Generally, the measurement techniques in the anchor-tag communication system are classified as ranging, timing, and/or the RSS between the anchors and tag [41].This paper considers the fusion of TOF and RSS fingerprints in constructing our dataset.The measurement procedure starts with a normal TWR exchange comprising a poll and response messages.
After obtaining the response message, the tag returns a concluding message to the anchor.The response delays, denoted as τ , are constants established beforehand.The round-trip time (RTT), represented by γ , is derived from the timestamps of the recorded messages.Therefore, the Time of Flight (TOF) is determined as outlined in [42].
where l denote the measured TOF of the l-th anchor.τ l and τ t are the reply delays of the l-th anchor and tag respectively, while γ l and γ t represents the RTT of the l-th anchor and tag respectively.The ranging measurement between the tag and an l-th anchor is modeled as, where λ denotes the speed of light, and ω l the ranging noise corresponding to the l-th anchor with a zero mean Gaussian distribution, ω l ∼ N 0, σ 2 ω l .On the other hand, RSS ranging is based on the principle that the greater the distance between the anchor and tag, the weaker their relative received signals.The measured RSS is modeled as, where l denote the recorded RSS between the l-th anchor and tag.p o signifies the power received at a reference span d 0 .The true distance between the tag and the l-th anchor is represented by d l = ||p−l l ||.The term ε l captures the extra path loss due to Non-Line-Of-Sight (NLOS) propagation.The path-loss exponent is given by ρ.Lastly, the inaccuracies in measurements, which follow a Gaussian distribution with zero mean, are denoted by ϕ l .

B. FINGERPRINTING
The fingerprinting process is conventionally divided into two stages: the offline and the online phases.To construct the dataset, signal readings are used to produce the feature vector x k at every reference point k.Specifically, for K reference points (RPs), x k stores the features corresponding to the location coordinates of the reference point where k,l and k,l are the ranging measurement corresponding to reference TOF and RSS between the tag and an l-th anchor at the k-th reference point from l = 1, . . ., L anchors.During the online phase, we measure a signal at an unknown location with the characteristics, where l , and l are the measurements corresponding to the TOF and RSS taken at an unknown tag location for l = 1 . . .L anchors.circuits, visually represented in Figure 2. Compared to the basis encoding technique, the amplitude encoding method, delineated in II-C2, offers superior qubit efficiency.Given its prevalence in many contemporary QML algorithms, as evidenced in [34] and [44], our research chose to adopt the amplitude encoding technique.
In the initial phase of state preparation, as depicted in Figure 2, the task is to instruct the simulation circuit to metamorphose the starting state |x in ⟩ into |1⟩ ⊗n .It's crucial to highlight that this operation unfolds within a classical simulation.For any provided state |x k ⟩, this results in a distinct assortment of gate parameters, denoted by θ.The corresponding loss function is articulated as 142280 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.where ⟨M i ⟩ represents the expectation of the M measurement taken on the i-th qubit.Hence, the training process entails an iterative assessment of the loss function, adjusting parameters through a gradient descent approach to minimize (14).Suppose the loss function is minimized to a value of −1.This would indicate that all measurement expectation values equal −1, ensuring that the circuit's final QS, right before measurements, is e iφ |1⟩ ⊗n .This observation elucidates that the circuit undertakes the transformation: |1⟩ ⊗n .In the subsequent phase, we employ the parameters θ * to design a reverse circuit on a quantum processor, with P(φ) denoting the phase gate.This reverse circuit enacts the transformation U ′ (θ ) = U θ * † • I ⊗n−1 ⊗ P(φ) • X ⊗n on the initial state |0⟩, leading to the production of the desired quantum state |x k ⟩.

2) LEARNING AND OPTIMIZATION OF H-QDNN
This section elucidates the methodology for constructing QNN layers employing the hybrid quantum-classical framework prevalent in numerous NISQ quantum algorithms [30], [34], [45].The H-QDNN algorithm is segmented into two main components: the quantum and the classical.The quantum component utilizes parameterized quantum circuits (PQCs) to prepare quantum states via quantum processors.Conversely, the classical part optimizes the parameters of the PQCs through classical computers.The proposed H-QDNN model illustrated in Figure 3 incorporates five pivotal components: data preparation, data encoding, unitary transformation, entangled state measurement, and classical postprocessing.Further details can be found in Appendix VI.
A unitary transformation is applied after the input data has been encoded via the state preparation process, as detailed in Sec.III-C1.This transformation, which constitutes the third part of our model in Figure 3 where f θ (x k ) is the model output for input x, and p k is reference k-th location, for k = 1, . . ., K RPs.
We then optimized the weights of the model using gradient descent.We updated the weights in the direction of the negative gradient of the cost function, where η is the learning rate and t is the training epoch.
To compute the gradient of the cost function, we use the parameter-shift rule, which allows us to estimate the gradient using only circuit evaluations.Specifically, we evaluated the circuit U (θ + π 2 v) and U (θ − π 2 v), where v is a binary vector that specifies which weight to shift.The gradient can then be estimated as, where v i is a binary vector with a 1 in the i-th position.
We repeat this process until the cost function converges to a minimum, indicating that the H-QDNN has learned to accurately predict the outputs for the given fingerprinting inputs.The H-QDNN parameters setting as implemented are summarized in Table 1.

IV. EXPERIMENT DESCRIPTION
This section provides a detailed overview of the experimental design, highlighting the equipment used, the configurations set, and the methodologies employed during our signal fingerprint acquisition phase.

A. MEASUREMENT CAMPAIGNS
The experiments were conducted at Hanyang University, Korea, spanning multiple locations and structures to ensure comprehensive data collection.The first experiment was conducted at the Wireless Systems Laboratory (WSL), popularly known as the 5G/Unmanned Vehicle Convergence Technology Research Center.The experiment was conducted in a controlled indoor environment during working hours, where there were normal human activities to emulate realworld scenarios.The WSL environment in Figure 4 has a dimension of 15.7 m by 12.4 m.Obstacles and potential non-line-of-sight (NLOS) elements, such as furniture and walls, are visually represented within the testbed area.The setup in WSL included six Pozyx UWB-based creator kit anchors (APs) and a tag for reference data collection.The anchors and tag were mounted at 2.8 m and 1.14 m above the floor respectively.These heights were carefully chosen to minimize interference and optimize signal propagation for reliable distance measurements.The RPs were spaced at regular intervals of 1.2 m to ensure comprehensive coverage and accuracy.Another phase of the experiment was conducted on the 8-th floor of the Information Technology & Bio-Technology building.This location, referred to as ITBT in this study, was selected based on its distinct structural attributes.With a vision for realism, we meticulously mapped out the testbed, considering the exact locations of walls, doors, and other potential barriers.The research was extended to the 5th floor of the Fusion Tech Center building, denoted as FTC in this work.Like the ITBT location, the FTC floor was chosen after a thorough assessment of its architectural nuances.Both the ITBT and FTC environments are particularly active during working hours, with regular human movements and activities,  ensuring a dynamic testing ground.The ITBT and FTC measurement sites are depicted in Figure 5 and 6 respectively.

B. DATASETS
We collected datasets following predetermined trajectories during the measurement campaigns, for the RPs illustrated in Figure 4, Figure 5, and Figure 6.A set of paper tags were positioned on the floor to establish a set of RPs.A total of three distinct datasets from three different locations were collected in his work.The data samples comprised a timestamp, tag, and detected APs IDs represented by their MAC addresses, RSS values, TOF values, and radio channel numbers.Each data sample was also associated with a corresponding ground truth position obtained from the Tag's accurate positioning.The inclusion of the ground truth position served as an RP for determining the localization accuracy of the system.To ensure the reliability and generalization of the ML localization model, separate trajectories were used for training and testing.Furthermore, 75 % of the total training data was used to train the model, while the remaining 25 % was set aside for validation.This approach is commonly employed to assess the model's performance on unseen data and accurately verify its ability to estimate positions in realworld scenarios.

1) WSL DATASET
The WSL dataset was compiled by accumulating 100 samples at each RP, resulting in approximately 4920 total samples from all six Pozyx APs.These samples were gathered using a diminutive trolley that was manually maneuvered along the trajectories at an average pedestrian velocity of approximately 1 m s −1 .A specially crafted Python program was used to collect data samples.The layout of the WSL as depicted in Figure 4 has 66 RPs for training data, and 18 testing points (TPs) for testing data, involving some RP/TP overlapped points.

2) ITBT AND FTC DATASET
The setup in ITBT included six BLE beacons sourced from Estimote Inc. and an additional eight BLE beacons sourced from Hyunseung Korea Inc.These beacons served as anchors (APs) for transmitting signals across the testbed, and a tag for reference data collection.Similarly, the set-up in the FTC site included eleven BLE beacons sourced from Hyunseung Korea Inc. Samsung Galaxy S8+ (referred to as SAMSG) and LG G8 ThinQ (referred to as LG) smartphone devices were used as tags for RSSI data collection in the ITBT and FTC datasets in order to build a more robust dataset.To facilitate the collection of RSSI data, a proprietary application was developed by the researchers in this work.As shown in Figure 5, a total of 126 RPs and 57 TPs were established during the data collection process in ITBT.While the FTC measurement featured 327 and 69 RPs and TPs, respectively.The key parameters of our measurement set-up used in this work are summarized in Table 2.

V. RESULTS AND DISCUSSIONS
In this section, we detail the experimental results and subsequently analyze their broader implications and relevance to this research.

A. HYPER-PARAMETER TUNING
An essential aspect of optimizing the performance of the model is hyperparameter tuning.Hyperparameter tuning involves systematically adjusting these parameters to find the combination that yields the best performance for the given task.Our investigation focused on several key hyperparameters, including validation and training loss, test loss, and test accuracy.We trained the H-QDNN model with parameters summarised in Table 1.In the first set of iterations, the hyperparameters of Adam are set to be η = 0.01, β 1 = 0.9, β 2 = 0.999.In the later iterations, we change η to 0.001.The loss function values on the training set and validation set are shown in Figure 7.
The accurate rate of this H-QDNN on the test set rises to 97.29 % after training.Figure 7   enhancing accuracy.Validation and training loss are critical indicators of our model's performance and convergence during training.By carefully adjusting parameters related to these losses, we trade-off between preventing overfitting (high training loss, low validation loss) and underfitting (low training loss, high validation loss).After obtaining validation accuracy curves, we can easily calculate the average validation accuracy curve for our proposal and baseline models.The effective epochs for the DNN, DNN with dropout, and H-QDNN models are 5, 15, and 20, respectively.This is because the models' accuracy does not increase beyond a certain point and remains constant, as shown in Figure 8.
Figure 8 proved that H-QDNNs have more representation power than classical DNNs and still keep most of the advantages of the classical DNNs.The models depicted in Figure 8 were initially executed using three distinct learning rates and separate batch sizes.Optimal results were achieved using a learning rate of 0.001 and a batch size of 10.The training was conducted on the designated training dataset, saving weights corresponding to the minimal training loss.Subsequently, the performance was assessed using the labeled test dataset.Due to the utilization of a classical simulator on a desktop PC for quantum computation, only H-QDNNs with a limited number of qubits can be employed, thus limiting the demonstration to simpler examples.
The peak testing accuracy attained by H-QDNN was 97.29 %, whereas DNN and DNN with dropouts achieved testing accuracies of 81.01 % and 85.29 %, respectively.The comparison of the computed loss values can be seen in Figure 9.It is evident from the results that the proposed H-QDNN model boasts the least training loss at 0.02, followed by DNN with dropout at 0.18, and the DNN model at 0.21.Given that the H-QDNN records the highest test accuracy and the minimal test loss, it is evident that the quantum algorithm is more proficient in regression tasks compared to its classical counterpart, especially when working with constrained datasets.

B. LOCALIZATION PERFORMANCE
This section compares the proposed H-QDNN model, which employs RSS and TOF measurement, against three stateof-the-art localization techniques.The classical DNN [16], classical DNN with dropouts [46], and the Euclidean-based K-Nearest Neighbour (ED-KNN) [47] were chosen as benchmark localization methods.Each of these methods offers a distinct approach to both the measurement process and the subsequent localization.For our simulations, we assume the absence of quantum noise for simplicity.Multiple rounds of data collection were conducted.To ensure a fair comparative analysis, the benchmark methods were fed the same measured dataset as that used by our proposed model for location estimation.Specifically, we used the fingerprint dataset acquired in the same measurement round to train and validate the models.As for assessing the performance efficacy of these models, data from a subsequent measurement round was employed for testing.

1) EMPIRICAL LOCALIZATION ERROR
We describe our findings regarding the empirical cumulative distribution function (CDF) of positioning MSE and the 1-σ (68 %) and 2-σ (95 %) error values, commonly utilized in indoor positioning research as important performance measures.For the WSL dataset, the empirical CDFs of localization errors using RSS-standalone, TOF-standalone, and fusion of RSS and TOF, as well as the performance of the baseline method, are shown in Figure 10.The TOF-standalone fingerprint performed better for the classical DNN and DNN with dropouts, indicating that the TOF information played a more critical role in enhancing the localization performance than the RSS measurements.On the other hand, the measurement fusion of RSS and TOF fingerprints resulted in the best estimation results for the ED-KNN and the proposed H-QDNN.These findings provide valuable insights into the strengths and weaknesses of each measurement and shed light on their compatibility with different localization techniques.
Figure 11 compares the performance of various algorithms in terms of best-performing measurement.The best case for the ED-KNN was obtained with the fusion of RSS and TOF but for the ED-KNN algorithm.ED-KNN, when employing both RSS and TOF, performs slightly below the proposed method but still showcases a strong result.The standalone TOF measurements using both the Classical DNN and the Classical DNN with dropout show similar performance, with the dropout variant being slightly less effective.Despite the relatively good performance of the classical DNNs, our Proposal using the fusion of RSS & TOF offers the best performance, with the most rapid rise in CDF, implying the lowest localization errors for a significant portion of the data points.From the results shown in Figure 11, fusion measurements, particularly the combination of RSS and TOF, seem to offer superior performance compared to standalone measurements.
To ensure accurate context and facilitate meaningful comparisons, we have condensed the outcomes, juxtaposing the localization accuracy of the optimal fingerprints with the estimations derived from Figure 10, as depicted in Figure 11.We equally summarized the results for better context in Table 3.In comparison with the best baseline methods for the 1-σ and the 2-σ localization error, the H-QDNN improved the localization accuracy by approximately 61 % and 64 % respectively.
The H-QDNN method, combining RSS and TOF fingerprints, outperformed all baseline methods, delivering a remarkable 1-σ localization error of 0.71 m and a of 1.20 m.The results further demonstrate the advantages of measurement fusion of RSS and direct and robust TOF measurements with temporal information in the location.Figure 12 presents the empirical CDFs of localization errors from both ITBT and FTC datasets.It also displays the performance of the baseline methods.We benchmarked our proposal against the classical DNN [16], classical DNN with dropouts [46], and the ED-KNN [47] localization methods.For each method, four results are illustrated, representing different environments and data collection devices: FTC-LG, ITBT-LG, FTC-SAMSG, and ITBT-SAMSG.
As shown in Figure 12, using the ED-KNN method, the CDF of the FTC-LG stands out when compared with the FTC-SAMSG for the same dataset, indicating that the LG device achieves a lower error than the Samsung device.For the ITBT dataset, the ITBT-SAMSG performed better than the ITBT-LG which lagged behind across different MSE values.Moving on to the analysis of the other methods (DNN, DNN with dropout, and our proposed method), a similar trend with the ED-KNN regarding the performance of the datasets is established.Since the FTC-LG dataset and the ITBT-LG dataset had the best performance for the two locations, we then show the performance comparison of all the algorithms with the FTC-LG and ITBT-LG datasets in Figure 13.From the results shown in Figure 13, for the FTC-LG dataset and ITBT-LG dataset, our proposal Shows a rapid increase, indicating good performance with low error rates for many data points.DNN with dropout, classical DNN, and the ED-KNN follow behind our proposed method in that order.Our Proposal performs exceptionally well in both FTC-LG and ITBT-LG scenarios, the ED-KNN consistently ranks last in terms of performance among the given methods.Our proposed method seems to be quite effective, with the performance hierarchy remaining consistent across both scenarios (FTC-LG and ITBT-LG).We summarized the results for better context in Table 4.

2) EFFECT OF SAMPLE SIZE
Finally, we analyze the impact of different sample sizes on the localization error.We focus on investigating how varying the number of samples affects the accuracy and precision of our model in comparison with baseline methods.This analytical provides a intricate of the intricate relationship between training sample counts and the resultant accuracy achieved.To achieve this, we conducted a thorough examination across a range of sample sizes, specifically analyzing the effects at 25 %, 50 %, 75 %, and 100 % of the training data.Figure 14 and 15 offers a comprehensive visual representation of our performance evaluation across varying training samples.A consistent trend can be seen in Figure 14 and 15, revealing a direct correlation between the augmentation of training sample quantities and the subsequent enhancement in localization accuracy.
Among the compared models, Our-Proposal often exhibits the lowest MSE especially when fewer percentage of the training samples, suggesting it is the most accurate.The DNN with dropout model performs competitively, particularly at 100% training samples.The inclusion of dropout, a regularization technique, appears to enhance the model's ability to generalize, evident when juxtaposed against the Classical DNN.This analysis not only emphasizes the pivotal role of sample training data but also accentuates how the choice The proposed H-QDNN method, which showed its ability to adapt to different fingerprint types, and fewer amount of training samples, holds great promise for achieving high localization accuracy.The superiority of our proposal in terms of localization accuracy highlights the significance of leveraging quantum entanglement and parallelism, accelerating the training process and reducing the need for extensive data.Our findings further underscore the distinct advantages that quantum techniques bring to indoor localization.This performance makes H-QDNN a suitable candidate for data-driven localization scenarios where the complex and dynamic nature of the environment requires robust and accurate techniques.

VI. CONCLUSION
In our study, we introduced a hybrid quantum deep neural network model aimed at enhancing the precision of indoor fingerprinting-based localization.Our proposed method was implemented using standalone measurements and fusion of the RSS and TOF datasets generated from low-cost devices.The advantage of using QML over classical ML algorithms is its ability to take advantage of quantum parallelism, which can lead to faster and more efficient training and inference times.The proposed H-QDNN model can be trained using small datasets, particularly useful in indoor localization, where data collection can be time-consuming and resourceintensive.However, some challenges still need to be addressed, including the large-scale deployment concerns and environmental effects on accuracy.Converting classical data to quantum might lose information due to expressiveness limits and complex superposition state formulation.The quantum network's backward-forward mechanism and this paper's gradient descent can be enhanced, with QCs potentially boosting convergence.PQC [48] functions in a way that resembles a conventional DNN, featuring adjustable parameters embedded within the circuits.Just as a traditional DNN consists of numerous layers, a PQC can be constructed by repeating a unit layer several times.A PQC can be expressed as a trainable unitary operation U θ on an n qubit state, enacted upon a reference state |φ⟩, generally represented as |0⟩ ⊗n .The trained variable is |φ θ ⟩ = U θ |φ⟩, where θ symbolizes a vector encompassing a polynomial number of circuit parameters.In this arrangement, a single-layer unit comprises single-qubit tasks followed by entangling actions involving two qubits.The overall unitary structure employs small and effective local gates like CNOT, CZ, and rotation gates as its foundational elements, with the circuit parameters governing the phases of rotation gates.A PQC, designed with parametric gates, assumes the form: U j θ j (23) where U j θ j symbolizes a rotation gate defined as exp −i θ j 2 H j , and H j corresponds to either a 1-qubit or 2-qubits gate.

APPENDIX C SGD OPTIMIZATION
As gradient-focused optimization methods are used for traditional DNNs, we introduced an SGD algorithm [48] tailored for our H-QDNN model.Similar to adjusting weights in standard DNNs, the quantum gate parameters within the H-QDNN model need tuning.The main objective of SGD for H-QDNN is to modify these parameters using the loss function's gradients to achieve the right mappings.To undertake this optimization, it's imperative to determine the loss function gradients with respect to quantum gate parameters.Subsequently, a quantum-oriented SGD approach can be utilized.The analytical gradients for quantum circuits can be derived using both the chain rule and the parameter-shift principles [49].
Assuming the loss function, denoted as ℓ θ , depends on the expectation values represented as{⟨k⟩ θ } K k=1 .The chain rule allows us to write the partial derivative ∂ℓθ ∂θ j in terms of these expectation values and their corresponding derivatives, ∂⟨µ k ⟩ θ ∂θ j .The parameter-shift principle suggests that in qubit-based quantum computing, the derivatives related to quantum expectation values can be illustrated as a mix of expectation values from related quantum circuits: The term ⟨µ k ⟩ θ ± π 2 e j signifies a modification in the i-th parameter of the primary circuit by a value of π 2 to obtain its matching expectation value.This technique of calculation is not only precise but also compatible with NISQ devices.Once gradients are available, the SGD optimization process can be structured.Throughout each cycle, a sample from the training data is chosen to evaluate the loss function, after which the parameters are updated based on learning rates and gradient values.

FIGURE 1 .
FIGURE 1. Architecture of the proposed H-QDNN fingerprinting-based localization method.

FIGURE 3 .
FIGURE 3. Schematic diagram of the end-to-end QNN model.

1
, makes use of Hadamard gates, single-qubit rotation gates, and entanglement gates.These gates are instrumental in completing the quantum states' transformation and entanglement.Following the measurement of the quantum state, the expectation values of certain Hamiltonians are obtained and then transferred into the post-processing component of the model.The learning procedure of the proposed H-QDNN is summarized in Algorithm 1.To train the H-QDNN, we use the Algorithm Learning and Optimization Algorithm Input : TOF and RSS signal 1 Initialize: Fingerprinting radiomap; 2 TOF and RSS signal collection for each RP; 3 Amplitude encoding |x k ⟩ to |1⟩ ⊗n (Sec.III-C1); 4 Apply PQC to the input quantum state to produce new entangled state |x k ⟩ = U (θ) |x k ⟩; 5 Define L(θ ), such that θ * = argmin θ (L(θ )), where F(θ) is the expected value of some Hamiltonian, |x k ⟩ (θ )|M| |x k ⟩ (θ )⟩; 6 Then L(θ ) may be evaluated by repeatedly preparing |x k ⟩ (θ )⟩ and measuring M; 7 Loss function computation using (15); 8 Perform gradient descent using (16); 9 Repeat the procedure until θ converges; mean-square-error (MSE) as a cost function to measure the discrepancy between the model predictions and the true outputs,
verifies the convergence of the H-QDNN network and that the training and validation costs decrease with the training epoch.The loss for the H-QDNN model starts to stabilize after 15 epochs.This stabilization can be attributed to the swift convergence of the QNN.It requires fewer epochs to stabilize its loss function,

FIGURE 8 .
FIGURE 8. Comparison of testing accuracy of all models.

FIGURE 9 .
FIGURE 9. Comparison of testing loss of all models.

FIGURE 10 .
FIGURE 10.Localization error with standalone and combined fingerprints for WSL dataset.

FIGURE 14 .
FIGURE 14.Effect of different number of samples on WSL.

TABLE 4 .FIGURE 15 .
FIGURE 15.Effect of different number of samples on FTC and ITBT.