Cyclic Orbit Codes and Stabilizer Subfields

Cyclic orbit codes are constant dimension subspace codes that arise as the orbit of a cyclic subgroup of the general linear group acting on subspaces in the given ambient space. With the aid of the largest subfield over which the given subspace is a vector space, the cardinality of the orbit code can be determined, and estimates for its distance can be found. This subfield is closely related to the stabilizer of the generating subspace. Finally, with a linkage construction larger, and longer, constant dimension codes can be derived from cyclic orbit codes without compromising the distance.


Introduction
Random network coding, introduced by Ahlswede et al. in [1], has proven to be a very effective tool for maximizing the information flow in a non-coherent network with multiple sources and sinks. The main feature of the network is that the nodes form random linear combinations of the incoming packets (vectors) and transmit the resulting packets further to their neighboring nodes. As a consequence, the receiver nodes (sinks) of the network will obtain linear combinations of the packets that have been injected into the network at its sources.
While this method is very effective in disseminating the information throughout the network, it is at the same time also highly sensitive to error propagation. Due to the linear combinations of packets that are formed and transmitted further, a single packet that has been corrupted (through noise, erasures, or injection of wrong packets by adversaries) may contaminate all further packets.
In order to overcome this deficiency, Kötter and Kschischang [11] developed an algebraic approach to random network coding by considering messages as subspaces of some fixed vector space F n . This nicely captures the main feature of the network flow, namely the linear combinations of the packets. In other words, codewords are now simply subspaces of F n , and a code is a collection of such subspaces. Transmitting information through the network is thus reformulated in terms of transmitting subspaces. The relevant distance measure for this setting depends on the particular type of problem to be studied, but in essence the distance between two subspaces amounts to the codimension of their intersection: the larger the intersection, the smaller the distance of the subspaces.
Their ground-breaking paper [11] initiated intensive research efforts on subspace codes, see [4,5,6,9,10,12,13,14,15] and the references therein. In [14], Silva and Kschischang derive further details on the appropriate metrics for the various networks models, while in [10], Khaleghi et al. determine various bounds for the cardinality and distance of subspace codes. Some of these bounds are improved upon by Etzion and Vardy in [6], and the authors also present further constructions of subspace codes. In [5], Etzion and Silberstein present a construction of subspace codes with large distance and cardinality which is based on rank-metric codes as introduced and studied earlier by Gabidulin in [8]. Decoding of such rank-metric codes is investigated by Gabidulin et al. in [9], and the results are further applied to subspace codes for various combinations of errors and erasures.
The paper at hand is most closely related to the references [4,6,12,13,15]. All these papers study, or touch upon, cyclic orbit codes. These are subspace codes that arise as an orbit of a subspace in F n under a cyclic subgroup of GL(n, F). If the group is irreducible, the code is called an irreducible cyclic orbit code. In this case, the group is conjugate to a subgroup of F * q n , and by considering the subspaces in the F-vector space F q n , one can utilize properties of the field extension F q n . In finite geometry, an element in GL(n, F) of order q n − 1 is called a Singer cycle. They thus generate irreducible cyclic subgroups of GL(n, F), and so their corresponding subspace codes are irreducible cyclic orbit codes.
In [12], Kohnert and Kurz make use of the field extension F q n along with solving linear inequalities under a Diophantine restriction in order to find subspace codes of constant dimension with large distance. The interesting fact is that they impose a prescribed automorphism group on the putative solutions in order to reduce the system of inequalities significantly, thus making the search feasible. Using the cyclic group F * q n , their method results in the union of cyclic orbit codes. In [12,Sec. 5] the authors present their results for length n = 6, . . . , 14, dimension k = 3, and distance d S = 4. Some of these codes improve upon the lower bounds for the cardinality that were known at that time, and most of these codes are still the best ones known for given length, dimension, and distance. In [4], Elsenhans et al. present a decoding algorithm for cyclic orbit codes of dimension 3.
In [6], Etzion and Vardy introduce the notion of a cyclic subspace code. In our terminology this is a collection of subspaces in F n = F q n that is invariant under multiplication by a primitive element α of F q n . In other words, a cyclic subspace code is a union of cyclic orbit codes, potentially of different dimensions. In [6, Sec. III] they present optimal cyclic codes of length 8 and 9 in the sense that there is no larger cyclic code of the same length and distance. Their example of length 9 improves upon the code of length 9, dimension 3, and distance 4 given by Kohnert and Kurz [12] because they were able to add a cyclic spread code (hence cardinality (2 9 − 1)/(2 3 − 1) = 73) to a collection of 11 cyclic orbit codes of cardinality 2 9 − 1 = 511. This leads to an optimal cyclic constant dimension code of cardinality 5694. This cardinality comes remarkably close to the bound A 2 (9, 4, 3) ≤ 6205, resulting from the Anticode bound, see [6,Thm. 1].
The above mentioned codes were all found by computer search based on the deliberate choice of F * q n as the automorphism group in order to make the search feasible. Despite this restriction on the search, the codes found all come quite close to known bounds. This indicates that cyclic orbit codes form a powerful class of constant dimension codes that needs to be investigated further.
Rosenthal and Trautmann [13] and Trautmann et al. [15] present an algebraic treatment of cyclic orbit codes by combining the ideas of [12] with detailed methods from the theory of group actions. They also extend their results to orbits under reducible cyclic groups.
We close this brief overview of the literature by mentioning that cyclic orbit codes also play a crucial role in the construction of q-analogs of Steiner systems; for details we refer to [2,7] and the references therein.
In this paper we will study cyclic orbit codes generated by subspaces of F q n by specifying the largest subfield of F q n over which the given subspace is a vector space. This subfield, later called the best friend of the code or subspace, is closely related to the stabilizer of the orbit. Designing a subspace with a pre-specified best friend allows us to control cardinality and distance of the orbit code. In particular, we can give estimates on the distance in terms of the best friend. Moreover, using the best friend we are able to compute the distance with the aid of multisets. The computation improves upon earlier results in [12,13] by reducing the cardinality of the multiset.
Finally, we will present a construction that allows us to link cyclic orbit codes leading to longer and larger constant dimension codes without compromising the distance.

