An efficient quantum based D2D computation and communication approach for the Internet of Things

The Internet of Things is made up of a set of embedded devices such as light detection sensors, ranging (LiDAR) sensors, and millimetre-wave sensors. These sensors generate a massive amount of data in which limited communication capacity is available to share a massive amount of data to Fog-based Roadside Units (RSU) for data process and analysis service. Fog-based RSU has become an emerging paradigm in intelligent transportation but needs research attention to design intelligent decision-making methods for data communication and computation at Fog-based RSU. To address these issues, we design a two-level Quantum based D2D Computation, Communication (QDC2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$QDC^{2}$$\end{document}) approach. First, design a bandwidth allocation strategy based on spatial importance score factors to resolve embedded devices’ data transmission issues. Second, design an adaptive equilibrium service offloading strategy based on device-centric measurements to assess the computation capacity and performance rate for resolving Fog-node computation consistency issues. Additionally, Fog-based RSU is interconnected with LAN helps to optimize service latency. Simulation results show that our approach achieved a high service reliability rate (79.56%), low error rate (0.9%), and an execution delay of 22.5 s for 15 devices compared to state-of-the-art approaches.


Introduction
In Information and Communication Technology (ICT), the Internet of Things (IoT) is an emerging paradigm to fulfil the Industry 4.0 requirements. Recent AI-IoT frameworks impact the cost, performance and energy efficiency of IoT devices, network technologies (such as 4G and 5G) (Pham et al. 2020), and distributed computing architectures that led to the explosive growth of edge-service reliability rate. Specifically, new distributed applications related to transportation, healthcare, automated vehicles, cloud robotics, smart homes and cities, video surveillance and streaming require edge computing orchestration to achieve low latency (He et al. 2018). It led to unprecedented growth in data and latency, which demands inadequate resources to handle and manage data. It is a global challenge to optimize resource consumption. The new distributed applications may be bandwidth-hungry (video surveillance, video conferencing, traffic monitoring), latency-critical (automated vehicles, robotic surgery, safety). The edge applications require high data availability, service reliability, and low latency to meet the requirements of time constraint service execution. Large-scale deployment of industrial IoT devices is expected to play a vital role in the development of smart cities, which will generate large volumes of aggregated cellular data that may choke the network (Qiu et al. 2020). Road Side Units (RSUs) aim to serve computational and communication services towards vehicles/devices under their coverage (Zhao et al. 2020). The high computation required services offloaded to cloud-server for effective execution. The asymmetrical load distribution requires an adaptive workload manager to balance overloaded RSUs to enhance the system performance and service quality. In this regard, three-tier architecture has to be designed for vehicle infrastructure to achieve low latency. Roadside LiDAR denotes sensor deployment to monitor the fixed region of interest, such as deploying on a roadside pole. Fog computing is assumed to be the eminent solution to formulate the issues by accommodating the limited cloud services near to the framework as depicted in Fig. 1.
Research motivation The Fog devices are interconnected with LAN, which helps to minimize the latency due to consistent data availability, demand-based service offloading, and annoying computation resources. Service offloading, bandwidth resource allocation are dependent on the computation capacity of Fog-server. The computation services require a set of feature selection and classification services to enhance data accuracy, impacting the consumption of computation resources. Since the edge devices generate enormous data that demand heterogeneous computation resources, it is challenging to process with classical computing to meet time-sensitive application requirements and service offloading, bandwidth allocation among fog devices that are geographically distributed.
Limited resource capacity causes offloading the service to another suitable Fog-RSU device based on computing and communication capacity characteristics to accomplish low latency and high data quality. In this regard, incorporating quantum computing mechanics based on quantum theory to formulate our objective with a highly scalable and reliable service rate.

