# Quantum Private Comparison Based on Four-Particle Cluster State
## 3 The Proposed QPC Protocol  
The participating entities are as follows:  
**Semi-Trusted Party (STP)**: An STP serves as an intermediary that assists the participants in evaluating the equality function of their inputs. The STP is characterized as honest-but-curious, meaning that it adheres strictly to the defined protocol steps while potentially attempting to perform quantum attacks using the results received from the participants to uncover their secrets. However, the STP is prohibited from exhibiting favoritism toward any participant or colluding with them. **Participants**: The protocol involves two groups of participants, each comprising two users. In the first group, the users are [PERSON] and [PERSON], while the second group consists of [PERSON] and [PERSON]. The participants are considered honest-but-curious; they strictly adhere to the protocol while potentially trying to uncover the secrets of other participants. The objective of the QPC protocol is as follows: [PERSON] and [PERSON], forming one group, each possess private inputs \(A=\{a_{1},a_{2},a_{3},\ldots,a_{L}\}\) and \(B=\{b_{1},b_{2},b_{3},\ldots,b_{L}\}\), respectively, and seek to determine whether \(A=B\). Simultaneously, [PERSON] and [PERSON], constituting another group, hold private inputs \(C=\{c_{1},c_{2},c_{3},\ldots,c_{L}\}\) and \(D=\{d_{1},d_{2},d_{3},\ldots,d_{L}\}\), respectively, with the aim of ascertaining whether \(C=D\). Here, \(a_{i},b_{i},c_{i},\ d_{i}\in\{0,\ 1\}\). We assume that the quantum communication channel is both noiseless and lossless. **Step 1:** [PERSON] and [PERSON] share an \(L\)-length secret key \(X_{i}=\{x_{1},x_{2},\ldots,x_{L}\}\) using the BB84 protocol [3]. Similarly, [PERSON] and [PERSON] share an \(L\)-length secret key \(Y_{i}=\{y_{1},y_{2},\ldots,y_{L}\}\), where \(x_{i},y_{i}\in\{0,1\}\). **Step 2:** The semi-trusted party (STP) prepares \(L\) four-particle cluster states, all in the state \(|\varphi\rangle_{1234}\) as described in Equation (1). It divides these states into four ordered quantum sequences denoted as \(S_{1},S_{2},S_{3}\) and \(S_{4}\), where \(S_{i}\) is the \(i\)-th qubit of the four-particle cluster state. **Step 3:** The STP prepares \(4\delta\) decoy photons from the set \(\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\) and randomly inserts them into the sequence \(S_{1},S_{2},S_{3},\text{and}\ S_{4}\), in random positions, with each sequence containing \(\delta\) decoy photons. After the decoy photons are inserted, the newly generated sequences are denoted as \(S_{1}{}^{\prime},S_{2}{}^{\prime},S_{3}{}^{\prime}\), and \(S_{4}{}^{\prime}\). The STP sends \(S_{1}{}^{\prime},S_{2}{}^{\prime},S_{3}{}^{\prime}\), and \(S_{4}{}^{\prime}\) to [PERSON], [PERSON], [PERSON], and [PERSON], respectively. **Step 4:** Upon receiving the sequences \(S_{1}{}^{\prime},S_{2}{}^{\prime},S_{3}{}^{\prime}\), and \(S_{4}{}^{\prime}\), [PERSON], [PERSON], [PERSON], and [PERSON] each send confirmation information to the semi-trusted party (STP). The STP then announces the recorded positions and the measurement bases corresponding to the decoy photons in \(S_{1}{}^{\prime},S_{2}{}^{\prime},S_{3}{}^{\prime}\), and \(S_{4}{}^{\prime}\). Subsequently, [PERSON], [PERSON], [PERSON], and [PERSON] measure the decoy photons and communicate their measurement results back to the STP. The STP then determines whether the measurement results align with the expected outcomes for the decoy photons and calculates the error rate. If this error rate surpasses a predefined threshold, it suggests the possible presence of eavesdroppers, resulting in the termination of the protocol. **Step 5:** [PERSON], [PERSON], [PERSON], and [PERSON] recover \(S_{1},S_{2},S_{3},\text{ and }S_{4}\) by discarding all decoy photons from \(S_{1}{}^{\prime},S_{2}{}^{\prime},S_{3}{}^{\prime}\), and \(S_{4}{}^{\prime}\), respectively. Subsequently, [PERSON], [PERSON], [PERSON], and [PERSON] carry out the following operations:  
For [PERSON]:  
1. If \(x_{i}\oplus a_{i}=0\), apply the phase shift operation to the \(i\)-th qubit in \(S_{1}\).