Preliminaries
We fix a finite field F = F q . Recall that a subspace code of length n is simply a collection of subspaces in F n . The code is called a constant dimension code if all subspaces have the same dimension. The subspace distance of a subspace code C is defined as where the distance between two subspaces is This distance may be interpreted as the number of insertions and deletions of vectors that is needed in order to transform a basis of V into a basis of W. It thus coincides with the corresponding graph distance (the length of the shortest path from V to W in the graph with vertices being the subspaces of F n and where two subspaces are joined by an edge if they differ by dimension one and the smaller one is contained in the larger one).
The dual of a subspace code C is defined as It is easy to see that d S (V ⊥ , W ⊥ ) = d S (V, W), and therefore d S (C) = d S (C ⊥ ).
Two subspace codes C, C ′ of length n are called linearly isometric if there exists an F-linear isomorphism ψ : F n −→ F n such that C ′ = {ψ(U ) | U ∈ C}. This terminology stems from the fact that isomorphisms preserve dimensions of subspaces and thus preserve the distance between any two subspaces. Hence linearly isometric codes have the same subspace distance and even the same distance distribution, i.e., the list of all distances between any two distinct subspaces in C coincides up to order with the corresponding list of C ′ . In [15,Def. 9] linear isometries are denoted as GL n (F)-isometries.
Consider now the field extension F q n . Since the F-vector spaces F n and F q n are isomorphic, we may consider subspace codes as collections of subspaces in F q n . In this paper we will focus specifically on subspace codes that are given as orbits under a particular group action.
In order to make this precise, we fix the following terminology. An element β of F q n is called irreducible if the minimal polynomial of β in F[x], denoted by minpoly(β, F), has degree n. Hence F q n = F[β]. As usual, we call β (and its minimal polynomial) primitive if the multiplicative cyclic group generated by β, denoted by β , equals F * q n . We will study subspace codes that are derived from the natural action of the group β on F q n . This action induces an action on the set of subspaces of F q n , and thus gives rise to the following type of constant dimension codes. These codes were introduced in a slightly different form in [13,15]; we will comment on the relation to [13,15] after the definition.
Definition 2.1. Fix an irreducible element β of F q n . Let U be a k-dimensional subspace of the F-vector space F q n . The cyclic orbit code generated by U with respect to the group β ⊆ F * q n is defined as the set Obviously, a cyclic orbit code is a constant dimension code. Let us briefly relate our approach to [6,13,15].
be the minimal polynomial of β. The F-vector spaces F q n and F n are isomorphic via the coordinate map with respect to the basis 1, β, . . . , β n−1 . In other words, we have the F-isomorphism ϕ : F q n −→ F n , n−1 i=0 a i β i −→ (a 0 , . . . , a n−1 ). (2.5) Let M f ∈ GL n (F) be the companion matrix of f , thus 1 (2.6) Since f is the minimal polynomial of β, multiplication by β in F q n corresponds to multiplication by M f in F n under the isomorphism ϕ, i.e., ϕ(aβ i ) = ϕ(a)M i f for all a ∈ F q n and i ∈ N. (2.7) Using the isomorphism (2.5) of F q n with F n , the orbit code C := Orb β (U ) takes the following form. We can write ϕ(U ) as ϕ(U ) = im U := {xU | x ∈ F k }, i.e., the rowspace of U , for a suitable matrix U ∈ F k×n of rank k. Then ϕ(U β i ) = im (U M i f ), where M f is as in (2.6). Thus, under the isomorphism (2.5) the orbit code Orb β (U ) simply becomes In other words, the action of the cyclic group β ≤ F * q n on subspaces in F q n turns into the action of the cyclic group M f ≤ GL n (F) on subspaces in F n .
In [13,15] the authors introduce, more generally, orbit codes in F n with respect to a subgroup of GL n (F). These are subspace codes of the form {im (U A) | A ∈ G}, where U is any matrix of rank k in F k×n and G a subgroup of GL n (F). The orbit code is called cyclic if the group G is cyclic and irreducible if G is irreducible, i.e., it does not have any nontrivial invariant subspaces in F n .
It is easy to see that the cyclic group M f ≤ GL n (F) is irreducible whenever f is an irreducible polynomial. Hence the orbit codes in Definition 2.1 are irreducible cyclic orbit codes in the sense of [13,15].
Furthermore, every irreducible matrix A ∈ GL n (F) has an irreducible characteristic polynomial, say g ∈ F[x], and A is similar to the companion matrix M g ; see also [15,Sec. IV.A]. Thus A = SM g S −1 for some S ∈ GL n (F), and the irreducible cyclic subgroup G = A of GL n (F) is conjugate to the cyclic subgroup M g . As a consequence, the isomorphism of F n induced by S yields a linear isometry between [13,Thm. 9].
All of this shows that the study of irreducible cyclic orbit codes may be restricted to orbit codes with respect to irreducible cyclic subgroups of F * q n , and these are exactly the codes in Definition 2.1. In this context, matrices of order q n − 1 in the group GL n (F) are also called Singer cycles. They thus correspond to the primitive elements of F q n .
In [6, p. 1170], the authors introduce cyclic subspace codes in F q n . These are codes that are invariant under multiplication by a primitive element, say α, of F q n . In other words, a cyclic subspace code is a union of primitive cyclic orbit codes, i.e., C = T t=1 · Orb α (U t ). In [6] the authors do not require that C be a constant dimension code, hence U 1 , . . . , U T may have different dimensions.
We close this section with the following simple fact.
Remark 2.2. The dual of an orbit code (in the sense of (2.3)) is an orbit code again. Indeed, for any subspace U ∈ F n and matrix A ∈ GL n (F) we have (U A) ⊥ = U ⊥ (A T ) −1 . Moreover, A T = SAS −1 for some S ∈ GL n (F), and therefore Orb β (U ) ⊥ is linearly isometric to Orb β (U ⊥ ); see also [15,Thm. 18].
As a consequence, we may and will restrict ourselves to cyclic orbit codes generated by a subspace U with dim U ≤ n/2.

