{'fraction_non_alphanumeric': 0.039976445956555876, 'fraction_numerical': 0.013674430777283433, 'mean_word_length': 4.340408805031447, 'pattern_counts': {'":': 1, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Discriminating distinguishability

Particle distinguishability is a significant challenge for quantum technologies, in particular photonics where the Hong-Ou-Mandel (HOM) effect clearly demonstrates it is detrimental to quantum interference. We take a representation theoretic approach in first quantisation, separating particles' Hilbert spaces into degrees of freedom that we control and those we do not, yielding a quantum information inspired bipartite model where distinguishability can arise as correlation with an environment carried by the particles themselves. This makes clear that the HOM experiment is an instance of a (mixed) state discrimination protocol, which can be generalised to interferometers that discriminate unambiguously between ideal indistinguishable states and interesting distinguishable states, leading to bounds on the success probability of an arbitrary HOM generalisation for multiple particles and modes. After setting out the first quantised formalism in detail, we consider several scenarios and provide a combination of analytical and numerical results for up to nine photons in nine modes. Although the Quantum Fourier Transform features prominently, we see that it is suboptimal for discriminating completely distinguishable states.

Rather than the usual second quantized approach, we can gain insight by bringing quantum information concepts to bear in first quantization [24][25][26][27]. Distinguishability can then be modelled, for example, as entanglement between controlled and uncontrolled degrees of freedom of individual particles, with loss of interference being caused by the decoherence that results when the uncontrolled Hilbert space is marginalized. This can be formalized by observing that bosonic (and fermionic) Fock states of two (sets of) degrees of freedom can have natural Schmidt decompositions, corresponding to so called unitary-unitary duality in many-body physics [28].
An example of a pertinent idea from quantum information is state discrimination [29][30][31]; we start by showing how this reproduces the well known HOM distinguishability test for two particles. In principle the formalism accommodates any number of particles and modes, and we show how this generalises for multimode quantum interference, taking a representation theoretic approach (Sections II and III); this complements a number of generalizations in the literature [32][33][34][35][36][37][38][39][40]. We set up the state discrimination problem in the linear optical framework, assuming we have access to passive transformations (networks of phaseshifters and beamsplitters) and projective measurements via photon number counting detectors (Sec. IV). This restriction on the allowed measurements yields a highly nontrivial constraint on the mixed state discrimination scenario -this new problem is what we study here. In particular, the optimisation problem that results is nonlinear, as is usually the case in multiphoton interferometry [41], necessitating numerical techniques described in Sec. IV C.
The results are as follows: in Sec. V A we present two general upper bounds valid for any photon number N when discriminating (i) a state with a single distinguishable photon from the completely indistinguishable state, and (ii) the completely distinguishable from the completely indistinguishable state; in Sec. V B we show why the HOM test is the only test of distinguishability for arbitrary states of two photons, and demonstrate the generality of the formalism by considering three photons in two modes; in Sec. V C we use a mix of analytical and numerical techniques to argue the optimality of a balanced three mode network (tritter) as a discriminator for both completely distinguishable and singly distinguishable states; in Sec. V D 1 we look at discrimination of singly distinguishable states with higher photon numbers up to N = 9 and show that the quantum Fourier transform (QFT) saturates the bound, suggesting it is the optimal interferometer for all N ; finally in Sec. V D 2 we look at the discrimination of completely distinguishable states with higher photon numbers and give examples of the best known interferometers up to N = 8, found by observing a pattern emerging from the optimisations. Most of these results are summarised in Table I. Although not surprising that the QFT features heavily, the results show that it is not optimal for discriminating completely distinguishable states, motivating the search for optimal discriminating networks for other states of arXiv:1806.01236v1 [quant-ph] 4 Jun 2018 interest.

A. Hong-Ou-Mandel interference
We will use the HOM scenario as an example that sets out the main features of our distinguishability model, and its relationship to state discrimination. Each HOM photon has two pertinent degrees of freedom: one is spatial, namely the interferometer arms, and the other is temporal, namely the time of arrival. We are usually interested in the case where it is the spatial degree of freedom over which we have control (via interferometry), and so we call this the 'System' degree of freedom. We interpret the temporal degree of freedom as a 'Label' -in general this would include all the particles' degrees of freedom which we do not control. Since complete control of the System includes the possibility of putting photons in the same spatial mode, we view the Label as determining the particles' distinguishability, via correlations between the System and Label degrees of freedom. In a real HOM experiment we are interested in preparing situations with varying distinguishability, so we do in fact manipulate the temporal Label degree of freedom as well, but for applications we usually think of the System-Label correlations as having been determined by means beyond our control.
The HOM scenario has two spatial System modes which we will call "top" and "bottom" (s =↑, ↓), and two photons, requiring two temporal Label modes that we will call "early" and "late" (l =←, →). (Note that these symbols will need to be ordered -we have avoided the obvious choice of s and l = 1, 2 to reduce confusion with other indices in this section; in Sec. III A we will revert to integers for the general case.) Photon creators are written asâ † sl [42], giving rise to Fock states which we can write as arrays where rows correspond to System modes and columns to Label modes. An example of a completely distinguishable two photon state is with an early photon in the top arm and a late one in the bottom, while corresponds to an indistinguishable state where both photons are early.
Ideally an interferometer acts only upon the System, corresponding to a unitary transformation on the two spatial modesâ † Here U is a 2 × 2 unitary matrix corresponding to the two port interferometer, sometimes called the transfer matrix. We assume that the interferometer acts trivially upon the Label modes (the photons remain early or late), corresponding to the 2×2 identity transfer matrix 1l. For a suitable choice of ordering of the four possible creators, the full 4 × 4 transfer matrix acting on all four modes (↑←, ↑→, ↓←, ↓→) is given by It is tempting to interpret the tensor product in Eq. (4) as that between the System and the Label. A quantum information theoretic approach to distinguishability would then ignore (trace out) the Label, arriving at reduced states on the System where all the nontrivial transformations and measurements occur. However, this is not the tensor product structure of the four harmonic oscillators in the second quantized model, and so one cannot marginalise, for example, the columns in Eqs.
(1,2). In order to trace out the Label we will use a first quantized description. Second quantized Fock states can be related to first quantized single particle states as follows. Viewing each excitation of our four mode aggregate as a particle with four available states (↑←, ↑→, ↓←, ↓→), and recognizing that as bosons the total state must be symmetric under particle exchange, we have a one-to-one relationship between the Fock states of two bosons in four modes and symmetric states of two four-dimensional particles, (qudits, here with d = 4). Applying this procedure to the indistinguishable state of Eq. (2), we have where the subscripts 1 and 2 have been used as (fictitious) particle labels that get permuted, and we have rearranged the tensor product structure in the last line to arrive at a state in the S(ystem)⊗L(abel) basis. Similarly, one finds We see that Eq. (8) is in a product state (Schmidt rank 1) of System and Label [43], so the Label states are uncorrelated to the System states; learning the Label does not allow one to learn anything about the System, as expected for indistinguishable particles. Equation (11) is entangled (Schmidt rank 2), with the System states perfectly correlated to the Labels (↑ to ← and ↓ to →), making the photons completely distinguishable. It will be useful to rewrite states of both the System and Label according to their permutation symmetry. Schur-Weyl duality [28,44] ensures that this basis also has good quantum numbers for the unitary group action of the interferometer, in this case U(2) [45]. The irreducible representations (irreps) of U(2) are well known, and for only two particles Young diagrams provide a compact notation for the basis states that carry these irreps; they are (for arbitrary, ordered single particle quantum numbers x, y) the symmetric triplet and the antisymmetric singlet We can now rewrite Eqs. (8,11) as Note that total exchange symmetry is preserved because the System and Label states in the second term of Eq. (17) are both antisymmetric. We can now see clearly that in this case the Schur-Weyl bases provide a Schmidt decomposition of the Fock arrays, and that the completely distinguishable state has nonzero amplitude outside the totally symmetric irrep; we will discuss the generalisation of these features in Sec. III B. Tracing out the Label degree of freedom, we arrive at the reduced density matrices that describe the state of the System. Another feature of the Schur-Weyl basis is that these states will be block diagonal, each block corresponding to an irrep. Thus, ordering our tripletsinglet basis as | ↑ ↑ , | ↑ ↓ , | ↓ ↓ , ↑ ↓ , we have A coincidence count occurs when both the top and bottom modes are occupied, defining the coincidence subspace spanned by | ↑ ↓ , ↑ ↓ . The projector onto this subspace has matrix representation where we have used an occupation (one excitation in each of the two System modes) in the subscript. The unitary evolution of these input states due to the interferometer is given by the two-photon representation of the transfer matrix. Again, in the Schur-Weyl basis this is block diagonal, specifically a direct sum of the triplet and singlet matrix representations of U(2). The matrix elements in the coincidence subspace for an arbitrary two mode interferometer with transfer matrix U are where per and det are the matrix permanent and determinant functions, * are matrix elements for events outside the coincidence subspace, and we use ∼ = to denote the fact that U ⊗ U only equals U ⊕ U after the basis change. This can be confirmed by direct calculation from Eq. (3), or equivalently by using the Schur-Weyl transformation, which for U(2) is the familiar Clebsch-Gordan transformation of angular momentum theory. The probability of a coincidence count is given by the Born rule, which from Eqs. (18)(19)(20)(21) is given by where we have written |U | 2 for the elementwise absolute value squared of a matrix U . It follows that in order to see no coincidences for an indistinguishable state, which has only a triplet component, we need an interferometer whose transfer matrix permanent vanishes. By parametrising an arbitrary U ∈ U(2) one can confirm that only a balanced beam splitter has this property (see Sec. V B). We also see that the distinguishable state has a singlet component that scatters through any U according to the determinant, and since any element of U(2) has |detU | = 1, this component will always give rise to coincidences. Thus, in a HOM experiment one uses a balanced beam splitter to see a "dip" in coincidence counts in the System as one manipulates the Label degree of freedom from distinguishable to indistinguishable and back again.

B. State discrimination
By choosing to measure a coincidence count as well as U to be a balanced beamsplitter, the HOM situation described above ensures that P (1,1) = 0 when the input is ρ i , while P (1,1) happens to be maximised when the input is ρ d (see Sec. V B). This is reminiscent of what is known as unambiguous mixed state discrimination [46].
A general state discrimination protocol [30,31] consists of two parties, a source (Alice) and a detector (Bob), who agree on an ensemble of states {p k , ρ k } to be discriminated. The source draws a random sample from this ensemble according to the distribution {p k } and sends it to the detector, whose task is to identify which state was sent as best as possible. This is accomplished by finding a measurement, given by a set of POVM elements {E k } that maximise the expected probability of success: For unambiguous discrimination (UD), we have the further constraint that no mistakes are allowed to be made, that is, Tr[ρ k E j ] = 0 for all k = j, at the price of having to add an outcome E ? to the POVM that corresponds to failing to identify the state.
Rearranging Eq. (22) and defining the HOM measurement scenario described above can now be summarised by subject to Tr ρ i M (1,1) (U ) = 0.
That is, find an interferometer that maximises the probability of seeing a coincidence for a distinguishable input state, subject to the constraint that it never gives coincidences for an indistinguishable input state. It is now clear this is an instance of an UD problem, with the solution being a balanced beamsplitter in the HOM case. This gives a direction in which to generalise the HOM scenario to any number of particles in any number of modes as a UD problem. A key distinction from general UD is the restricted form of the available POVM elements, which must be projective measurements defined by the interferometer U and the N -photon occupation n being detected. In particular, we expect that known optimal measurements for two-state discrimination will not be available in linear optics. When speaking generally about measurements we will use the notation E for POVM elements, while, as above, M n (U ) is reserved for photon counts. Because M n (U ) is degree N in the variables U and U † , this measurement restriction makes the UD optimisation problem nonlinear.

III. BACKGROUND: MANY PARTICLES AND MODES
From the HOM example (e.g. Eq. (17)), we see that symmetry of the states in the full System-Label space and the correlations within it play a key role in the distinguishability of the particles. Therefore we proceed with an analysis for any arbitrary number of particles and modes using Schur-Weyl duality, and then further generalise for particles with two degrees of freedom using unitary-unitary duality [28].

A. Schur-Weyl duality in first quantisation
In the first quantized picture of the HOM example above, each photon was considered as a d-dimensional quantum system, with d the total number of System and Label modes available. Schur-Weyl duality states that the Hilbert space of N qudits can be decomposed as where C {λ} carries irrep λ of the group of unitary transformations on a qudit, U(d), C (λ) carries irrep λ of the group of permutations of qudits, S N , and ∼ = signifies that the left and right hand sides are related by a change of basis (a Schur-Weyl transform). Following [44], a Schur-Weyl basis which realises this decomposition is denoted |λqp where λ labels the irrep of both the unitary and the symmetric groups simultaneously [47], q = 1, 2, . . . , d {λ} indexes a basis of the unitary irrep, and p = 1, 2, . . . , d (λ) indexes a basis of the symmetric irrep. These dimensions can be computed, for example, by the Weyl character and hook length formulas respectively [48]. There is an implied dependence of q and p on λ, the set of which in turn depends on the number of particles N and the number of modes d. The irrep λ = (λ 1 , λ 2 , . . . , λ d ) can be specified using Young diagrams, where λ j is the number of boxes in row j, λ 1 ≥ λ 2 · · · ≥ λ d , and j λ j = N . The indices q and p correspond to the different ways of filling boxes with the numbers {1, . . . , d} and {1, . . . , N } to make semistandard (with repetition) and standard (without repetition) Young tableaux respectively, where numbers cannot decrease as you move right in a tableaux and must increase as you go down. We can further refine this notation by observing that the basis can be chosen such that the representation theoretic weight of a state corresponds to the occupation n, which has also been called a type in this context [44]. Subspaces of states with the same occupation are then invariant under the Schur-Weyl transform in this basis, and the unitary index q can be uniquely specified by an occupation n and an 'inner' multiplicity r (the number of which is also known as a Kostka number), which accounts for the fact that there can be more than one orthogonal state with the same weight in a unitary irrep λ. As we are focusing on the action of the unitary group, p will be referred to as an 'outer' multiplicity accounting for the fact that the same unitary irrep λ can occur more than once. We can therefore write Schur-Weyl basis states in the form |λpnr , where the irrep dependence of p, n and r has again been suppressed to prevent clutter. We will often shorten the notation such that |λpn := |λ, p, n, r = 1 , |λnr := |λ, p = 1, n, r , |λn := |λ, p = 1, n, r = 1 , reducing clutter when the multiplicity is trivial; since λ and n are vectors while p and r are scalars there should be no ambiguity. Coincident input or output will be denoted with occupation number 1 = (1, 1, . . . , 1), with exactly one particle in each mode, (corresponding in first quantisation to one qudit in each state).
For small N and d, writing states in terms of Young tableaux can be more compact, as in the HOM discussion of the previous section. The shape of a tableau is specified by λ, which is filled with mode indices specified by n following the rules for semistandard tableaux. The inner multiplicity r corresponds to different semistandard fillings of the same λ and n, while the outer multiplicity p will be labelled with a subscript. For example, for three photons (N = 3) in three modes (d = 3), the coincident n = 1 = (1, 1, 1) subspace for irrep λ = (2, 1) = is spanned by four states given by p, r ∈ {1, 2}. If we index the modes 1, 2 and 3, the two notations are related as while, e.g., the n = (2, 1, 0) subspace for irrep λ = (2, 1) is spanned by the two states is not semistandard and therefore such states do not exist.

Implementation of the Schur-Weyl transform
An example of a Schur-Weyl transformation is the triplet-singlet basis change given in Eqs. (12 -15), where (when d = 2) it is the same as the well known Clebsch-Gordan transformation. There are several ways to implement this basis change more generally [49,50]; we use the method described in Ref. [28], which we will briefly outline here.
Every irrep {λ} of U(d) can be assigned a highest weight state, which is annihilated by an appropriate set of raising operators that are realised in terms of the bosonic creators and annihilators. Given as a Young tableau, this state can be expressed in terms of single particle (qudit) states using Slater determinants; the single particle basis is indexed by the d modes. In much the same way as is done for U(2) in angular momentum theory, we then use corresponding lowering operators to find a set of states that span the irrep. The size of this set is known, namely d {λ} . A Gram-Schmidt procedure is then used to orthonormalise the set, (note that there is freedom in choosing how to do so when there are multiplicities, see e.g. Sec. III C 2). Outer multiplicities are handled by utilising the dual S N action to permute a highest weight state in order to find corresponding highest weights for the multiple copies of irrep {λ}. Again, the number of these states is known, namely d (λ) , and orthonormalisation is required. The lowering procedure is then repeated until a complete set of λ states are found. Iterating through all λ then gives a complete set of states {|λqp }, from which we can determine the required basis transformation. Transformations for different N and d can be computed once and stored for later use.

B. Unitary-unitary duality
In the HOM example we saw that each photon had two degrees of freedom, the System and the Label, and that, as bosons, first quantised multiphoton states had to be totally symmetric under particle permutations. Independently decomposing both the System and Label Hilbert spaces according to Schur-Weyl, one is then led to ask what states of the form are totally symmetric? This can be viewed as a coupling problem for irreps of the symmetric group -we wish to construct composite states of 'permutational momentum zero'. The answer turns out much like it does in angular momentum theory: that λ, p must equal λ , p , respectively, and that the coupling coefficients are all equal and independent of p [25,51]. Thus totally symmetric pure System-Label states are of the form where we have defined These states carry the symmetric irrep of the 'global' unitary group, U(d S d L ), acting on the d S d L modes of the combined System and Label. As discussed above, we can replace q with pairs n, r in all of these expressions. Equations (36,37) imply a decomposition of the totally symmetric irrep of U(d S d L ) into irreps of its unitary subgroups U(d S ) and U(d L ) that act on the System and Label independently. These irreps are labelled simultaneously by λ, hence "unitary-unitary duality": where we include subscripts on the right hand side to remind us which unitary subgroups the irreps belong to [52]. An interferometer U is given by an element of the System unitary subgroup U(d S ), and thus it acts on states in irrep λ according to the irreducible matrix rep- Just as with a single degree of freedom, the space of second quantized d S ×d L Fock arrays can be put into oneto-one correspondence with first quantized totally symmetric states by the procedure exemplified in Eqs. (5 -8). Thus we can write an arbitrary partially distinguishable state, which is an element of the totally symmetric subspace of (C dS ⊗ C dL ) ⊗N , in a basis of first quantized states given by Eq. (37). We may now trace out the Label to arrive at mixed states describing any partially distinguishable state of N photons in d S modes. We can order the basis so that the reduced System state and the action of any System interferometer will both be block diagonal according to irreps λ, a potentially significant simplification.

C. States of interest
We will focus our attention on three types of N -photon states: completely indistinguishable, singly distinguishable, and completely distinguishable, described below (the general case will be discussed in Sec. VI). We are not considering loss (where entire qudits would be traced out), so N will be fixed throughout. Situations with mixed System-Label states and partial distinguishability can be written in terms of the basis [53]; we give examples of this generality with partial distinguishability for two photons in two modes in Sec. V B 1, and of mixed System-Label states for three photons in three modes in Sec. V C 2. Otherwise we will restrict ourselves to the case where the total System-Label state is pure, corresponding to a source that produces states that are always (in)distinguishable in exactly the same way; generalization is, in principle, straightforward.
The most distinguishable N photons can be is for each Label to be in an orthogonal state, and so d L ≤ N . In practice the Label space could be much larger, but in order to describe the particles' distinguishability we need only consider the subspace spanned by the Label states, which can be at most N dimensional. In order to set d S , consider first two photons who share the same state of either degree of freedom; obviously that state is symmetric, and so in order to maintain total symmetry -or by unitary-unitary duality -the state of the other degree of freedom must also be symmetric, cf. Eq. (8). This restricts the combined state to a subspace of those allowed in Eq. (37), and so is not completely general. This argument extends to any number of photons, thus to consider arbitrary distinguishability we must have input states that have a single photon in each System mode, thus d S ≥ N . Unless indicated otherwise, we will consider the case with d S = d L = N . The reader may wish to refer ahead to Sec. V C for concrete examples of the following.

Completely indistinguishable states
A completely indistinguishable state is one in which every photons' Label state is the same. As mentioned above, such a state lies in the symmetric Label subspace with λ = (N ). Since the symmetric irrep of S N is one dimensional, d (N ) = 1 and Schur-Weyl duality tells us that the corresponding unitary irrep is always outer multiplicity free. Moreover, (N ) is also inner multiplicity free, (there is only one way to symmetrise a product of single particle states), so we can replace q with the System occupation 1, and q with the Label occupation (N, 0) (ordering our Label modes such that the occupied one is first, and with the understanding that the list of zeroes is as long as it needs to be, in this case N − 1). The total state in Eq. (37) therefore becomeŝ where we have included N − 1 redundant zero columns in the Fock array so we can easily compare with the other states in this section. In the second line we have written the state in the single particle basis, cf. Eqs. (6, 10), and we have suppressed trivial multiplicities in the last line. We see that this is always a product state, with no correlation between the System and Label, as expected for completely indistinguishable particles. The reduced System state is supported on the one dimensional intersection of the symmetric System subspace given by (N ) with the coincident subspace defined by the System occupation number 1.

Singly distinguishable states
The next state we consider is one where a single photon has become distinguishable from the rest; assuming all efforts are being made to produce the completely indistinguishable state, this should be the most likely error to occur. Ordering our modes so that the 'bad' photon is in System mode N and Label mode 2, we havê where in the last line we have not yet performed the Schur-Weyl transform. Considering this symmetrisation, one observes that although all N ! permutations of the N distinct System indices will occur, since only two distinct Label modes are involved there are only N single particle states available to the Label degree of freedom, namely those with the j th photon in Label mode 2 and the rest in Label mode 1; denote these states |2 j L . Such a Label state will be perfectly correlated to all System states with the j th photon in mode N ; for each j we can factor these (N − 1)! System states off, and denote the resulting normalised state |N j S . Thus in the System-Label basis, the singly distinguishable state can be written as e.g. Eqs. (8,11). These sets of states are orthonormal, and we recognise this as an entangled state with Schmidt coefficients 1/ √ N . Now consider Schur-Weyl transforming this state into the form of Eq. (36). Because there are only two distinct Label modes involved, the only Label irreps that can occur are those whose Young diagrams have two or fewer rows. Moreover, because only a single photon is 'bad', the only two rowed diagram allowed is that with a single box in the second row. Thus the Label state is supported only by irreps λ = (N ) and (N −1, 1). By unitary-unitary duality, the System is therefore also supported only on these two irreps. The totally symmetric irrep (N ) is always both inner and outer multiplicity free; for irrep (N − 1, 1), the outer multiplicity is d ((N −1,1)) = N − 1. It remains only to work out the inner multiplicities for irrep (N −1, 1). The System and Label have occupations 1 and (N − 1, 1, 0) respectively (the marginals of the Fock array). There is only one Young tableau of shape (N −1, 1) consistent with occupation (N − 1, 1, 0), (that with the 2 in the second row box), so the Label states are inner multiplicity free. The System occupation 1 is consistent with N − 1 Young tableau of shape (N − 1, 1), (all those without an N in the second row box), and so the System inner multiplicity is N − 1. Inserting these observations into Eq. (36), the Schur-Weyl transformed state is ψ (N ),1,1,(N −1,1,0),1 |(N ), 1, 1, 1 S |(N ), 1, (N − 1, 1, 0 (N −1,1),1,r,(N −1,1,0 We can factor the second term and redefine coefficients to yield another Schmidt decomposition: Because the Schur-Weyl transformations yielding Eq. (37) are performed independently, the System-Label entanglement cannot be changed. From Eq. (47) we know that the Schmidt coefficients are all 1/ √ N , so we must have ψ (N ) = 1/ √ N and ψ (N −1,1) = (N − 1)/N . The amplitudes φ r do not affect this entanglement at all -they depend on how one chooses to orthonormalise multiplicities in the Schur-Weyl transform, and encode the fact that we chose the 'bad' photon to be in System mode N . We can always choose r = 1 to correspond to this specific situation, and then use the subgroup of U(d S ) that permutes System modes to find the states corresponding to the 'bad' photon being in any other mode.
Making this choice and tracing out the Label in Eq. (49) yields the singly distinguishable reduced state (now suppressing trivial multiplicities) We see that this is mixed over N dimensions of the coincident subspace, overlapping the symmetric and 'almost symmetric' (N − 1, 1) irreps.

Completely distinguishable states
A completely distinguishable state has each particle in a distinct Label mode, paired with a unique System mode. We can choose to order the modes such that the corresponding Fock array is diagonal, cf. Eq. (1). Generalising the symmetrisation procedure of Eqs. (5 -8) to N particles, one finds that all N ! possible terms will occur in the single particle picture, and they will each occur once. The unique pairing of System and Label modes manifests as maximal entanglement between the System and Label single particle states in the coincident subspace. As above, because the Schur-Weyl transformations yielding Eq. (37) are performed independently, the System-Label entanglement is preserved. This means that the transformed state must also be maximally entangled with the same Schmidt rank. Thuŝ with the sum running over all allowed values of irrep, outer, and inner multiplicities. The completely distinguishable reduced System state is therefore which is completely mixed over the N ! dimensional coincident subspace.
The unitary subgroup U(d S ) corresponds to the set of interferometers that act on the System modes. We can parametrise these unitaries with what is known as a Reck scheme in optics [54,55], decomposing an arbitrary U into a sequence of single mode unitaries (phaseshifters) and unitaries that act on neighbouring modes (beamsplitters). As shown in Fig. 1, such a scheme can be viewed as d s − 1 layers, indexed by k, each with k phaseshifters and beamsplitters, followed by a final phase shift on each mode. Because we are only interested in number state inputs and number counting measurements, only the phaseshifters between beamsplitters play a role. Hereafter when we refer to U we will therefore be referring to this smaller interferometer, without the initial and final sets of phaseshifters.

E. Measurements
We will assume that we have access to photon number resolving detectors for the System (see Sec. VI for a discussion of a relaxation). The measurement POVM elements are projections on all states with photon occupation n, M n = λpr |λpnr λpnr|. Note that this includes projections onto System states that are not symmetric; as shown in Eq. (17), distinguishable states can contain non-symmetric System components that still give rise to clicks. Comparing with Eq. (54), we see that M 1 = N ! ρ d -that is, up to normalisation, a coincidence count is a projection onto the completely distinguishable state. As discussed above, we will usually include the interferometer in our definition of a measurement, yielding parametrised POVM elements where 1l λ corresponds to the irrep of the identity permutation in accordance with Eq. (28), (note that we omit this when it is only one dimensional, e.g. Eq. (21) ).

IV. DISCRIMINATION OF DISTINGUISHABLE STATES
We will be interested in two problems: discriminating the completely indistinguishable state, ρ i , from the distinguishable states (i) ρ s and (ii) ρ d . From Eqs. (44,50,55), we observe that each of these states is of the form where ρ i is pure, and ρī is diagonal in the Schur-Weyl basis with support outside the symmetric subspace λ = (N ). From well known results for the discrimination of two mixed states [56], the fact that ρ i lies within the support of the mixed state to be discriminated means that the optimal measurement is essentially the same for either Minimum Error or Unambiguous Discrimination; one wishes to project onto the support of ρī. In particular for UD, the error-free constraint means that we are forced to set E i = 0, and thus the prior probabilities do not affect the optimal choice of measurement operators. This reflects the fact that there is no way to unambiguously discriminate the indistinguishable state ρ i -we can either conclude that the state was distinguishable by observing an output that is completely suppressed by quantum interference, or fail to conclude anything at all. Our task is therefore to minimise the probability of failure E ? = 1l − E s,d , equivalently maximising the probability of unambiguously detecting a singly or completely distinguishable state, respectively. If our measurements are unrestricted, the best choice of POVM is to project onto the nonsymmetric subspace. This choice is suitable for not only the states ρ s,d , but by extension any state to be discriminated from ρ i . However, as mentioned in Sec. III E, in practice we only have access to number counting measurements -we will therefore want to approximate this projection as best possible. The approximation will be sensitive to the state we are discriminating: for example, Eqs. (50,55) show that ρ s can be optimally discriminated by projecting onto only the (N − 1, 1) irrep, while for ρ d one wants to project on to all of the nonsymmetric irreps. As we will see, this can lead to different interferometers being optimal for discriminating different distinguishable states in linear optics.

A. Restriction to linear optical measurements
In order to discriminate distinguishability in linear optics we wish to find the best we can do with the measurements we have, namely those in Eq. (56). In the HOM case, the UD problem described by Eqs. (26,27) involves only a single occupation POVM element, the coincidence count M n (U ) with n = (1, 1). There are many ways we can approach the generalization of the HOM case. One way would be, given a set of measurement operators, for each n we find U maximising Tr ρM n (U ) subject to Tr ρ i M n (U ) = 0. Notice that any n that can be made to satisfy Tr ρ i M n (U ) = 0 for a suitable U is an unambiguous discriminator, but is not necessarily the optimal choice. In general, it is possible for multiple occupations n to satisfy the UD constraint simultaneously, contributing to the probability of success.
We therefore wish to find the subset of all discrimi-nating occupations, call it D, that optimises the success probability for the same choice of U : find U and D maximising n∈D Tr ρM n (U ) (58) subject to, for all n ∈ D, Tr ρ i M n (U ) = 0. (59) Note that the quantity we are maximizing gives us the total probability of successful discrimination, which is the sum over all the unambiguously discriminating events in the set of occupations D.
While the first optimisation focuses on giving an optimal interferometer for discrimination given a specific measurement pattern, the second optimisation focuses on the highest probability of discrimination across all measurement patterns. In general we find that these two problems give different optimal interferometers; here we will focus on the latter 'complete' optimisation over both U and D, see Sec. VI for a discussion of a variation of the problem.

B. Scattering probabilities
Let us look at what the probability of a specific measurement pattern n being detected at the output of an arbitrary interferometer U is for the states of interest, starting with the completely distinguishable state. From Eqs. (55) and (56) Tr |λ, p, n, r λ, p, n, r| U λ ⊗ 1l λ |λ, p, 1, r λ, p, 1, r | U λ ⊗ 1l λ † = 1 N ! λ,p,r,r | λ, p, n, r| U λ ⊗ 1l λ |λ, p, 1, r | 2 where in the last line we have used the fact that outer multiplicities p give rise to identical copies of unitary irreps to write the probability in terms of irreducible unitary matrix elements. When r = r = 1 these matrix elements are immanants [57] of a matrix U n 1 whose rows and columns are determined by the input and output occupations of the interferometer given by U [58,59]. Moreover, the completely distinguishable case can be interpreted as independent classical particles evolving stochastically [60], leading to the remarkable fact that the sum in Eq. (60) can always be written in terms of the permanent of the matrix given by the elementwise square amplitudes of U n 1 , cf. Eq. (24) and note that U The calculation for the singly distinguishable and completely indistinguishable state is the same as Eq. (60), only with fewer irreps occurring.
Recalling from Sec. III C 2 that d ((N −1,1)) = N − 1, Eq. (50) gives where the sum is over all r consistent with n, and Eq. (44) gives where as mentioned above these matrix elements are expressible in terms of perU n 1 [61]. We observe that not all occupations are useful for unambiguous discrimination. Measurements where all the photons are bunched into a single mode only occur in the symmetric irrep, that is, if n = (0, .., 0, N, 0, ..., 0), then M n = | (N ), 1, n, 1 (N ), 1, n, 1|. In this case Eqs. (60) and (61) are proportional to Eq. (62), and since Eq. (59) has to be satisfied, they will always give zero. Completely bunched events can therefore never help discriminate the indistinguishable state, and we will exclude such events from our searches.

C. Numerical optimisation approach
In the Results section there is a mixture of analytical and numerical results. To construct the cost function for our numerical work we took into consideration the following criteria: the measurement operator M n can only be included in the optimisation if Eq. (59) is satisfied; when this is the case it is added to a sum being optimised as per Eq. (58). The cost function chosen was where ξ is adjusted (usually depending on the choice of N , and ranging from 2 to 60) to penalise results where M n might be added to Eq. (58) and optimised without satisfying Eq. (59). A high penalty ξ guarantees that the value of Tr ρ i M n (U ) is close to zero before Tr ρM n (U ) is optimised and added to the sum. Combining this with the Eqs. (60) and (61) we have Python was used to optimise these functions with the scipy library function basinhopping using Broyden-Fletcher-Goldfarb-Shanno (BFGS) as the optimisation algorithm. The seeds were generated using numpy random number generation. Though this optimisation function will help us explore the space and reach fairly close to the global minimum, it can neither guarantee that minimum is global, nor does it exactly solve the original optimisation problem. This will be problematic with minima that are close together, as for example exp −ξ Tr ρ i M n (U ) gets closer to 1 for values of Tr ρ i M n (U ) that are close to 0. In some situations this value can be quite high combined with a high value of Tr ρM n (U ) , skewing the results towards a possible nonoptimal solution for the original problem. We could avoid this by choosing an appropriately high ξ as a function of the number of occupations N +dS−1 N , however, if too high, exp −ξ Tr ρ i M n (U ) will behave like a step function, which does not reward transitional values enough. Therefore, we do not make any strong claims of optimality for the interferometers found numerically when they do not saturate the general bounds presented in Sec. V A.

A. General bounds
Recall from Sec. IV the best possible unrestricted discrimination measurement is to project onto the nonsymmetric subspace, E (N ) = λ =(N ),p,n,r |λpnr λpnr|. Such a POVM element would be equally good for both singly and completely distinguishable states, and indeed any distinguishable state of the form in Eq. (57). The success probability of such a measurement is given by where we have used the fact that any projector onto irreps is unitarily invariant. These then are universal upper bounds on the success probability for singly and completely distinguishable states, respectively. However, since we are restricted to photon number counting measurements, we will see that while the first bound is achievable, the second is not in general. We will go through various examples in detail in the following sections.
B. Two modes

Two photons in two modes
In the case of two photons in two modes, the states to be discriminated are, from Eqs. (44), (50) and (55), Observing that there is only one available state which is not symmetric, it is easy to write down an arbitrary partially distinguishable System state in this case, since there is but one parameter: As discussed in Sec. IV B, only occupations that do not have all the photons bunched in the same mode can be used for meaningful discrimination, in this case leaving only one choice of projector, the coincidence M (1,1) = | 1 2 1 2 | + 1 2 1 2 . In our discussion in Sec. II, we claimed that the optimal discriminator is given by a coincidence count and a balanced beamsplitter; we can now prove this assertion. First, note that since there is only one antisymmetric state, the antisymmetric irreducible representation of any U has but one matrix element and so the action of any interferometer on this state is trivial (in Eq. one finds that the constraint is then perU = cos 2 θ − sin 2 θ = cos 2θ = 0, with the family of solutions {(φ, ϕ, π/4)| 0 ≤ φ ≤ π, 0 ≤ ϕ ≤ π}. The solutions do not depend on the phases φ or ϕ, as we would expect from the discussion in Sec. III D, but only on the choice of the beamsplitter reflectivity, which is balanced as claimed. We see that not only does unambiguous discrimination return the HOM measurement as was discussed in Sec. II A, it is optimal for an arbitrary partially distinguishable two photon state.

Three photons in two modes
As an example of the utility of the formalism, in this subsection we consider the simplest nontrivial case with N (= 3) > d S (= 2). As mentioned in Sec. III C, this restricts the kinds of distinguishable states that can occur; we consider situations with two photons in one System mode and the third in the other. The indistinguishable state isâ † 11â † 11â † 21 |vac = | 2 1 , with reduced state There are essentially two types of distinguishable state in this situation. The first isâ † 11â † 11â † 22 |vac = | 2 0 0 1 , and the secondâ † 11â † 12â † 21 |vac = | 1 1 1 0 . Other states are equivalent to the above for the reasons discussed in Sec. III C 2. Further, the (now incompletely) distinguishable stateâ † 11â † 12â † 23 |vac = | 1 1 0 0 0 1 has a reduced state that is the same as Eq. (72), and will therefore have the same discrimination measurement and success probability. The reduced state for the first case is while that for the second case is Note that Eq. (58) does not depend on the amplitude of the symmetric part of the state -its contribution has to be zero by Eq. (59). It only depends on the nonsymmetric components, and since ρ s1 and ρ s2 are equally weighted across the available nonsymmetric states, the optimal discriminator will be the same. However ρ s2 does have half of the amplitude of ρ s1 in this subspace, which will halve the success probability.

C. Three modes
From now on we will only consider coincident input with N = d S . For three photons in three System modes, the completely indistinguishable reduced state, is from Eq. (44), There are now three different singly distinguishable states, depending on which System mode the 'bad' photon is in. In the Schur-Weyl basis (see Sec. III A 1) their full System-Label states, as per the discussion in Sec. III C 2, are While for completely distinguishable states permuting System modes has no effect on the reduced state, here the reduced states will not be invariant. However, because permutations of System modes lie inside the set of allowed operations, (that is, S dS ⊂ U(d S )), if we optimise for one of these states, the resulting interferometer will be easily related to the others by including some mode swapping. Therefore we can focus on one of these states and the success probabilities that we find will be the same for the other two; Eq. (75) has the reduced state (cf. Eq. (50)) It is natural to ask about discrimination of mixtures of these three states; we will discuss this in Sec. V C 2.

Discriminating singly distinguishable states
Let ρ λ denote the (unnormalized) part of a state supported on the subspace of irrep λ. Notice that ρ s has no support in the antisymmetric subspace, so that n Tr ρ s M n (U ) = 2/3 and n Tr ρ s M n (U ) = 0. In the best case scenario, we can pick some subset of occupations D and U for which Eq. (59) holds and the success probability will be bounded by 2/3. It is well known how to achieve this; use a balanced tritter, U = QF T 3 , and all the occupations from M 2 , where QF T N is defined as and ω = exp 2πi N . A parametrisation that realizes a balanced tritter is given in Figure 2. The best known interferometer for discriminating completely indistinguishable from distinguishable states of three photons in three modes is QF T3, with a success probability of 2/3. Up to phases, it consists of two balanced beamsplitters, one 2 : 1 beamsplitter, and one π/2 phaseshifter.

Discriminating mixed singly distinguishable states
A short digression regarding mixed System-Label states: if we were (uniformly) ignorant about which mode the 'bad' photon was in, we would have an equal mixture of Eqs. (75,76,77 The overlap n Tr ρ sm M n (U ) = 2/3 for M 2 again saturates the bound, and a balanced tritter remains the best choice of interferometer. This can be seen from the symmetry of the QF T which treats a 'bad' photon in any mode essentially the same way, and so should be true for analogous singly distinguishable mixed states for all N , however we will not discuss mixed System-Label states further here.

Discriminating completely distinguishable states
Using the cost function from Eq. (64) and a range of penalties ξ ∈ {2, 4, 6, 8, 10} we found that the highest success probability in the completely distinguishable case is 2/3. The measurement operators were always the full set M 2 with a balanced tritter as an example solution, just as in the previous section. However, this does not saturate the bound in Sec. V A, which is 5/6 in the case of three photons. To investigate this further, we try to understand the structure of the state a bit better and use numerical evidence to show that a balanced tritter is likely to be optimal.
From Eq. (79) we have n Tr ρ d M n (U ) = 2/3 and n Tr ρ d M n (U ) = 1/6, so that n Tr ρ d M n (U ) = 5/6, which is the discrimination bound. Notice that operators from M 2 do not have support on the anti-symmetric subspace. Therefore, if we only pick operators from M 2 as the discriminating operators, and assume they can simultaneously satisfy Eq. (59), then n∈M2 Tr ρ d M n (U ) = n∈M2 Tr ρ d M n (U ) ≤ 2/3. This is exactly what happens for the interferometers from our optimisation.
This tells us that if we want the success probability to be larger than 2/3, the only operator left, M (1,1,1) , would have to be included. Our numerical results show that, on the contrary, it is unlikely for any D that includes M (1,1,1) to give a success probability over 1/2. We do this with a new cost function, much like Eq. (64) but modified to force M (1,1,1) to be included: where η is a penalty to ensure Eq. (59) for M (1,1,1) has to be satisfied, and C d (U ) is as defined in Eq. (63). This penalty is set to η = 10 making the first term an order of magnitude higher than the second term of Eq. (82), where we took ξ = 6. As we learned in Sec. III D, we can ignore the outside phaseshifters of the standard Reck parametrisation, therefore we are only optimizing over 4 parameters, θ 2,1 , θ 2,2 , θ 1,2 , and ω 1,2 . The lowest value of the cost function found by the optimisation techniques in Sec. IV C is −0.500426. This corresponds to a success probability of 0.5 in discriminating between the two states, which is lower than the 2/3 achievable when M (1,1,1) is not included. While this does not give us definitive proof that no scheme that includes a threefold coincidence can give success probability higher than 2/3, it does strongly indicate that this should be true. Moreover, with the same optimisation functions we investigated how many of the other operators alongside M (1,1,1) we can pick at the same time, and it seems that the best we can do is to have four from M 2 satisfy Eq. (59) simultaneously. However, in all the situations when this occurs, some of the terms in Eq. (58) are zero, thus the success probability remains at 1/2, which can be achieved using just M (1,1,1) and a balanced beamsplitter.
The balanced tritter uses all the measurement operators from M 2 , with each contributing 1/9 to achieve the success probability 2/3. To draw attention to the difference between optimizing a single operator and multiple operators at once, mentioned in Sec. IV A, we notice that optimizing for one operator from the set M 2 yields a success probability higher than 1/9 (for some other choice of U ). Taking this further, we can search numerically for the single best outcome, with a cost function similar to that of Eq. (64), except we now focus only on a single n, that is C(n, U ) = −2 λ,r,r exp −ξ| (3), n|U |(3), 1 | 2 | λ, n, r |U |λ, 1, r | 2 .
We find M (1,1,1) is a clear winner with a total success probability of 1/2, achievable by a balanced beamsplitter as mentioned above. All of the other operators by themselves only ever give an optimised success probability of 1/8. Notice that 6 · 1/8 = 3/4 > 2/3, showing that the strategy that gives us the best success chance with a single operator from M 2 can not be achieved simultaneously by all six of them.
D. Four and more modes 1. Discriminating singly distinguishable states Using the numerical optimisation described in Sec. IV C, we also examined the discrimination of singly distinguishable states for N = 4 and 5 photons. Together with the results for N = 2 and 3, we see the optimisation return interferometers equivalent to QF T N , each giving a success probability 1 − 1/N , saturating the bound in Sec. V A. We have confirmed this behaviour by direct calculation up to N = 9.  I. The best known interferometers for discrimination of the singly and completely distinguishable states of N = 2 to 8 photons in N modes. For N = 2 and 3 the quantum Fourier transform (QF TN ) is optimal for both ρs and ρ d , but for N ≥ 4 the interferometers for each are different; we include all probabilities of success for comparison. For singly distinguishable states, the quantum Fourier transform saturates the bound and so is optimal for each N ; due to the QF T 's symmetry it does not matter which port the 'bad' photon (see Sec. III C 2) is in, however this is not true of the ρ d interferometers and so we include best, worst and average success probabilities assuming each port is equally likely to be 'bad'. The completely distinguishable state is essentially unique, so there is only one success probability to report; an asterix * indicates extensive numerical optimisation leads us to believe the N = 3, 4, 5 cases are optimal despite being far from the bound; it is remarkable that the best ρ d interferometers have constant optical depth (made up of QF T3s followed by QF T2s) for each N . Interestingly, the two success probabilities of the QF T are always equal except for N = 6, the only case in the table that is not a power of a prime. The measurement outcomes that lead to these probabilities are specified in Table II.

Discriminating completely distinguishable states
Numerical optimisation for the N = 4 and 5 photon completely distinguishable states yields success probabilities of 19/24 and 31/36, respectively. Both of these are less than the general bounds of Sec. V A, (23/24 and 35/36, respectively), and so we cannot conclude they are optimal. We observe that they do both exceed the singly distinguishable bound of 1 − 1/N , consistent with the intuition that it is easier to discriminate a completely distinguishable state than one that is less distinguishable.
The numerics are sensitive to the penalties used in Eq. (64), due to the existence of interferometers with very similar performance. For N = 4, a penalty ξ = 10 returns an interferometer with success probability 25/32 that minimises the cost function with a value of −0.839477, while a better interferometer with success probability 19/24 exists but gives a higher value of −0.836287. Increasing the penalty to 50 yields costs −0.78455 and −0.79277 for these two interferometers respectively, showing that the latter is now the minimum. However, increasing the penalty makes optimisation more difficult, because the landscape flattens and gradients go to zero. For this reason, penalties of 10, 13, 15, 17, 20, 25, 35 and 50 were used for N = 4, and 10, 12, 14, 15, 16, 18, 20, 35, and 60 for N = 5.
While the complexity of the calculations precluded any further optimisation for N > 5, we notice that the best interferometers for N = 2, 3, 4, 5 can be composed out of QF T 3 followed by QF T 2 s. This suggests a 'recursive' structure for the best discriminating interferometers; for N = 6, 7, 8 we tried combinations of QF T N , QF T N −1 and so on, and found that discriminators composed of QF T 3 s followed by QF T 2 s performed the best. This is remarkable as these are of constant optical depth, independent of N . Indeed, increasing the optical depth beyond this seems to decrease the success probability, which allowed us to limit our search to a manageable number of configurations. These are educated guesses however, and do not rule out the existence of better interferometers that might be found. Table I contains a summary of these results. We report the probabilities for the best interferometers found to successfully discriminate ρ s and ρ d from ρ i up to N = 8. The measurement outcomes that achieve these probabilities up to N = 5 are specified in Table II, where in the interest of saving space we give the occupations that fail (i.e. correspond to the ambiguous POVM element E ? ) instead of the successful discriminators, because the latter far exceed the former. For comparison, for each interferometer we include success probabilities for both states of interest to be discriminated from the completely indistinguishable state. Note that as discussed above for N = 3, although the QF T N interferometer is optimal for ρ s no matter which System mode the 'bad' photon is in, this will not be true for interferometers that lack the symmetry of QF T N . Indeed, the best ρ d discriminator does not treat each System mode the same way, and so when using such an interferometer to discriminate ρ s we report best, worst and average success probabilities, assuming each System mode is equally likely to contain the 'bad' photon.

VI. DISCUSSION AND FURTHER WORK
Although we have focused on single and complete distinguishability, as shown in Sec. III B the formalism admits arbitrary states. Consider for example Fock arrays with a single excitation in each System mode and an arbitrary Label occupation, call it n L . Applying the Schur-Weyl transform and focusing on the symmetric irrep (N ), where the support is one dimensional, we see that the reduced system state will be of the form This gives a bound of 1 − n L !/N ! on the probability for successfully discriminating such a state from the completely indistinguishable one, and includes the singly and completely distinguishable cases above. The exact form of such states could be found by reasoning as in Sec. III C. We can use the formalism to compute the number of parameters that describe an arbitrary partially distinguishable collection of N particles in N (or more generally d) modes. Because of the maximal entanglement over p in Eq. (37), when we trace out the Label of an arbitrary totally symmetric state in Eq. (36), the resulting mixed state has identical blocks for each copy of λ, (the number of identical blocks being equal to the outer multiplicity). Thus the most general mixed state is described by a single (Hermitian) block for each irrep. Recalling that the number of real parameters in a d-dimensional Hermitian matrix is d 2 , we have for an arbitrary partially distinguishable mixed state of N bosons in N modes (subtracting one for normalisation) λ d {λ} 2 − 1 = N 2 +N −1 N − 1 real parameters. If we restrict to coincident input, the number of states is given by the number of standard Young tableaux, d (λ) . This is because coincidence implies each single particle state is different, and so semistandard tableau become standard; in this case we have λ d (λ) 2 − 1 = N ! − 1 real parameters. This number decreases significantly if pure Label states are assumed. A pure state in d dimensions has 2(d − 1) real parameters, and every pure state added to a set can add at most one parameter beyond those required to describe its projection onto the d−1 dimensional space spanned by the states that came before it. Thus there are N d=2 (2(d − 2) + 1) = (N − 1) 2 real parameters in this case, which agrees with previous analyses [16] but is far fewer than the general case. Note that all of these quantities are of course larger than N 2 , the number of pairwise distinguishabilities classical intuition might lead one to believe are necessary to measure [25].
There are many other state discrimination scenarios we could consider. For example, we could try to un-  Table I (N = 2, 3, 4, 5) -these are in general far fewer than the number of successful discriminating occupations, and so easier to list. Recall that for ρs, the optimal choice of QF TN does not depend on the mode in which the single distinguishable photon is present, and neither do the occupations. Note that although all of the occupations not listed here satisfy Eq. (59), some might have zero probability of occurring and therefore not contribute to discrimination.
ambiguously discriminate ρ d from ρ s , or two entirely different states, or more than two states. Note that due to the 'nested' structure of our three states of interest (cf. Eq. (57)), attempting to find a UD POVM {E i , E d , E s , E ? } reduces to only being able discriminate ρ d from the rest. Another version of discrimination to consider is using bucket (yes/no) instead of number resolving detectors, which are simpler to engineer. While our focus has been on optimizing over all the possible measurement patterns to obtain the highest possible success probability, as mentioned in Sec. III E another type of optimisation that can be carried out is choosing a fixed set of patterns and optimizing the interferometer U only. The difference would be that in Eqs. (58,59) D would now be fixed, simplifying the problem. As an example, during the preparation of this manuscript a closely related paper was released [40], where the authors study a single reference photon input into a QF T N −1 , followed by QF T 2 HOM tests on the N − 1 outputs with the rest of the N − 1 photons (for a total of N photons in 2N − 2 modes). This is equivalent to a UD procedure where D is fixed as the set of N -fold coincidences. The approach is different and so it is not surprising that it is subopti-mal for discrimination, however this interferometer's behaviour is clear for all N .
Finally, we have no doubt that proofs for many of the results here, such as QF T N optimality for discriminating singly distinguishable states, should be possible, but they are left as further work.
The data associated with this paper is available for download at the University of Bristol data repository, data.bris [62].