Sorting quantum systems efficiently

Measuring the state of a quantum system is a fundamental process in quantum mechanics and plays an essential role in quantum information and quantum technologies. One method to measure a quantum observable is to sort the system in different spatial modes according to the measured value, followed by single-particle detectors on each mode. Examples of quantum sorters are polarizing beam-splitters (PBS) – which direct photons according to their polarization – and Stern-Gerlach devices. Here we propose a general scheme to sort a quantum system according to the value of any d-dimensional degree of freedom, such as spin, orbital angular momentum (OAM), wavelength etc. Our scheme is universal, works at the single-particle level and has a theoretical efficiency of 100%. As an application we design an efficient OAM sorter consisting of a single multi-path interferometer which is suitable for a photonic chip implementation.


Results
The key insight behind our approach is to apply quantum information methods and reformulate the problem in terms of quantum gates. We introduce the main idea by discussing first a two-dimensional example, then we generalise the concept to an arbitrary dimension d.
Sorting in two dimensions. A textbook example is the polarizing beam splitter. A PBS is a two-input, two-output device which acts as a polarization sorter: it transmits H-polarised photons to the same spatial mode k and reflects V-polarised photons to the other spatial mode: with ⊕ addition mod 2; |H〉, |V〉 are the basis states of the polarization qubit and |k〉, k = 0, 1 the spatial mode (path) qubit. With the notation |0〉 = |H〉, |1〉 = |V〉 the PBS action is ⊕  p k p k p PBS: (3) where p, k = 0, 1. Thus a PBS is equivalent to a controlled-NOT gate C(X) between polarization (the control) and mode (the target) qubits. We diagonalise C(X) gate as ⊗ ⊗ C Z ( H) ( )( H); here H is the Hadamard gate and C(Z) = diag (1, 1, 1, − 1) the two-qubit controlled-Z gate (see Methods).
This decomposition is equivalent to a Mach-Zehnder interferometer (MZI) with a polarization-dependent phase shift in one arm. In this setup H-polarised photons acquire a 0 phase and exit to output 0 with 100% probability (constructive interference in output 0). On the other hand, V-polarised photons acquire a π phase and exit to output 1 with 100% probability (constructive interference in output 1).
Such an interferometric setup has been used to separate spin-up and spin-down electrons in a mesoscopic Stern-Gerlach device 7 , as a spin measuring device for quantum dots 8 and to sort even and odd photonic OAM states 9,10 .
We are now ready to generalise the sorter to an arbitrary dimension.
Universal quantum sorter. Let Σ be the observable (degree-of-freedom) to be sorted. We assume Σ has a finite-dimensional Hilbert space d  , with  = d dim d . We can view Σ as a qudit with the associated basis states {|0〉 , … , |d − 1〉 }. For a continuous variable (e.g., wavelength, time) we discretise it to a finite set ("bins") λ 0 , … , Clearly, in order to sort d states of Σ the device requires at least d outputs, i.e., spatial modes. Since we want a reversible, hence unitary transformation, the quantum sorter also has d inputs. Consequently the spatial modes form a second (ancillary) qudit having the same dimension as Σ .
Thinking in terms of quantum information it is natural to generalise the function performed by a PBS to d dimensions. To this end we require that a universal quantum sorter (QS) implements the following unitary transformation: ⊕  s k s k s QS: (4) with ⊕ addition mod d; the first qudit |s〉 corresponds to Σ and the second |k〉 to the spatial mode. In the language of quantum gates, this transformation is the controlled-X d gate C(X d ), with X d the generalized Pauli operator (see Methods). It is easy to see that a device implementing the transformation (4) acts indeed as a quantum sorter. Suppose we have a particle with Σ = j incident in mode k = 0. Then the sorter action is  j j j 0 , and thus the particle exits on port j with unit probability, see How to implement the quantum sorter in a real device? As before, we diagonalise the C(X d ) gate using Fourier transforms F, F † : , see Fig. 2 and Methods. This gives us the blueprint of the quantum sorter. The Fourier gates F, F † act only on the spatial mode qudit and define a multi-path interferometer with d modes.
Next, the C(Z d ) gate located between the Fourier gates is implemented by inserting in each arm a different phase-shift acting on Σ . Thus, the k-th mode contains the phase shift: with ω = e 2πi/d a root of unity of order d. The resulting design is shown in Fig. 1 It is intuitive to understand how the sorter works. The first F gate puts the particle in equal superposition of d . Next, each term of the superposition acquires a path-dependent and Σ -dependent phase ω kj . Finally, the F † gate acts as a generalized beamsplitter combining all d paths such that a particle with Σ = j interferes constructively only for output j and destructively for all other outputs k ≠ j. The Fourier gates F, F † can be implemented efficiently in linear optics (beam-splitters and phase-shifters) and require resources polynomial in d 11 . In integrated optics F, F † are each implemented by a single multi-mode coupler (see the arrayed-waveguide grating below). Moreover, one can replace the F † gate with another F gate, modulo a relabelling of the outputs (since F † = F 3 and F 2 just permutes the modes, see Methods).
The Fourier gates act only on the mode qudit and are independent of the variable Σ . Thus the same interferometer can sort different variables Σ just by changing the phase modules implementing Z d k designed for a particular Σ (see 10 We now discuss several important applications of the quantum sorter.
Sorting OAM. Photons carrying OAM have recently attracted considerable interest for both classical communication and quantum information [12][13][14][15][16][17][18][19] . A single photon prepared in the state |l〉 has lħ units of OAM; experimentally this is achieved with fork holograms or spiral phase plates. Neutrons with orbital angular momentum have been also demonstrated in a recent experiment 6 .
In order to use OAM on a larger scale for both classical and quantum information one needs an efficient sorter. For quantum information a sorter should also preserve superpositions and work at the single-particle level.
There are several proposals for sorting photonic OAM: fork holograms 20 , cascaded Mach-Zehnder interferometers 9,10 , custom-designed lenses 4,5,21,22 and cascading ring cavities 23 . Each of these schemes have drawbacks: either they do not work at the single-photon level, or collapse superpositions by filtering out some states, or require cascaded (and difficult to stabilise) interferometers or use custom-designed lenses.
We now apply our scheme to sort OAM, Fig. 3(a). In this case we need the transformation  with k = 0, … , d − 1; for d = 2 we recover the scheme in 10 . Since Dove prisms also change the polarization state, this method can be used only for sorting OAM but not total angular momentum. For applications where preserving the polarization state is important, one can employ the special prisms designed in 10 . Used together with a quarter-wave plate, these prisms leave the polarization unchanged.
Other methods to induce phase-shifts for OAM states are conceivable. For an integrated photonic chip implementation twisted waveguides can perform the required transformation, although this will also change the polarization.
Sorting wavelength. Photons are used extensively in classical and quantum communication. To increase the channel capacity classical systems transmit multiple wavelengths on the same optical fibre (wavelength-division multiplexing). At the receiver each frequency is demultiplexed into separate fibres.
Arrayed-waveguide gratings (AWG) are widely used to implement wavelength-division demultiplexing, Fig. 3(b). An AWG has the same structure as the quantum sorter: a multi-path Mach-Zehnder interferometer (defined by the input/output couplers) and path-dependent phase-shifts 24 . The waveguides in the phased array have different lengths L k and induce frequency-dependent phases integers. This implies constraints for wavelengths L 0 = λ s n 0,s , ∀s and L k = λ 0 n k,0 , ∀k.

Michelson architecture. A quantum sorter in Michelson configuration is obtained by folding the
Mach-Zehnder setup from Fig. 1. In this case we replace the F † gate with a retroreflector (or mirror) R: the photons are reflected back on the same spatial mode |k〉 and traverse the gate F in the opposite direction. As the same path is traversed twice, the middle gate is now C Z ( )   OAM a retroreflector is required instead of a mirror. A reflection on a mirror changes the sign of the OAM −  l l, but on a corner retroreflector (prism) the state is unchanged as it undergoes two reflections.

Discussion
In this article we proposed a general scheme to sort a quantum system according to an arbitrary, d-dimensional variable Σ, such as spin, OAM, wavelength etc. The quantum sorter works at the single-particle level, does not collapse quantum superpositions and has a theoretical efficiency of 100%. The scheme has several applications. First, it can be used as a general read-out device for a qudit implemented by Σ . Second, it can be used to prepare higher-dimensional entangled states between Σ and spatial modes, eq. (5). This scheme is both deterministic and efficient (it uses only linear optics).
For OAM states, the quantum sorter generalizes the interferometric design for d = 2 9,10 . The present architecture is more efficient since it uses a single interferometer with d modes and d Dove prisms. In contrast, in order to sort d OAM states previous interferometric schemes 9,10 use d − 1 cascading MZI with 2(d − 1) Dove prisms and − 1 d 2 holograms. This interferometric architecture is difficult to stabilise, has lower efficiency and constrains d to be a power of 2, d = 2 k , with k the number of cascading stages.
Due to its advantages, the quantum sorter has the potential to accelerate the adoption of photonic OAM states for both classical communication and quantum information. The quantum sorter is unitary (hence reversible) and works both as a demultiplexer and a multiplexer.
For a photonic chip integration our proposal can benefit from the large expertise in designing multi-mode interferometers; for example, commercial AWG can reach up to 256 modes.

Generalized Pauli operators for qudits. Let
2 Thus F 2 just permutes the basis states |k〉 and therefore = F 4 . For d = 2 (qubit) the Fourier transform is idempotent = H 2 . Let U be a single-qudit gate. We define the controlled-U gate C(U) between the control qudit |s〉 and the target qudit |k〉 as  C U sk s U k ( ): s with s, k = 0, … , d − 1. In particular, the controlled Pauli gates C(X d ) and C(Z d ) are: d ω = C Z sk sk ( ) (16) d sk From eq. (12) we diagonalize C(X d ) as: d d The equivalent quantum network is shown in Fig. 2; note how the Fourier gates F, F † act only on the target qudit.