Stabilizer Subfield and Cardinality of Cyclic Orbit Codes
Throughout this section we fix an irreducible element β of F q n .
Consider a k-dimensional subspace U of F q n and its orbit code Orb β (U ). In the following, we will mainly restrict ourselves to subspaces U that contain the identity 1 ∈ F q n . This will facilitate later considerations of the cardinality of the orbit code. The restriction is not at all severe because if 1 ∈ U then for any nonzero element u ∈ U the subspaceŨ := U u −1 contains 1. Since the Fisomorphisms on F q n given by multiplication with nonzero constants commute,Ũ β i = U β i u −1 , and therefore multiplication by u −1 provides a linear isometry between Orb β (U ) and Orb β (Ũ ). Note also that if u −1 ∈ β , e.g., if β is primitive, then Orb β (U ) and Orb β (Ũ ) are equal.
Recall that the stabilizer of the subspace U under the action induced by β is defined as This is clearly a subgroup of β . Let N ∈ N be the minimal integer such that Stab β (U ) = β N . Then N is a divisor of |β| and with the aid of the orbit-stabilizer theorem from group actions we have We define the following subfield related to the stabilizer.
Definition 3.1. Let Stab + β (U ) be the smallest subfield of F q n containing F and the group Stab β (U ).

It is clear that Stab
. From this it follows immediately that U is a vector space over Stab + β (U ). We wish to briefly comment on the relation to representation theory.
. Via multiplication in F q n , the group G has a natural F-representation in GL(U ), where GL(U ) denotes the group of F-automorphisms of U . As always for group representations, this naturally induces an F[G]-module structure on U . In this case, this is the same as the canonical F[γ]-vector space structure -as we have already observed in the previous paragraph. As a consequence, an F-linear In other words, the intertwining algebra of the above representation of G is given by End F[γ] (U ). Irreducibility of the representation (i.e. U does not have any non-trivial G-invariant subspaces) is the same as saying that U does not have any non-trivial F[γ]-subspaces. Therefore the above representation is irreducible if and only if dim F[γ] (U ) = 1. We fix the following notation. For a primitive element α, thus α = F * q n , we drop the subscript α and simply write Orb(U ), Stab(U ) and Stab + (U ). The identities in (3.1) and (3.2) then read as In this particular case, we have the following result.
Moreover, U is a vector space over Stab + (U ) with scalar multiplication being the multiplication of the field F q n .
Proof. We know that Stab(U ) = {γ ∈ F * q n | U γ = U } is a subgroup of F * q n and contains F * . Thus it remains to show that Stab(U ) ∪ {0} is closed under addition. Let γ, γ ′ ∈ Stab(U ), i.e., U γ = U = U γ ′ . If γ +γ ′ = 0, then γ +γ ′ ∈ Stab(U )∪{0}, and we are done. Now let γ +γ ′ = 0. Then All of this shows that Stab(U ) ∪ {0} ⊂ F q n is closed under multiplication and addition, making it a subfield, and in fact the smallest subfield containing Stab(U ). Since 1 ∈ U , the stabilizer property shows immediately that Stab + (U ) is contained in U and that U is a vector space over Stab + (U ) (see also Remark 3.2).
In the case where n is prime, the only proper subfield of F q n is F. Thus, we have the following result.
Corollary 3.4. If n is prime, then Stab(U ) = F * , and thus |Orb(U )| = q n −1 q−1 for every proper subspace U ⊂ F q n .
Let us now return to the general case where β is irreducible. The containments Stab β (U ) ⊆ Stab(U ) ⊆ Stab + (U ) lead immediately to the following situation for the non-primitive case.
Hence it is contained in U and U is a vector space over Stab + β (U ).
The following example shows that the containment Stab + β (U ) ⊆ Stab + (U ) may be strict.
Example 3.6. Consider F = F 3 and F q n = F 3 4 . Fix the primitive element α with minimal polynomial x 4 + x + 2. Consider β := α 16 , which has order 5. Then β is an irreducible element of F 3 4 because its minimal polynomial is found to be minpoly(β, Moreover, since 1 ∈ U , any γ satisfying U γ = U is already in U . But then the relative primeness of the orders of the groups β and F * Let us briefly consider an extreme case. Since F * q is always contained in Stab(U ), we conclude that |Stab(U )| ≥ q − 1. Using (3.2) above, this leads to |Orb(U )| = N ≤ q n −1 q−1 . As a consequence, Assume now that k divides n, and thus F q k is a subfield of Proof. From Corollary 3.5 we know that Stab + β (U ) = F q r for some r and that U is a vector space over F q r . Thus r divides k and so q r − 1 divides q k − 1. Moreover, since Stab β (U ) is a subgroup of F * q r ∩ β its order divides q r − 1 as well as |β|. All of this shows that |Stab β (U )| divides gcd(|β|, q k − 1), and now the first statement follows from the identities in (3.2).
For the second part, note first that by assumption, q k − 1 divides |β|. Thus the first statement is just a special case of the previous part. For the rest, set D := |β| q k −1 . "⇒" With the notation as in (3.2), we have D = N . Since |β N | = |β| gcd(N,|β|) = |β| N = q k − 1, the uniqueness of subgroups of a cyclic group gives us β N = F * q k . Now the fact that β N = Stab β (U ) with Corollary 3.5 imply Stab + . This shows that |Orb β (F q k )| = D, and using (2.1) we also see that d S Orb β (F q k ) = 2k.
We have the following special case of the previous result. Recall the notation from (3.3).
is a partial spread for any irreducible element β. This result is also found in [13,Thm. 11,Cor. 12].
Let us return to Lemma 3.3. The following notion will arise repeatedly, so we introduce terminology for convenience. 2 is a vector space over F q r with scalar multiplication being the multiplication in the field F q n . The largest friend of U (with respect to cardinality) is called the best friend of U .
Note that since U is a subspace of the F-vector space F q n , the field F is a friend of U , and thus U also has a best friend. Remark 3.11. For any subspace U of F q n and any friend F q r of U we have 1 ∈ U ⇐⇒ F q r ⊆ U . Proposition 3.12. Let U be a k-dimensional subspace of F q n with 1 ∈ U . Then the subfield Stab + (U ) is the best friend of U . Furthermore, any friend of U is contained in the best friend.
Proof. We know from Lemma 3.3 that Stab + (U ) is a friend of U . Moreover, if F q l is a friend of U , then U γ = U for all γ ∈ F * q l by closure of the scalar multiplication. This implies F * q l ⊆ Stab(U ), hence F q l ⊆ Stab + (U ).
It is a consequence of the last result that all subspaces in Orb(U ) have the same best friend, say F q r , and we may therefore call F q r the best friend of the orbit code.
Example 3.6 shows that we do not have an analogous characterization for Stab + β (U ), when β is not primitive.
The identities in (3.2) now read as follows. This result facilitates the design of orbit codes with a prescribed cardinality. In the following we use dim F q l (U ) for the dimension of a vector space U over the field F q l . We also set dim U := dim F U .
Example 3.14. The following subspace U is taken from [6, Ex. 1], where the distance and cardinality of the resulting orbit code have been determined by straightforward testing and enumeration. Consider F = F 2 and the field F 2 6 with primitive element α having minimal polynomial x 6 + x + 1 ∈ F[x]. Let U := {0, α 0 , α 1 , α 4 , α 6 , α 16 , α 24 , α 33 }. It is straightforward to check that this is a vector space over F (generated by, for instance, {1, α, α 4 }). Using the isomorphism ϕ : 5 i=0 a i α i −→ (a 0 , . . . , a 5 ) between the vector spaces F 2 6 and F 6 2 , see (2.5), the subspace ϕ(U ) is given by Since dim U = 3 it is clear that U is not a vector space over the subfield F 2 2 . Furthermore, U does not coincide with the subfield F 2 3 because the latter contains the element α 9 . All of this shows that F is the best friend of U and thus |Orb(U )| = 2 6 − 1 = 63 by the last corollary.

The Subspace Distance of Cyclic Orbit Codes
In the previous section we determined the cardinality of an orbit code in terms of the best friend. Now we turn to the minimum distance of these codes, again making use of the best friend. Throughout this section, we restrict ourselves to orbit codes with respect to the cyclic group F * q n . Thus we fix a primitive element α ∈ F * q n . Moreover, let U be a k-dimensional subspace of F q n . We usually assume k ≤ n/2 (see Remark 2.2), but will not make explicit use of this assumption. Recall that the orbit code Orb(U ) = Orb α (U ) contains a subspace U ′ such that 1 ∈ U ′ . Therefore, we may assume without loss of generality that 1 ∈ U . Finally, let F q r be the best friend of U , and define From Corollary 3.13 we know that the cardinality of Orb(U ) is given by N := q n −1 q r −1 . For the study of the subspace distance, we note that for orbit codes the minimum distance is given by This follows directly from the identity d S (U α l , U α m ) = d S (U , U α m−l ).

Bounds on the Subspace Distance via the Stabilizer
The following lemma serves to show the simple fact that the subspace distance is a multiple of 2r. This is so because the intersection of any two subspaces in Orb(U ) is a vector space over F q r .
As a consequence, Of course, the upper bound d S Orb(U ) ≤ 2k is true for all constant dimension codes of dimension k (which by assumption is at most n/2) as we saw already in (2.2).
Proof. Let 1 ≤ j < N . Clearly, U α j and thus U ∩ U α j are vector spaces over F q r . Let s j := dim F q r (U ∩ U α j ). Since 1 ≤ j < N , we know U = U α j , and therefore 0 ≤ s j < t. Thus, Comparing the lower bound 2r with Corollary 3.13, we observe the usual trade-off between the cardinality of an orbit code and its (potential) distance: the larger the best friend, the smaller the code, but the better the lower bound for the distance.
If any (hence all) of these properties are true, then Orb(U ) is a spread code.
Proof. Using the fact that 1 ∈ U the second equivalence is obvious. The implication "⇐=" of the first equivalence has been dealt with in Corollary 3.8. As for "=⇒", note that Lemma 4.1 implies that U α j ∩ U = {0} for all j, hence Orb(U ) is a partial spread. Since |Orb(U )| = (q n − 1)/(q r − 1), the union of all subspaces in the orbit results in (q k − 1)(q n − 1)/(q r − 1) distinct nonzero points in F q n . Since r ≤ k, this implies r = k.
The previous results have shown that the best distance for a k-dimensional primitive orbit code is 2k, in which case the code is a spread. On the other hand, Proposition 3.7 tells us that these codes have the smallest cardinality among all k-dimensional primitive orbit codes.
The next lemma shows that the worst distance, namely d S (Orb(U )) = 2r, is attained whenever the defining subspace U has a particularly regular form.
i=0 α li F q r for some 1 ≤ l < q n −1 q r −1 , and where F q r is the best friend of U . Then d S (Orb(U )) = 2r.
and dim F q r (U ∩ α l U ) = t − 1, which is the maximum possible intersection between any two distinct subspaces in the orbit code. Hence in the notation of Lemma 4.1 we have s = t − 1, and d S (Orb(U )) = 2r.
Observe that in the previous lemma we added the requirement that F q r be the best friend of U because this does not follow from the form of U . Indeed, U = t−1 i=0 α li F q r only implies that F q r is a friend of U , but it may not be the best friend. For instance, in F 2 6 with primitive element α we have F 2 2 = F 2 ⊕ α 21 F 2 , hence the best friend is F 2 2 . The following result shows that this is essentially the only type of case where F q r is not the best friend.
In other words, F q r is the best friend of U if and only if U is not a field.
Proof. First of all, the directness of the sum implies immediately that deg(minpoly(α l , F q r )) ≥ t. As for the chain of equivalences we argue as follows. 1) Assume U = F q rt . Then U is a field and the form of U shows that U = F q r [α l ]. This implies deg(minpoly(α l , F q r )) = t.
2) deg(minpoly(α l , F q r )) = t yields dim F q r F q r [α l ] = t, and since U is contained in this field, we have U = F q r [α l ]. This implies α l U = U . 3) If α l U = U , then α l ∈ Stab(U ) and hence α l is contained in the best friend. Since due to the directness of the sum, α l is not in F q r , we conclude that F q r is not the best friend of U . 4) Assume that the best friend of U is F q r ′ for some r ′ > r. Set dim F q r ′ U = t ′ . Then rt = k = r ′ t ′ .
We show that α l U = U . Assume to the contrary that α l U = U . Then dim F q r ′ (U ∩ α l U ) ≤ t ′ − 1. On the other hand t−1 i=1 α il F q r ⊆ (U ∩ α l U ). Considering dimensions over F = F q we obtain the inequality r(t − 1) ≤ r ′ (t ′ − 1), and using rt = r ′ t ′ this yields r ≥ r ′ , a contradiction. Thus α l U = U , and this implies that α lt = t−1 i=0 a i α li for some a i ∈ F q r . But this means that deg(minpoly(α l , F q r )) = t and U = F q r [α l ] = F q rt .
Of course, there are also subspaces that are not of the form in Lemma 4.3 and yet generate orbit codes with distance as low as 2r.
Let us now return to the case where the distance is large. According to Lemma 4.1 the best distance a non-spread orbit code may achieve is 2(k − r). Example 4.6. (a) The code in Example 3.14 is optimal among all non-spread orbit codes: in [6, p. 1170] the distance has been found as 4, and this is 2(k − 1). (b) Consider the code in Example 3.15(a). In this case k = 6 and r = 2. One can verify that dim F 2 2 (U ∩ U α j ) ≤ 1 for all 1 ≤ j < 1365 = |Orb(U )|. Hence Lemma 4.1 yields d S (Orb(U )) = 2(k − r) = 8, which means the code is optimal among all non-spread orbit codes.
Example 4.7. Let dim F q r (U ) = t = 2, hence k = 2r. Then 2r = 2(k − r), and thus d S (Orb(U )) = 2(k − r) due to Lemma 4.1. Thus any such code is optimal among all non-spread orbit codes with best friend F q r .
Next we give a condition that leads to a distance less than 2(k − r). Consider an intersection V := U ∩ U α j for some j. Then V is an F q r -subspace of U , and thus F q r is a friend of V. It is a consequence of Proposition 3.12 that the best friend of V is F q r ′ for some r ′ such that r | r ′ . Proposition 4.8. Suppose there exists a subspace V of U with best friend F q r ′ for some r ′ > r.
Proof. Since F q r ′ is the best friend of V, Corollary 3.13 yields So there exists some j such that Example 4.5 illustrates this case. The subspace W has best friend F 2 2 , while also containing the field F 2 4 . Since that subspace is its own best friend, Lemma 4.1 and Proposition 4.8 guarantee 2r = 4 ≤ d S (Orb(W)) ≤ 2(6 − 4) = 4, as we already saw.
We would like to stress that the condition in Proposition 4.8 is not necessary for the distance to be less than 2(k − r). Lemma 4.3 provides examples of such codes. For instance, the subspace U of F 2 7 generated by 1, α, α 2 (where α is a primitive element of F 2 7 ) has distance d S (Orb(U )) = 2r = 2 < 2(k − r). But since F 2 is the only subfield of F 2 7 , every subspace of U has best friend F 2 , and the assumption of Proposition 4.8 is not satisfied.
Unfortunately, we do not know any general construction of cyclic orbit codes with cardinality (q n − 1)/(q r − 1) and distance 2(k − r), i.e., the best non-spread code case. In [15, p. 7396] it is conjectured that for any n, k, q there exists a cyclic orbit code of cardinality (q n − 1)/(q − 1) and distance 2(k − 1). In the same paper the conjecture is also verified for randomly chosen sets of (n, k, q) ∈ {4, . . . , 100} × {1, . . . , 10} × {2, 3}. However, by exhausting all possible 4-dimensional subspaces in F 8 2 via their row echelon form we could verify that no cyclic orbit code exists with parameters (n, k, r, q) = (8, 4, 1, 2), hence with cardinality 255 and distance 6. While there exists such a code for (n, k, r, q) = (6, 3, 1, 2) and distance 4, it remains open whether there is a cyclic orbit code with parameters (2k, k, 1, q) and distance 2(k − 1) for any k > 4. The usual bounds, see e.g. [16], do not rule out the existence of such codes. Example 4.9. Let us consider cyclic orbit codes in F 2 12 of dimension k = 6 and with best friend F 2 . Due to Corollary 3.13, such a code has cardinality 2 12 − 1 = 4095. Because of the above discussion, we have doubts that there exists such a code with distance 2(k − 1) = 10, but we did not perform an exhaustive search. The best code we could find with a random search has distance 8 and is generated by U = F 2 +αF 2 +α 4 F 2 +α 10 F 2 +α 10 βF 2 +α 8 β 2 F 2 , where α and β are primitive elements of F 2 12 and F 2 6 , respectively.
We close this section with the following positive observation. Note that the codes found below will be used again in Example 5.4 to build larger codes of the same quality.
. The same is true (maximal cardinality and distance 4) for q = 3, 5, 7 and n ∈ {6, 7, 8} and the analogous subspace U . We did not explore larger values of q and n.

