# Teleportation-Based Error Correction Protocol of Time-Frequency Qubit States
## Appendix A Spatial Separation of a Two-Photon State  
We show in this section that a two-photon state as input can also be separated into the even and the odd components in two distinct spatial ports. We consider an initial separable two-photon idea of the time-frequency GKP state as  
\[\ket{0\bar{0}}_{aa}=\sum_{n,m\in\mathbb{Z}^{2}}c_{2n}\bar{c}_{2m}\bar{a}^{ \dagger}(2n\overline{\omega})\hat{a}^{\dagger}(2m\overline{\omega})|\Omega \rangle. \tag{10}\]  
The tilde notation is here to indicate that the two states are not identical, as one of them can be more noisy compared to the other. After the first beam splitter and the time-displacement operator, the wave function of the two-photon state is  
\[\frac{1}{2}\sum_{n,m\in\mathbb{Z}^{2}}c_{2n}\bar{c}_{2m}(\hat{a}^{ \dagger}_{\tau}(2n\overline{\omega})\hat{a}^{\dagger}_{\tau}(2m\overline{ \omega})+\hat{b}^{\dagger}(2n\overline{\omega})\hat{a}^{\dagger}_{\tau}(2m \overline{\omega})\] \[+\hat{a}^{\dagger}_{\tau}(2n\overline{\omega})\hat{b}^{\dagger}( 2m\overline{\omega})+\hat{b}^{\dagger}(2m\overline{\omega})\hat{b}^{\dagger}( 2n\overline{\omega}))\ket{\Omega}. \tag{11}\]  
where \(\hat{a}^{\dagger}_{\tau}(2n\overline{\omega})=e^{2n\overline{\omega}\tau}\hat {a}^{\dagger}(2n\overline{\omega})\). The output wave function after the second beam splitter is  
\[\frac{1}{4}\sum_{n,m\in\mathbb{Z}^{2}}c_{2n}\bar{c}_{2m}(\hat{a} ^{\dagger}_{\tau}(2n\overline{\omega})+\hat{b}^{\dagger}_{\tau}(2n\overline{ \omega}))(\hat{a}^{\dagger}_{\tau}(2m\overline{\omega})+\hat{b}^{\dagger}_{ \tau}(2m\overline{\omega}))\] \[+(\hat{a}^{\dagger}_{\tau}(2n\overline{\omega})-\hat{b}^{ \dagger}_{\tau}(2n\overline{\omega}))(\hat{a}^{\dagger}_{\tau}(2m\overline{ \omega})+\hat{b}^{\dagger}_{\tau}(2m\overline{\omega}))\] \[+(\hat{a}^{\dagger}_{\tau}(2n\overline{\omega})+\hat{b}^{ \dagger}_{\tau}(2n\overline{\omega}))(\hat{a}^{\dagger}(2m\overline{\omega})- \hat{b}^{\dagger}(2m\overline{\omega}))\] \[+(\hat{a}^{\dagger}(2n\overline{\omega})-\hat{b}^{\dagger}(2n \overline{\omega}))(\hat{a}^{\dagger}(2m\overline{\omega})-\hat{b}^{\dagger}( 2m\overline{\omega}))\ket{\Omega}. \tag{12}\]We rearrange and post select only the coincidence terms:  
\[\frac{1}{4}\sum_{n,m\in\mathbb{Z}^{2}}c_{2n}\tilde{c}_{2m} (\hat{a}_{\tau}^{\dagger}(2n\overline{\omega})+\hat{a}^{\dagger}(2n \overline{\omega}))\hat{b}_{\tau}^{\dagger}(2m\overline{\omega})\] \[-(\hat{a}_{\tau}^{\dagger}(2n\overline{\omega})+\hat{a}^{\dagger }(2n\overline{\omega}))\hat{b}^{\dagger}(2m\overline{\omega})\] \[+(\hat{a}_{\tau}^{\dagger}(2m\overline{\omega})+\hat{a}^{\dagger }(2m\overline{\omega}))\hat{b}_{\tau}^{\dagger}(2n\overline{\omega})\] \[\frac{1}{2}\sum_{n,m\in\mathbb{Z}^{2}}c_{2n}\bar{c}_{2m}(\hat{a}^{ \dagger}_{\tau}(2n\overline{\omega})\hat{a}^{\dagger}_{\tau}(2m\overline{ \omega})+\hat{b}^{\dagger}(2n\overline{\omega})\hat{a}^{\dagger}_{\tau}(2m \overline{\omega})\]0  
Let us first consider the ideal case, where the spectral distribution is a Dirac one \(G_{2n}(\omega)=\delta(\omega-2n\overline{\omega})\). We point out that \((\hat{a}_{\tau}^{\dagger}(2n\overline{\omega})+\hat{a}^{\dagger}(2n\overline{ \omega}))|0\rangle=(e^{2 in\overline{\omega}\tau}+1)|2n\overline{\omega}\rangle\), with \(\tau=\pi/\overline{\omega}\), we have \((\hat{a}_{\tau}^{\dagger}(2n\overline{\omega})+\hat{a}^{\dagger}(2n\overline{ \omega}))|0\rangle=2|2n\overline{\omega}\rangle\). We have also \((\hat{b}_{\tau}^{\dagger}(2m\overline{\omega})-\hat{b}^{\dagger}(2m\overline{ \omega})|2n\overline{\omega}\rangle|0\rangle=0\). We can verify that the other terms are zero. It means that there is no coincidence event, which is the desired outcome.