presented hereafter is discussed according to the schematic shown in figure \[fig:theory\_scheme\] which allows, in a unified framework, the description of qudits encoding in any energy-time representation.

![\[fig:theory\_scheme\] The three main parts of the experiment: The preparation of energy-time entangled photons through SPDC; the subsequent manipulation of their spectrum using a SLM; and the detection through SFG. Mathematical expressions for $\Lambda(\omega_i,\omega_s)$, $M(\omega_i,\omega_s)$, $\Gamma(\omega_i,\omega_s)$ and $S$ are derived in the corresponding subsections.](theory_scheme_extended_new.eps)

### Preparation

A coherent superposition of energy-time entangled idler ($i$) and signal ($s$) photon pairs occurs through vacuum fluctuations if a pump photon ($p$) is annihilated in a SPDC process. For a configuration where all involved photons are mutually collinear and identically polarized [@lerch2013] the corresponding two-photon state reads $$\label{eq:twophstate}
\vert\psi\rangle = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} d\omega_id\omega_s \Lambda(\omega_i, \omega_s)\hat{a}^{\dagger}_{i}(\omega_i)\hat{a}^{\dagger}_{s}(\omega_s)\vert0\rangle_i\vert0\rangle_s.$$ The operators $\hat{a}^{\dagger}_{i,s}(\omega_{i,s})$ act on the combined vacuum state $\mbox{$\vert0\rangle_i\vert0\rangle_s$}$ to create the idler and signal photon with corresponding relative frequencies $\omega_{i,s}=\Omega_{i,s}-\omega_p / 2$. The absolute frequency of the entangled photons is given by $\Omega_{i,s}$ and $\omega_p$ denotes the central frequency of the pump photon. The joint spectral amplitude $$\Lambda(\omega_i,\omega_s)\propto\alpha(\omega_i,\omega_s)\Phi_{DC}(\omega_i,\omega_s)$$ is written in terms of the pump envelope function $\alpha(\omega_i,\omega_s)$ and the phase matching function $\Phi_{DC}(\omega_i,\omega_s)$ explicitly given by $$\alpha(\omega_i,\omega_s)=\exp\left(-\frac{(\omega_i+\omega_s)^2\, 2\ln2}{\Delta \omega_p^2}\right),\\$$ $$\begin{aligned}
