# Precoding for RIS-Assisted Multi-User MIMO-DQSM Transmission Systems
## 5 Detection
### Detection Complexity  
The detection complexity (\(\eta\)) of the analyzed systems is evaluated by counting the total number of floating-point operations (flops) required for the detection. All systems are compared considering the optimal ML detection criterion. For real additions, multiplications, and comparisons, 1 flop is carried out. For complex additions and multiplications, 2 and 6 flops are carried out, respectively, while subtractions and divisions take the same number as additions and multiplications respectively. Multiplication of \(m\times n\) and \(n\times p\) complex matrices uses \(8 mmp\) flops. Obtaining \(\mathbf{Q}_{k}=\mathbf{H}_{k}\mathbf{W}_{k}\) in (34) requires \(8N_{r}^{2}N_{s}\) flops. In order to obtain the noiseless version of the received signal in (34), we multiply \(\mathbf{Q}_{k}\in\mathbb{C}^{Nr\times Nr}\) by the matrix \(\mathbf{D}\in\mathbb{C}^{Nr\times 2^{m}}\), which represent all Rx antennas for the user k. This multiplication requires \(8N_{r}^{2}2^{m}\xi\) flops. For DQSM, when some spatial symbols are set to zero, the real size of the spatial constellation is reduced in the same proportion. The factor \(\xi\) is introduced to take into account the reduction of the size of the spatial constellation in comparison to the conventional QAM constellations. This factor is obtained by counting the number of zero-value inputs in the DQSM constellation.  
\[\xi=1-\frac{\text{zero entries}}{2^{m}}. \tag{36}\]  
Subtraction in the ML criterion requires \(2N_{r}2^{m}\) flops, obtaining the absolute values requires \(3N_{r}2^{m}\) flops, the maximum ratio combining (MRC) for the received signals of each Rx antenna requires \(2N_{r}2^{m}\) flops, and ordering all results to find the minimum requires \(2(2^{m})\) flops. Adding the last four partial results, we obtain \(7N_{r}2^{m}\xi\) flops approximately. Table 2 summarizes the complexity of partial operation carried out for Strategy I and Strategy II.  
Finally, adding all these partial results, the detection complexity for the RIS-MU-DQSM-I system is  
\[\eta_{I}\approx 8N_{r}^{2}N_{s}+8N_{r}^{2}2^{m}\xi+7N_{r}2^{m}\xi. \tag{37}\]  
The detection complexity for the RIS-MU-DQSM-II system (35) is obtained as follows: The product of \(\mathbf{H}_{k}\in\mathbb{C}^{Nr\times Ns}\) by \(\mathbf{G}\in\mathbb{C}^{Ns\times Nt}\) requires \(8N_{r}N_{s}N_{t}\) flops. Multiplying by the matrix \(\mathbf{Z}_{k}^{Eq}\in\mathbb{C}^{N_{t}\times N_{t}}\) requires \(8N_{r}^{2}N_{t}\) flops. Multiplying by matrix \(\mathbf{D}\in\mathbb{C}^{Nr\times 2^{m}}\) requires \(8N_{r}^{2}2^{m}\xi\). Similar to (37), ML criterion requires \(7N_{r}^{2}2^{m}\xi\) flops approximately. Adding all these partial results, we obtain the detection complexity for Strategy II as  
\[\eta_{II}\approx 8N_{r}N_{s}N_{t}+8N_{r}^{2}N_{t}+8N_{r}^{2}2^{m}\xi+7N_{r}2^{ m}\xi. \tag{38}\]  
In (37) and (38), \(\xi\) takes into account that the lattice of the DQSM constellation is reduced by the inserted zeros [19]. Then, for the conventional MU-MIMO-SMux system \(\xi=1\). For the RIS-MU-DQSM schemes, the factor \(\xi\) is evaluated by directly counting the entries with zero value in the real or imaginary parts of the spatial constellation. Considering a SE of 8 bits per channel use (bpcu)/user, we obtain \(\xi=0.75\), meanwhile for an SE of 12 bpcu/user \(\xi=0.4375\). In the next section, the results of complexity are analyzed and discussed.