Computing the Subspace Distance via Multisets
We now turn to a more explicit computation of the subspace distance of a cyclic orbit code. The next result improves upon [13,Thm. 15,Prop. 16], which in turn goes back to [12,Lem. 1]. By taking the best friend into account, we will be able to work with a smaller multiset than in [13], and we do not have to distinguish between orbits of size q n − 1 (which can occur only if q = 2) and those of smaller size.
As before let U have best friend F q r . Lemma 3.3 yields and |O(v)| = | α N | = q r − 1, since all elements of the orbit must be distinct.
By modular arithmetic there is exactly one element of this orbit whose exponent is strictly less than N . Hence Since U is an F q r -vector space, the orbit O(u) is in U for every u ∈ U . This shows that and suitable non-negative integers b 1 , . . . , b S < N. For the following result, recall that a multiset is collection of elements where each element is allowed to appear more than once. We will denote multisets by double braces {{. . .}}. The number of times an element appears in the multiset is called its multiplicity.
By assumption there are m(J) pairs (b l , b m ) so that b l − b m ≡ J mod N . Thus, we obtain that (U ∩ U α J )\{0} is the union of at most m(J) orbits. This shows that |U ∩ U α J | ≤ m(J)(q r − 1) + 1.
To show equality, note that there are m(J) , and so this orbit is in U ∩U α J . This shows that there are m(J) orbits in the intersection, and we conclude that |U ∩ U α J | = m(J)(q r − 1) + 1. Thus dim(U ∩ U α J ) = log q (m(J)(q r − 1) + 1).