Quantum theory overview
In classical computer, the memory unit state represents with binary bits (0 or 1); in Quantum Computing (QC), quantum bit (q − bit) holds a unit of information like a classical bit, but the state could be 0, 1, or in a quantum linear superposition of both and it is represented as �0⟩ + �1⟩ . The quantum states are represented as �0⟩ , �1⟩ and a pair of complex numbers ( , ) is formulated as | | 2 + | | 2 = 1 (Kudrow et al. 2013). The probability of state − 0 and state − 1 refer as | | 2 , | | 2 , respectively. A qubit (q − bit) with n-size which holds 2 n types of states and we observe in Eq. 1 For instance, a quantum individual with 3 (q − bits) is described with Eq. 2 It is formulated as: It refers that, the estimating probability of the states are �000⟩, �001⟩, �010⟩ ,  �011⟩, �100⟩, �101⟩ , �110⟩, �111⟩ are 3  16 , 1  16 , 3  16 , 1  16 , 3  16 , 1  16 , 3  16 , and 1 16 , respectively. For instance, consider single value and the q-bit normalization is as follows Accordingly, Hence, the q-bit is normalized and valid, but three q-bits together can formulated as follows.
As per Eq. 2 The probability of three queue-bits is In Bhatia and Sood (2020), quantum computing-inspired optimization methods have been designed to maximize the data accuracy by assessing the sensor characteristics such as sensor vicinity and sensor space. The performance is measured by resolving vehicular routing problems based on WiSense nodes, and quantum simulators. The nemours data computing issues can be resolved to achieve data accuracy (by selecting feasible feature set and classification mechanism), service offloading (by designing a novel decision system), and resource allocation per the demand. In this regard, there is a scope to design Quantum based D2D Computation, Communication ( QDC 2 ) approach and the main contributions are listed as follows.
1. Design an adaptive equilibrium service offloading strategy based on device-centric measurements to assess server computation capacity to minimize the computation delay. 2. Design a bandwidth allocation strategy based on spatial importance score factor to resolve data transmission delay. 3. Analysing MATLAB and FogSim simulation results to assess service reliability and system performance accuracy.
The rest of the paper is arranged as follows. Section 2 reviews the related works on rangefree localization technologies. The system model is presented and the proposed localization algorithm is detailed described in Sect. 3. Experimental results and discussions are given in Sect. 4. Finally, Sect. 5 describes conclusions and possible future work.

Related work
This section describes the recent works related to our paper objectives, which are formulated as follows Most researchers concentrated on designing resource allocation strategies. In Shakarami et al. (2021), the designed framework enables cloud server support to execute high computation required services based on the offloading scheme. In Bi et al. (2021), the above architecture has been considered, but during offloading strategies design, they used several active neighbours data, social trust and a few more. Consequently, the authors also have designed offloading service policy among server-to-server and few security optimization models (Mehmood et al. 2022;Kagita et al. 2021;Senthilkumar et al. 2021) have been designed for effective device-server communication. In Deng et al. (2021), a naive Bayes based Support Vector Machines (SVM) method has been designed for practical computation and communication among servers and devices. However, the above methods and models are not suitable for dynamic frameworks because they need offline data to train the model.
In Liu et al. (2016), quantum-based spatial-temporal service execution strategy for cloud environment based on novel designed prediction model through kernel-based machine learning algorithm. They were estimated service execution duration and space occupation parameters before assigning the service and has achieved 26.7% enhanced performance than existing methods. In Li et al. (2017), the Quantum-behaved particle swarm optimization (QPSO) approach has been designed to enhance the performance of particle swarm optimization (PSO) with low computing cost to meet time-constraint application requirements. They were considered quantum gates and operations during the optimization process. In Dai et al. (2017), the Quantum-based particle swarm optimization method has been designed to allocate the resources, and they were concentrated on minimizing the iterations to achieve a high optimal rate.
In Ghorpade et al. (2021), a crossover quantum particle swarm optimization algorithm has been designed for non-uniform IoT node deployments based on node density and node coverage. The differential evaluation operator and crossover operator have been used to achieve high precision coverage. In Kumar et al. (2020), a Quantum-inspired green communication framework for Energy Balancing in sensor-enabled IoT systems (Q-EBIoT) has been designed to optimize the cost of paths based on rotation angle and position measurements. The simulation outcomes show a significant increment in a network lifetime.
A Quantum computing-based evolutionary algorithm (QEA) has been designed to formulate network optimization issues (Han and Kim 2002). Additionally, the QEA concentrated on resolving the routing issues of IoT frameworks. In DeBenedictis (2018) a quantum-inspired ant-based routing algorithm has been designed based on energy consumption and hop count to optimize the IoT framework routing issues. Q-bits, Q-gate parameters are considered to design the ant-based routing technique for network consolidation. Quantum-inspired evolutionary algorithm-based on clustering technique has been designed to accomplish hierarchical routing issues of IoT framework (Nguyen et al. 2017;Malina et al. 2021). Subsequently, a quantum-inspired genetic algorithm has been designed to optimize the service execution based on a novel routing strategy for IoT (El-Latif et al. 2018). In Wu et al. (2018) and Mekala and Viswanathan (2019a), a Deep Q-learning Network (DQN) has been designed through the Q-value of a targeted node to diminish training time duration during complex issues to enhance performance accuracy. Each layer state value has been estimated, but in the last layer, those values are added into a single element to enhance the system performance (Zhou et al. 2018). The Joint Policy Gradient Method (JCORA) has been designed to estimate and formulate device-centric issues, where several factors have been examined asynchronously to improve performance accuracy (Bi and Zhang 2018).