A Linkage Construction
In this section we present a construction of how to use cyclic orbit codes to construct subspace codes with longer length.
In order to do so, it will be convenient to present subspaces as rowspaces of suitable matrices. In other words, we will now consider subspaces in F n q rather than F q n . Hence the orbit code Orb α (U ) becomes {im U M i | i = 0, . . . , |Orb α (U )| − 1} as in (2.8), where M is the companion matrix of minpoly(α, F q ), and U ∈ F k×n is a matrix such that its rowspace im U is ϕ(U ) with the isomorphism ϕ in (2.5).
A constant dimension code in F n q of dimension k, cardinality M , and subspace distance d will be called a (n, M, d, k) q code. Recall also the notation [N ] := {1, . . . , N }.
The following construction resembles the one given in the proof of [6,Thm. 11]. The latter, however, is tailored specifically to the use of a spread code as C 1 and a specific choice of C 2 . This allows a larger codeC 3 than our construction below. In Theorem 5.6 below we will, however, generalize [6,Thm. 11] by making appropriate choices.
Thus U i,l are matrices of rank k in F k×n i for all i, l. Define the subspace code C 1 ⊛ C 2 of length n := n 1 + n 2 as The reader should note that the code C 1 ⊛ C 2 depends not only on C 1 and C 2 , but on the actual choice of the matrices representing the subspaces. Therefore the notation C 1 ⊛ C 2 is not entirely correct, but this should not lead to any confusion.
Proof. The cardinality of C 1 ⊛C 2 is clear because the three setsC i are pairwise disjoint. Furthermore, it is obvious that d S (C i ) = d S (C i ) for i = 1, 2. Moreover, since each subspace inC 1 intersects trivially with each subspace inC 2 orC 3 , we conclude that d S (W 1 , W 2 ) = 2k for all W 1 ∈C 1 and W 2 ∈C 2 ∪C 3 . The same is true for the distance between subspaces inC 2 and those inC 1 ∪C 3 .
This also shows that ⊛ is associative, and we simply write C 1 ⊛C 2 ⊛C 3 . Using U i,0 for the (k×n i )-zero matrix, the result for the t-fold ⊛-product can be presented in the following form. One may now ask what type of structure the resulting code has if the constituent codes are cyclic orbit codes. A partial answer is provided with the following result. It restricts to the case of primitive cyclic orbit codes over F 2 that each have F 2 as the best friend. Proposition 5.3. Let q = 2. For i = 1, . . . , t let α i be a primitive element of F 2 n i , and let C i = Orb α i (U ) be a cyclic orbit code of dimension k, length n i , and cardinality 2 n i − 1. If gcd(n 1 , . . . , n t ) = 1 then C 1 ⊛ . . . ⊛ C t is a union of cyclic orbit codes with respect to a fixed cyclic subgroup of GL n (F 2 ), where n = t i=1 n i .
Note that due to Theorem 5.2 the code C := C 1 ⊛ . . . ⊛ C t has cardinality 2 n − 1. But one should also observe that C is not necessarily cyclic with respect to the group F * 2 n . As we will see in the proof, the cyclic subgroup of GL n (F 2 ) referred to in the theorem has order t i=1 (2 n i − 1), and this is less than 2 n − 1 if t > 1.
Proof. Denote by M i ∈ GL n i (F) the companion matrix of the minimal polynomial of α i over F q , see (2.6). Then, as in (2.8), the codes C i are given by The code C := C 1 ⊛ . . . ⊛ C t has the form . . , V t ) = (0, . . . , 0) .
Using the notation W j ∈ F k×n , j = 1, . . . , 2 t − 1, for the 2 t − 1 choices for (V 1 , . . . , V t ), the code C is the union of 2 t − 1 codes of the form Note that each M i generates a cyclic group of order 2 n i − 1. Hence the direct product of these groups is a cyclic group if and only if gcd(2 n 1 − 1, . . . , 2 nt − 1) = 1, which in turn is the case if and only if gcd(n 1 , . . . , n t ) = 1. As a consequence, if gcd(n 1 , . . . , n t ) = 1, then each set C (j) is an orbit code with respect to this cyclic group, and thus C is the union of cyclic orbit codes.
We remark that the above does not provide a necessary condition for C to be a union of cyclic orbit codes because it may happen that C is such a code without the lengths being relatively prime. As we show next, applying the linkage construction to cyclic orbit codes results in a code whose cardinality is upper bounded by the maximum cardinality of a cyclic orbit code of the same length.
Proposition 5.5. Let C i , i = 1, . . . , t, be as in Proposition 5.3, and let n := t i=1 n i . Then C := C 1 ⊛ . . . ⊛ C t satisfies |C| ≤ q n −1 q−1 with equality if and only if q = 2 and F 2 is the best friend of C i for all i.
Proof. Let F q r i be the best friend of C i . Then |C i | = q n i −1 q r i −1 . Using Theorem 5.2 we compute In order to do so, we induct on t. It is clear that it suffices to consider the case t = 2. Using that q n 1 −1 q−1 + 1 ≤ q n 1 , we compute which is what we wanted. This proves |C| ≤ q n −1 q−1 . Finally, we have equality in (5.1) if and only if r i = 1 for all i, and equality in (5.2) if and only if q = 2. This concludes the proof.
The cardinality of the linkage code in Theorem 5.1 can be increased if one of the two constituent codes is a subset of a cyclic orbit code. In this case we can extend the codeC 3 by allowing all powers of the primitive element, regardless of the stabilizer of the constituent orbit code. As we will see in the proof, the linkage to the other constituent will guarantee that the distance is not compromised. The construction in the proof of [6,Thm. 11] by Etzion and Vardy may be regarded as the special case where N 2 = 1 and C 1 is a cyclic orbit spread code.
Theorem 5.6. Let C 1 = {im U 1,l | l ∈ [N 1 ]} be a (n 1 , N 1 , d 1 , k) q code, thus U 1,l ∈ F k×n 1 are matrices of rank k. Furthermore, let α be a primitive element of F q n 2 , and denote by M ∈ GL n 2 (F) the companion matrix of the minimal polynomial of α. Let U 2 ∈ F k×n 2 be a matrix of rank k and C 2 be a subset of the cyclic orbit code Orb(im U 2 ) of length n 2 . Hence there exists a set L ⊆ {0, 1, . . . , q n 2 − 2} such that C 2 = {im (U 2 M l ) | l ∈ L} and C 2 is a (n 2 , N 2 , d 2 , k) q code where N 2 = |L|. Define the subspace code C of length n := n 1 + n 2 as C =C 1 ∪C 2 ∪C 3 , wherẽ Then C is a (n, N, d, k) q code, where N = N 1 + N 2 + (q n 2 − 1)N 1 and d = min{d 1 , d 2 }.
Proof. Comparing with Theorem 5.1 and its proof, we see that the only case that remains to be considered is the distance between two subspaces of the form X = im (U 1,l , U 2 M m ) and Y = im (U 1,l ′ , U 2 M m ′ ), where l = l ′ or m = m ′ . If l = l ′ , then im (U 1,l ) = im (U 1,l ′ ), and as in the proof of Theorem 5.1 we conclude dim(X ∩ Y) ≤ dim im (U 1,l ) ∩ im (U 1,l ′ ) , and thus d S (X , Y) ≥ max{d 1 , d 2 }, as desired.
Let now l = l ′ . Then m = m ′ , but since m, m ′ ∈ {0, . . . , q n 2 − 2}, we may have that im U 2 M m = im U 2 M m ′ , and thus we have to be more detailed. Let (x 1 , x 2 ) ∈ X ∩ Y, say (x 1 , x 2 ) = z(U 1,l , U 2 M m ) = z ′ (U 1,l , U 2 M m ′ ). Then the full row rank of U 1,l yields z = z ′ and thus x 2 = z(U 2 M m ) = z(U 2 M m ′ ). Using the isomorphism ϕ from (2.5), this translates into ϕ −1 (x 2 ) = cα m = cα m ′ , where c = ϕ −1 (zU 2 ). This is an identity in the field F q n , and since m, m ′ are less than the order of α, we have α m = α m ′ , and so c = 0. Thus z = 0 and X ∩ Y = {0}. All of this shows that if l = l ′ then d S (X , Y) = 2k ≥ max{d 1 , d 2 }, and this concludes the proof.
We close the section with an example illustrating the construction.
Example 5.7. Let k = 3. In F 6 2 , choose the spread code C 1 = Orb(F 2 3 ). This is a (6, 9, 6, 3) 2 code, where the cardinality follows from Corollary 3.8. In Let M ∈ GL 7 (F 2 ) be the companion matrix of the minimal polynomial of α. Then one can check that the subset C 2 of C ′ given by is a partial spread. Thus C 2 is a (7, 13, 6, 3) 2 code. Applying Theorem 5.6 to C 1 and C 2 results in a (13, 1165, 6, 3) 2 code C, where the cardinality stems from 9 + 13 + 9(2 7 − 1) = 1165. This cardinality comes remarkably close to the upper bound (2 13 − 2)/7 − 1 = 1169 for partial 3-spreads in F 13 2 , see [3,Thm. 5]. In fact, the difference of 4 is due to the fact that the partial spread C 2 in F 7 2 is not maximal. Again with [3] it is known that one can find partial spreads in F 7 2 with 17 elements, as opposed to our 13 = |C 2 |. While for k = 3 and q = 2 maximal partial spreads are known for any n due to [3], we believe that Theorem 5.6 bears promising potential for larger k.

Conclusion and Open Problems
We have presented a detailed study of cyclic orbit codes based on the stabilizer subfield. As has become clear, these codes have a rich structure which allows us to infer properties such as cardinality and estimates on the distance. While cyclic orbit codes themselves are in general not very large, taking unions of such codes has resulted in constant dimension codes whose cardinalities come very close to known bounds. Codes of this form have been found earlier in [6,12] via computer search; see the introduction of this paper for further details. Unfortunately, no systematic construction of unions of cyclic orbit codes or other orbit codes is known so far. This and other observations in the previous sections lead to the following open problems.
(1) Find constructions of good cyclic subspace codes. In other words, find systematic ways to take unions of cyclic orbit codes without decreasing the distance. (2) Cyclic orbit codes with maximum distance, that is, 2k, are spread codes (Corollary 4.2) and thus well understood. The best distance a non-spread cyclic orbit code of dimension k can attain is thus 2(k − 1), but a construction of such codes is not yet known. Therefore we formulate: For given n and k ≤ n/2 construct cyclic orbit codes of length n, dimension k and distance 2(k − 1) or prove that no such code exists. See also Example 4.10 and the paragraph right before Example 4.9. (3) Make use of the algebraic structure of cyclic orbit codes in order to find efficient decoding algorithms. This has been initiated already in [4,15], but as discussed in the conclusion of [15] further research is needed. (4) Use other groups for constructing orbit codes. For instance, in [2] the authors discovered nontrivial q-analogs of Steiner systems by testing unions of subspace orbits under the action of the normalizer group of F * q n in GL(n, F q ) (thus under the combined action of F * q n and the Galois group Gal(F q n | F q )).
(5) In Section 5 we have shown a linkage construction for general constant dimension codes and an improved version for cyclic orbit codes. We believe that this construction can be further enhanced by using suitable constituent codes.