Model construction
This section focus on assessing two objectives based on quantum theory. A set of fog-RSU nodes are denoted as S = {j ∶ 1, 2, … , m} , V = {i ∶ 1, 2, … , n} is a set of service requests from vehicle v, and K = {k ∶ 1, 2, … , k n } a set of parameters. Initially, service offloading constraints are formulated for which a set of parameters are considered to select the feasible fognode for service offloading. The computation capacity of fog-RSU node is defined as follows where s e , s c , s b denotes number of processing elements, processor capacity, node bandwidth which are pre-defined variables. Total execution services (TES), total assigned services (TAS) are two essential factors to consider during node capacity estimation. The workload of node is estimated as follows where t , t j refers service arrival rate at time t, and the average required service execution time to execute the arrived services is estimated as follows. ( where t j,ct is a service execution time, t j,trt is a required data transmission time, which are defined as follows where v , ℏ t i refers data size, computing intensity of service respectively. s b,t v→s is a transmission rate at time t between vehicle to Fog-RSU is estimated as follows where, s b is RSU bandwidth capacity, v po is vehicle transmission energy and np, g t s,v is energy noise and channel gain between vehicle and RSU. The RSU cost is formulated as where v s bunch of vehicles associated with RSU, c vn , c df , c sc denotes virtual network cost, data sharing cost, service execution cost respectively and v denotes anticipated service request size, q t v ∈ {0, 1} is a data fetching decision, whereas q t v = 0 denotes the RSU fetch the data from server, L s is load of RSU. The required data is not available, then data fetching may affect the computation performance, leads computation delay (Mekala and Viswanathan 2019b;Mekala et al. 2020Mekala et al. , 2021. The service offload cost ∇ t j is estimated as follows The cost threshold value is estimated as follows where v s d refers service demand on RSU s and o t v ∈ {0, 1} is a data offloading decision between vehicle and RSU, whereas o t v = 0 denotes the vehicle executes the request by itself other wise offload to nearby RSU. The communication delay is estimated as follows where s ∕ v × v v denotes anticipated service rate. Now, the required data availability or fetching and concerning data transfer delay are augmented together to assess the network computation performance or computation delay as follows

Quantumizing computation and communication parameters
In the previous section, a set of Fog-RSU node parameters are discussed which helps to select the suitable Fog-RSU node for offloading the computation required services. The incorporation of the QDC 2 approach in estimating the listed parameters is important in terms of qubits. A qubit is treated as a probabilistic parameter that should satisfy the conditional normalization. The parameter probability helps to classify the state of each parameter by satisfying conditional parameter(probability value p ≥ threshold value), then the parameter is in state-1 or ; else state-0 or which concludes Fog-RSU node state concerning the parameter. The mathematical representation is as follows The above derivation is part of conditional normalization and similarly, the rest of parameters are derived based on their objective wise. The state-0 of Fog-RSU node indicates low availability to accommodate offloading service. Subsequently, the Fog-RSU node feasibility is assessed based on the mutation of all parameter states. Let use assume K number of parameters considered to assess the node feasibility at time t and state of node is derived as follows Now, the Deep Convolutional Network (DCN) is deployed to assess the node feasibility factor, and each neuron comprises associated weight and parameter value. The neuron denoted as k 1 × √ p k 1 , where k 1 associated weight of parameter. Figure 2 illustrates the estimation of quantum state based on DCN, where each q-bit state and its weight value is consider to estimate the hypothetical state. The feasibility of the node is assessed based on DCN, where 1 indicates a high potentiality rate to serve the offloaded services in terms of computation and communication cost, offloading cost parameter. These are evaluated using qubit individuals and the functional flow is illustrated in Fig. 3. The figure illustrates the quantum decision analysis mechanism to select the feasible node. In the first iteration, the status of all devices is measured based on node-centric parameters at the first step. In the second step, the individual qubits are employed to assess the state of each parameter as mathematically described below. The qubit pooling process is initiated based on DCN which consider parameter associated weight in step three. The third step significantly analyzes the decision of service offloading based on conditional probability to select the feasible node.

Quantumizing bandwidth allocation strategy
Let us assume, LiDAR or mmWave sensors are deployed in IoT framework, and the underlaying objective of the sensors is to share or transfer the sensed data to Fog-RSU node when the data require more computation resources for effective computation and communication. However it is important to note that, in this instance the vehicle device or on-board unit has been considered as incapable to process the data for such cases there is a need to enhance the bandwidth capacity of device. After the data has been received by the Fog-RSU node, the in-build computation system assess the objects and their spatial information. In other words, given objective is to identify the defeated vehicle that helps for enhancing its bandwidth capacity through QDC 2 approach to optimize the allocation based on few parameters as follows where √ s b,t v→s , √ D com,t are estimates through qubits as per the above procedure, and t v is a spatial weight score factor which estimates based on number of objects and data accuracy rate. However, it is confined that, the estimation of object in each frame based on pointcloud data, t v weight factor derivation is not concentrated in this example, but considered as pre-defined variable. The allocation index is formulated as follows

Service offloading theoretical analysis
As discussed in the above sections, the individual qubits of each parameter are estimated to assess the state of the Fog-RSU node whether it is feasible to accommodate the offloading service or not. In this regard, an example of a problem is derived for thorough analysis. Figure 4 illustrates a four-quadrant graph with a circle that indicates the LAN coverage of fog-nodes, the eclipse coverage area indicates to offload the service without leveraging the parameters. In our example, this scenario is neglected because to resolve complex computations. A quantum gate (h-gate and CNOT gate) is considered to assess the possible solutions based on listed parameters as follows where Z( ) , refers rotation operator, rotation angle respectively. In our example, four angle values are considered. The angle change guides to search the suitable Fog-RSU node. The s a �state⟩ is one of the Fog-node among four except the red-point node. The red-point node is the node which offloads the service to the suitable node. Our objective is find out the suitable node. Assume s a �state⟩ node has 0.75% cost error rate and the parameter state is considered as 1 because the value is more than ≥ 0.5 , and parameter accuracy rate is 0.85%. In this example one parameter is considered to asses the feasible node and k 1 × √ p k 1 is used to assess the normalized value and Table 1 illustrates the analysed values.s a �state⟩ has 0.73% normalized value which is ≥ 0.5 and is equal to ≜ s a �1⟩ and node-a is feasible to accommodate the offloading services. In case the s a �state⟩ is busy in terms of huge service queue line, then second feasible node is s d �state⟩ because it has low cost error rate than other two devices and measurement accuracy is also feasible.

Experimental results analysis
The efficiency of the QDC 2 approach is examined by considering s = 4 fog nodes, v = 25 vehicle devices connected to a single edge router with a service arrival rate = {1, 2, 3, … , 12} . Fifty sub-channels are considered because spectral bandwidth is = 50 , and the DCN network comprises two hidden layers and ten neurons. The neuron or parameter count and accuracy are dependent, and several parameters consideration is dependent on the node capability. The computation capacity is measured based on CPU cycles/s count. The QDC 2 approach is examined in two levels (vehicle level and fog-level). The vehicle level consists of one edge router with 25 vehicles, and the fog level consists of vehicles + router + switch + base station. Framework topology is treated as constant in heterogeneous environments, and service offloading is being analyzed at the vehicle level and fog-level, and computing and communication abilities of devices are listed in Table 2.
Two recent approaches (JCORA and Q-model) are considered to assess the performance of the proposed system. Figure 5 illustrates the latency and service offloading analysis based on computation capacity and vehicle count, respectively. The Fog-RSU node computation capacity and service execution rate are inversely propositional to each other. If computation capacity increases, then the service execution rate is drastically decreased because of estimating the node potentially before assigning the service load, as can observe in Fig. 5a. Quantum computing influences the measurement of the node-centric parameters by changing the rotation angle based on the nearby nodes. Figure 5b illustrates the service offloading rate based on vehicle density. The capacity of a vehicle has been estimated through an individual qubit assessment procedure, which influences the execution of service at a local computing system called vehicle execution. In case the vehicle is not potentially rich with resources, then the vehicle offloads the services to a nearby Fog-RSU server, and the same conditional offloading strategy is applied to Fog-RSU nodes. However, it is essential to note that, in this scenario, we have not considered edge-vehicle computing. The offloading rate is drastically reduced as the increment of vehicle count from V = 5-25. Figure 6 illustrates service execution time analysis based on service arrival rate. QDC 2 approach has achieved low execution time of arrived services than the state-of-art approaches in Fig. 6a. In our simulation, the service arrival rate is varied from 10 to 50, and the execution time has been drastically increased as increment in service arrival rate. The quantum computing integration has an immense impact on service execution time because the selection of Fog-RSU nodes is processed through qubit-parameter state analysis. The Deep-Convolutional Network is implied to assess the Fog-RSU node by considering each layer outcome based on parameters state or neuron state as per the normalized condition described above. Figure 6b illustrates the execution time of arrived services, but Fog-RSU nodes are 6 interconnected with LAN followed by 25 vehicles connected through a single router. QDC 2 approach has achieved a moderately low execution time of arrived services than the state-of-art approaches. Figure 7 illustrates service offloading analysis among state-of-art approaches and our proposed approach based on service data length. Our approach has achieved low offloading rate than state-of-art approaches. The offloading rate is slightly increased by increasing the service data length in scenario-1, which can be observed in Fig. 7a. However, the offloading rate is optimal due to selecting the feasible node. In some cases, the node is potential, but the service queue length is high, which may lead to execution delay, and it has been resolved by prognosticating the device-centric parameters through individual qubits. Figure 7b illustrates the second scenario-2, which comprises 6-RSU nodes and 25-vehicles. In this case, the QDC 2 has achieved a constant offloading rate because of 6-RSU nodes. Figure 8 illustrates QDC 2 approach performance analysis based on three measurement metrics such as Root Square Error rate, cost rate, latency rate, respectively. Figure 8a illustrates offloading rate with and without the presence of QDC 2 approach. The offloading rate is notably high compared to the consideration of the QDC 2 approach. Figure 8b illustrates the measurement metrics analysis concerning the service data length. RSE rate is low in all cases due to quantum computing and prognostic node-centric parameter measurements. While service offloading, the potential node selection is carried out based on several parameters and parameter weights. The DCN has implied to assess the state of each node, and this mechanism is neglected in state-of-art approaches. Subsequently, the cost is relatively high, but on average, it is low than other approaches and the latency also. Table 3 shows the FogSim simulator parameters such as service load, size, vehicle density. Additionally, the Fog-RSU and vehicle level load parameters are listed in terms of RAM capacity, bandwidth, Processing element count, MIPS count for services. Figure 9 illustrates FogSim simulation outcomes, and Fig. 10 illustrates Rasbarry pi 4 Model-B setup, which has been used to assess the resource parameters. Subsequently, MATLAB simulation-link is employed to assess the performance of the proposed system.

Conclusion
The designed Quantum-based D2D Computation, Communication QDC 2 approach process the data generated from LiDAR sensor, millimetre-wave (mmWave) sensor at Fog-based RSU for efficient service reliability. The QDC 2 approach resolved the coated issues in two steps. The bandwidth allocation strategy has used the load and resource capacities of RSU or vehicle to decide on resource allocation. The adaptive equilibrium service offloading strategy effectively assessed the computation capacity and performance rate of Fog-node to streamline computation consistency issues. The data transmission delay has been reduced    by 23% reduces with the efficient bandwidth allocation as per data importance. The adaptive equilibrium load distribution strategy assesses device-centric measurements to balance the computation resources and has minimized 21.54% average latency delay. Simulation results show that our approach achieved a 79.56% service reliability rate, 0.9% average error rate, and an execution delay is 22.5 s for 15 devices than state-of-art approaches. Data availability Data available on request from the authors.
Code availability Code available on request from the authors.