{'fraction_non_alphanumeric': 0.03707179727827311, 'fraction_numerical': 0.010774284373533552, 'mean_word_length': 4.247316064217473, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Parsing a sequence of qubits

We develop a theoretical framework for frame synchronization, also known as block synchronization, in the quantum domain which makes it possible to attach classical and quantum metadata to quantum information over a noisy channel even when the information source and sink are frame-wise asynchronous. This eliminates the need of frame synchronization at the hardware level and allows for parsing qubit sequences during quantum information processing. Our framework exploits binary constant-weight codes that are self-synchronizing. Possible applications may include asynchronous quantum communication such as a self-synchronizing quantum network where one can hop into the channel at any time, catch the next coming quantum information with a label indicating the sender, and reply by routing her quantum information with control qubits for quantum switches all without assuming prior frame synchronization between users.


I. INTRODUCTION
Quantum information processing is expected to make various kinds of seemingly formidable task manageable and may make what is impossible in the classical domain possible [1]. In order to realize such large-scale quantum computation and quantum communication, it is vital to develop theoretical foundations. To this end, various notions have been introduced and investigated in quantum information science, some of which are quantum analogues of important concepts in classical information theory and others unique to the quantum world.
Frame synchronization is one of the most important building blocks of basic data manipulations. Because virtually all information we process has some kind of frame structure, without synchronization between the information source and sink, one can not manipulate information as intended. For instance, the phrase "classical information" will lose its meaning if we combine the two words into one string of twenty letters "classicalinformation" or divide it at a different position as in "classicalin formation." The English text the reader is reading now is a sequence of blocks of classical information, or words, with spaces as metadata that indicate the boundaries between each information block.
A typical example in a communications scenario is packet framing for a classical communication network, where the sender encapsulates each packet of data into a frame and provides information the network needs to deliver the data, such as destination addresses. The additional information is metadata, or overhead data, to the actual information content, or the payload. The supplementary data are often provided through a set of extra bits appended to the payload, called a packet header or trailer, depending on where they are placed. The simplest but important use of such metadata is to indicate boundaries between frames, that is, framing data into units [2].
Looking at impressive promises quantum information science makes, such as exponential speedups of particular kinds of computation [3], one might assume that attaching metadata to quantum information must be as easy as in the classical domain. This is not the case, however.
To illustrate the challenge in the quantum domain, take the simplest metadata as an example, namely the boundary signal between each block of information. In the classical domain, the simplest way to frame data is to insert a marker at the start or end of each information block as in spaces between words in the English language. If data are represented by binary sequences of zeros and ones, a fixed binary pattern may be used as a special codeword to signal each boundary.
In the quantum domain, things are not that straightforward. Let us assume that we transmit a sequence of qubits carrying quantum information. If we simply inserted a certain pattern of quantum states (α 0 |0 + β 0 |1 ) ⊗ · · · ⊗ (α s |0 + β s |1 ) as a boundary signal between each information block, the receiver would have to perform some measurement to pick up on the inserted signals. Because measurement generally disturbs quantum information carried by qubits, the receiver must perform the measurement exactly on the synchronization signals, which is only possible if the receiver already knows where the boundaries are to begin with.
The only known theoretical solution to this catch-22 is quantum synchronizable coding [4], [5]. However, this is not packet framing for asynchronous quantum channels per se; quantum synchronizable coding is a method for providing efficient recovering when frame synchronization may become slightly off. In other words, it assumes prior establishment of frame synchronization before the start of data transmission and corrects synchronization errors of small magnitude if they occur during the transmission. All other solutions are hardware dependent in principle, which confines the possibilities of quantum information processing to a limited realm.
The purpose of the present paper is to develop an information theoretic framework for attaching metadata to quantum information to open paths to complex frame-wise asynchronous quantum information processing. We assume no prior frame synchronization between the information source and sink, so that all metadata including boundary information must be embedded in the transmitted data. We also assume that the channel is noisy, so that all information must be protected from quantum noise.
Note that the concept of metadata is often quite ambiguous if we do not specify the context. Our goal is to make the first step toward frame-wise asynchronous quantum communication and quantum computation in a fashion similar to traditional packet framing for classical information. Hence, we restrict the concept of metadata to the kind of information extra classical bits in a frame would typically carry in a frame-wise asynchronous situation. Trivially, overhead data of this kind can generally be attached through extra qubits in a frame if we solve the problem of locating boundaries between frames. Hence, in what follows, we mostly focus on frame synchronization.
In Section II we mathematically describe frame synchronization in the quantum setting and present a naive approach that mimics the straightforward method of inserting spaces between words. This will be generalized to develop a more general framework for parsing a sequence of qubits in Section III. Concluding remarks are given in Section IV.

II. MATHEMATICAL MODEL
We follow the simple model introduced for quantum synchronizable codes [4]. Let Q = (q 0 , . . . , q l−1 ) be an ordered set of length l, where each element represents a qubit. A frame F i is a set of consecutive elements of Q. Let F = {F 0 , . . . , F m−1 } be a set of frames. The ordered set (Q, F ) is called a framed sequence if the elements of a sequence are partitioned into groups of consecutive elements, that is, Take a set G = {q j , . . . , q j+g−1 } of g consecutive elements of Q. We call G the window. The window G is misaligned by r qubits to the right with respect to (Q, F ) if there exits an integer r and a frame F i such that F i = {q j−r , . . . , q j+g−r−1 } and G ∈ F . If r is negative, we may say that G is misaligned by |r| qubits to the left. G is properly aligned if G ∈ F .
As a concrete example, take three qubits and encode each qubit into nine qubits by Shor's nine qubit code [6]. The resulting 27 qubits may be seen as Q = (q 0 , . . . , q 26 ), where the three encoded nine qubit blocks |ϕ 0 , |ϕ 1 , and |ϕ 2 form frames F 0 = (q 0 , . . . , q 8 ), F 1 = (q 9 , . . . , q 17 ), and F 2 = (q 18 , . . . , q 26 ) respectively. We assume that a device knows that the size of each information block is nine. If misalignment occurs by, say, two qubits to the left, the device that tries to correct errors on qubits in |ϕ 1 applies the error correction procedure to the window G of nine qubits q 7 , . . . , q 15 , two of which come from F 0 and seven of which F 1 . In this case, when measuring the stabilizer generator IZZIIIIII of the nine qubit code to obtain the syndrome, what the device actually does to the whole system can be expressed as which, if frame synchronization were correct, would be I ⊗10 ZZI ⊗15 |ϕ 0 |ϕ 1 |ϕ 2 . I ⊗8 Z does not stabilize |ϕ 0 , nor does ZI ⊗8 |ϕ 1 . Hence, errors are introduced to the system, rather than detected or corrected.
The objective of frame synchronization is to ensure that the device can identify the location of each boundary and that the window on which quantum operations are performed by the device is always properly aligned. Note that if we assume that the magnitude of misalignment can be more than the shortest frame length, it may happen that the window is "properly aligned" to an unintended frame. However, in principle, proper alignment ensures synchronization recovery if each frame is labeled by metadata in some form of classical information such as an integer. Hence, we first focus on proper alignment and then consider more general situations.
In the remainder of this section, we present a naive approach to frame synchronization to illustrate one of our key ideas. To describe a straightforward quantum analogue of inserting spaces between words, we employ a Hilbert space of dimension three where we have three orthogonal basis states |0 , |1 , and |2 . For computation, we work on a tensor product of 2-dimensional Hilbert spaces contained as a subspace of the system space, so that quantum information is processed by using |0 and |1 in the same way as in an ordinary qubit system. The third basis state |2 is allocated for synchronization.
In order for our framework to be as general as possible, we do not specify the actual implementation method of the multilevel quantum system. This is also because we require little more than what is already assumed in an ordinary qubit system over the quantum erasure channel. For the basics of coding theory for the quantum erasure channel and a brief review of multilevel quantum systems, the reader is referred to [7]- [9] and references therein. Similarly, we do not consider a peculiar type of synchronization error specific to a particular physical implementation. For such specialized models in the classical domain, we refer the reader to [10], [11].
Assume that we have a sequence of qutrits, where quantum information is carried by qubits lying in the 2-dimensional subspaces and the state |2 is inserted as a synchronization signal between each information block. We perform the measurement {|0 0| + |1 1| , |2 2|} on each qutrit. Because our qubits are orthogonal to |2 and will not be affected by |0 0| + |1 1|, in principle we can deterministically identify the locations of |2 s without disturbing the quantum states. For instance, if the state |2 is used only at the beginning of each information block, we can successfully locate the boundaries as desired.
If we can assume that there is no quantum noise, this simple approach will work just fine. However, such an assumption is unreasonable regardless of how a quantum system is implemented. In fact, it is easy to see that this method can not even tolerate a single erroneous qutrit. For instance, it is reasonable to assume that the post-measurement state of what used to be a qubit in the 2-dimensional subspace may end up outside of the subspace due to quantum noise as in the quantum erasure channel. In this case, even a single quantum error can trick a synchronization device into recognizing the wrong position in the middle of an information block as a boundary.

III. QUANTUM TAGS FOR ERROR TOLERANCE
In this section we present a generalized method for asynchronously attaching metadata under the presence of quantum noise. In what follows, we assume that qutrits may be subjects of any quantum error due to noise, so that they may result in any states, possibly entangled with others unintended ways.
This section is divided into four subsections. Subsection III-A provides basic notions employed throughout this paper. Subsection III-B is devoted to generalizing the native approach described in the previous section in order to realize a simple error-tolerant synchronization scheme. Further generalization is given in Subsection III-C, where attaching supplementary classical information along with boundary information is discussed. Subsection III-D explores possible use of our methods as packet headers in a more general situation in which the lengths of frames may vary.
We will employ mathematical tools, notions, and some basic facts from coding theory, combinatorial and algebraic design theory, finite geometry, sequences, and finite fields. While we only assume familiarity with quantum information, the reader who wishes more backgrounds and thorough treatments is referred to standard textbooks in respective fields such as [12]- [16].

A. Preliminaries
As in the simple method we described in the previous section, we insert |2 s as auxiliary markers. The difference is that the inserted positions form a carefully designed pattern within each information block. As before, the system space is regarded as a tensor product H sys = H 3 ⊗ · · · ⊗ H 3 of 3-dimensional Hilbert spaces, each of which contains a 2-dimensional subspace that may be used for computing. Hence, the subspace of computational states can be written as H comp = H 2 ⊗ · · · ⊗ H 2 . The system space is a direct sum H sys = H comp ⊕ H ⊥ comp of subspaces. In what follows, the symbol H 2 always implies the 2-dimensional subspace for computing spanned by |0 and |1 .
As in the case of the naive approach, the receiver performs the measurement {|0 0| + |1 1| , |2 2|} on each qutrit in order to recognize the predetermined patterns of inserted |2 s. We use the finite field F 2 of order two to represent each measurement outcome by assigning 0 and 1 to the measurement results of the measurement operators |0 0| + |1 1| and |2 2| respectively. Hence, if the information sink performs the measurement on v consecutive qutrits in a sequence of qutrits, we obtain a binary v-dimensional vector as its outcome vector.
If some qutrits are suffering from quantum errors, an outcome vector may also be altered. In terms of measurement results, there are two types of error. One is what used to be a qubit in H 2 yielding measurement result 1 due to a quantum error on it. The other is a qutrit that was originally |2 giving the other measurement result. By borrowing terminology from the quantum erasure channel literature, the former kind is called an erasure. We call the latter kind an incursion. Note that from the viewpoint of the receiver an erasure adds a measurement result 1 and that an incursion makes one disappear. For a frame F = (q 0 , . . . , q v−1 ) with some |2 s in a framed sequence of qutrits, define binary v-dimensional vector We call this binary vector the tag vector of F . As usual, the support supp(x) of a v-dimensional vector of coordinates in which the corresponding entries are nonzero. Hence, given the tag vector x F of a frame F , the support supp(x F ) is simply the set of positions in which |2 s are inserted. We call this set the (v, k)-quantum tag of length v and weight k attached to the frame F if |supp(x F )| = k. 1 Fig. 1 shows a frame (q 0 , . . . , q 26 ) tagged by {0, 3, 11, 21, 26}. We may speak of the tag vector of a quantum tag to mean its binary vector representation when it is not important to specify a frame.
Define bijection π from F n 2 onto F n 2 itself as the cyclic shift by one bit to the right, that is, π maps a v-dimensional vector . We also define the set version of cyclic shifts. For a subset S ⊆ Z v of the ring of integers modulo v and i ∈ Z v , the translate of S by i is defined as

B. Optimal synchronization with one quantum tag
Here we present a method for inserting marker qutrits in an error-tolerant fashion. We assume that k |2 s are inserted at the information source to form a tagged frame. We also assume that every frame is of the same size v, so that the payload of a frame consists of v − k qutrits in H 2 , or in other words, v − k qubits.
This subsection studies what kind of quantum tag T gives the best error tolerance for given v and k. It will be shown that this problem is exactly that of designing a binary sequence of good periodic auto-correlation properties [15] while keeping in mind the peculiar constraint that the number of 1s in the sequence directly affects the information rate in our quantum information processing scenario. With a simple argument, we will prove that the best binary sequences that have been studied in the classical sequence design literature without this constraint are still optimal for our purpose.
We protect the payload by a conventional quantum errorcorrecting code such as stabilizer codes [17]. Note that once frame synchronization is achieved, the receiver can safely perform a quantum error correction procedure on the payload. Thus, any quantum error can be treated as would be in a standard quantum error correction scheme. For instance, if some qubits fall to the outside of the 2-dimensional subspaces for computing, they can be corrected by the binary quantum error-correcting code used for the payload by regarding them as located errors and manually setting erroneous qutrits to an arbitrary qubit in H 2 [7]. Quantum errors that keep qubits within H comp and a combination of the two types of error can be corrected straightforwardly by the chosen quantum errorcorrecting code as long as the number of such errors does not exceed the error correction capacity of the code. Quantum errors on tags can also be corrected, for example, by manually recreating the pattern of |2 s for each frame.
Thus, our objective is to develop a technique that allows for the receiver to correctly recognize quantum tag T within a sequence of qutritis even if it is buried under quantum noise. The field of signal processing provides mathematical tools to formalize the problem of recognizing a pattern of signals. We employ the notion of discrete correlation to build a foundation of the theory of quantum tags that suit our needs. The x i x i+t between x and a cyclic shift of itself, where the subscripts in the sum are taken modulo v.
, it means that the orbit Orb π (x) of x over cyclic shifts is shorter than v. In other words, cyclically shifting x by t bits to the left results in the same vector again.
A (v, k)-quantum tag is self-synchronizing if there exists a positive integer ρ such that where x is the corresponding tag vector. We may say that such a tag is a self-synchronizing (v, k, ρ)-quantum tag. The parameter ρ is the comma-free index. Note that, by definition, a self-synchronizing quantum tag of comma-free index ρ > 1 is also of comma-free index ρ ′ for any positive integer ρ ′ < ρ. Informally, the comma-free index is a measure of guaranteed dissimilarity between a tag vector and its cyclic shifts. To put it in the set theoretic language, for any t ≡ 0 (mod v) a selfsynchronizing (v, k, ρ)-quantum tag T and its translate T + t have at least ρ elements that belong to only one of them, or equivalently, As a nontrivial example, take the set {0, 3, 11, 21, 26} ⊂ Z 27 we used in Fig. 1 Suppose that the receiver would like to locate the boundaries of each frame in a sequence of qutrits. We assume that the receiver knows that the same quantum tag T is attached to every frame. As defined in the previous preliminaries subsection, the receiver obtains a binary outcome vector by performing measurement {|0 0| + |1 1| , |2 2|} on each qutrit. In our scheme, the receiver compares the outcome vector y of each set of v consecutive qutrits with the known correct tag vector x F . If the quantum channel is noiseless, it suffices to check whether the two vectors are identical. In fact, if the quantum tag is of comma-free index ρ ≥ 1, there are at least ρ discrepancies between the correct tag vector and the outcome vector when there is misalignment. A similar strategy works for the noisy case if the quantum tag is carefully designed: Theorem 3.1: Assume that every frame consists of v qutrits and is tagged by the same self-synchronizing quantum tag of length v and comma-free index ρ. The boundaries of each frame can be located if the number of erasures and incursions in any consecutive v qutrits is at most ⌊ ρ−1 2 ⌋. Proof: Let x be the tag vector of a self-synchronizing quantum tag of length v and comma-free index ρ. Define Then C is a classical binary error-correcting code of minimum distance at least ρ. Consider the nearest neighbor decoder D for the classical code that takes a v-dimensional vector y as input and randomly returns one of the nearest valid codewords in C in terms of Hamming distance. If the Hamming distance between y and a nearest valid codeword is less than or equal to ⌊ ρ−1 2 ⌋, the return from D is unique. Take consecutive v qutrits G = (q 0 , . . . , q v−1 ) from a framed sequence of qutrits in which each frame is of the same size and tagged by supp(x). Perform the measurement {|0 0| + |1 1| , |2 2|} on each qutrit. Decode the outcome vector by D. The number of erasures and incursions corresponds to the number of bit flips in the outcome vector. Thus, by assumption, D returns the uniquely determined nearest codeword in C. If the result of decoding is π t (x), G is t qutrits away to the left from proper alignment.
As proved above, the return of the classical decoder D serves as the syndrome for frame synchronization. Hence, not only can the receiver detect misalignment, but also identify its magnitude.
While we employed the nearest neighbor decoder, any general decoder for classical binary error-correcting codes can be used. If the receiver has knowledge of anomalies of the quantum channel such as asymmetry in the probabilities of the two types of error, this can be exploited to achieve more robust frame synchronization than what the statement of Theorem 3.1 suggests.
The weight k of a self-synchronizing (v, k, ρ)-quantum tag is the number of qutrits we insert for synchronization while the length v specifies the size of the payload once k is given. The comma-free index ρ determines how secure frame synchronization can be. In view of Theorem 3.1, we are interested in self-synchronizing (v, k, ρ)-quantum tags that achieve the largest ρ for given v and k. The following theorem gives an upper bound on the comma-free index: Proof: Let x be the tag vector of a self-synchronizing (v, k, ρ)-quantum tag. Because the maximum in a finite multiset of integers is larger than or equal to their arithmetic mean, we have Hence, by the definition of comma-free index, we have The proof is complete.
We employ combinatorial design theory to construct optimal self-synchronizing quantum tags.
A cyclic difference set, denoted as cyclic DS(v, k, µ), of order v, block size k, and index µ is a set B of k non-negative integers less than v such that every element of Z v \{0} appears exactly µ times each as the difference a − b (mod v) between two distinct elements a, b ∈ B, a = b. For instance, take a triple {0, 1, 3}. Then, each nonzero element of Z 7 appears as the difference between two elements exactly once as follows: Thus, it is a cyclic difference set of order seven, block size three, and index one. To avoid triviality, we always assume that k > µ > 0. It is known that a cyclic difference set gives a binary sequence with the ideal two-level auto-correlation property (see, for example, [18]). Intuitively, an ideal binary sequence would take full advantage of all 1s it contains at any time shift t extremely efficiently to give as spiky autocorrelations as possible, which suggests that the off-peak autocorrelations of such an ideal sequence of given length would be a function of the number of 1s. In our problem, the number of 1s in a sequence represents the information rate penalty we must pay to achieve errortolerant synchronization. Therefore, binary sequences with the ideal two-level auto-correlation property would offer the best possible trade-off between information rates and off-peak autocorrelations. This heuristic argument is indeed correct; self-synchronizing quantum tags meeting the bound given in Theorem 3.2 with equality are equivalent to cyclic difference sets: Theorem 3.3: A set of integers is an optimal selfsynchronizing (v, k, ρ)-quantum tag with ρ = 2k(v−k) v−1 if and only if it is a cyclic DS(v, k, µ).
Proof: Take a set of integers of cardinality k. Without loss of generality, we assume that the set is a k-subset T ⊆ Z v of the ring of integers modulo v. By the proof of Theorem if and only if the corresponding tag vector x satisfies the condition that which holds if and only if the maximum is equal to the arithmetic average. Because R x (t) = |T ∩ (T + t)|, this is equivalent to the condition that for any t ≡ 0 (mod v) Because T and T + t share elements if and only if T has elements a and a + t (mod v), the condition holds if and only if T is a cyclic DS(v, k, µ) with µ = k(k−1) v−1 . Thus, it suffices to show that every cyclic difference set of order v and block size k is of index µ = k(k−1) v−1 . In a set of cardinality k, there are exactly k 2 = k(k−1) 2 pairs of elements. Because a cyclic difference set contains every nonzero element of Z v as the difference between elements exactly µ times, we have Hence, any cyclic DS(v, k, µ) satisfies the condition that µ = k(k−1) v−1 . The proof is complete.
With this equivalence, we only need to look for cyclic difference sets to find optimal self-synchronizing quantum tags that attain the upper bound on the comma-free index with equality. The study of cyclic difference sets has a long history with one of the earliest examples in modern mathematics being Kirkman's construction for projective planes from the 19th century [19]. Here we list useful results on cyclic difference sets that can be described in simple mathematics. For more complete treatments on the basics of the theory of difference sets, we refer the reader to [13]. For more recent results, a concise survey on recent progress in algebraic design theory can be found in [20].
The following is a trivial but useful property of a cyclic difference set: Because index µ must be an integer, no cyclic DS(v, v 2 , µ) exists. Thus, we only need to consider the case when k < v 2 . Projective geometry provides proof of the existence of cyclic difference sets for particular parameters. To exploit finite geometry, we define special combinatorial designs. A simple 2-design of order v, block size k, and index µ is an ordered pair (V, B), where V is a finite set of cardinality v and B is a set of k-subsets of V such that each pair of elements of V is included in exactly µ elements of B. The elements of V are called points while those of B are blocks. A simple 2-design is said to be symmetric if |B| = |V |. It is cyclic if the cyclic group of order v acts regularly on the points. A simple way to see a cyclic simple 2-design of order v is that there is a way to rename points by using integers between 0 and v − 1 such that for any block B ∈ B the translated block B + 1 is also a block of the design. The Fano plane is the smallest nontrivial example: the set of triples forms a cyclic simple 2-design of order seven, block size three, and index one. The point set is the seven integers {0, 1, 2, 3, 4, 5, 6}. It is easy to check that each pair appears exactly once while for any block B ∈ B we surely have B + 1 ∈ B. Because |B| = 7 = |{0, 1, 2, 3, 4, 5, 6}|, it is symmetric as well.
Symmetric designs and difference sets are closely related, as is suggested by the fact that {0, 1, 3} is a cyclic DS(7, 3, 1). In fact, it is readily checked that for any cyclic DS(v, k, µ) B such that the orbit Orb Z v (B) = i∈Zv {B + i} is of length v, the v subsets Orb Z v (B) of Z v form a cyclic simple 2-design of order v and index µ that is symmetric. Conversely, any cyclic simple 2-design gives a cyclic difference set if it is symmetric.
The points of the m-dimensional projective geometry PG(m, q) over F q are the 1-dimensional subspaces of F q m+1 . The hyperplanes of PG(m, q) are the subspaces of codimension one, namely the m-dimensional vector subspaces of F q m+1 . It is well-known that the points and hyperplanes of PG(m, q) form the points and blocks of a simple 2-design of order q m+1 −1 q−1 , block size q m −1 q−1 , and index q m−1 −1 q−1 , where a Singer cycle acts regularly on the points and also blocks [14]. This simple 2-design is symmetric. Thus, any representative of its block orbit forms a cyclic DS( q m+1 −1 q−1 , q m −1 q−1 , q m−1 −1 q−1 ).
Proof: There exists a cyclic DS(v, k, µ) if and only if there exists an optimal (v, k)-quantum tag of comma-free index Since a hyperplane of PG(m, q) forms a cyclic difference set, plugging v = q m+1 −1 q−1 , k = q m −1 q−1 , and µ = q m−1 −1 q−1 proves the assertion.
There are various known explicit constructions which may give nonisomorphic cyclic difference sets of these parameters. Since we only need one explicit construction, a straightforward method for realizing the parameters given in Theorem 3.5 is to take the set where α is a generator of the multiplicative group of F q m+1 and Tr is the trace function Tr (m+1)/1 (β) = m i=0 β q i from F q m+1 onto F q . The resulting set forms the Singer difference set [21].
Another simple method for explicitly constructing cyclic difference sets is to use the concept of cyclotomy in the theory of finite fields. The following quantum tags are classical examples of cyclic difference sets obtained through cyclotomy: Theorem 3.6: For any prime p ≡ 3 (mod 4) the quadratic residues {x 2 | x ∈ F p \ {0}} form an optimal (p, p−1 2 , p+1 2 )quantum tag.
The following is another series of optimal quantum tags from cyclotomic cyclic difference sets called Hall difference sets [23]: Theorem 3.11: Let p ≡ 1 (mod 6) be a prime of the form p = 4t 2 + 27 and α a primitive root of p such that if 3 ≡ α x (mod p), then x ≡ 1 (mod 6). The set {α i | i ≡ 0, 1, 3 (mod 6)} forms an optimal (p, p−1 2 , p+1 2 )-quantum tag. A pair of primes p and p + 2 are called twin primes. The following is a special case of the well-known twin prime power difference set (see [24]): Theorem 3.12: Let p and p+2 be primes. The set of ordered pairs (x, y), x ∈ F p , y ∈ F p+2 such that x, y are both nonzero squares or both nonsquares or y = 0 forms an optimal (p 2 + 2p, p 2 +2p−1 2 , p 2 +2p+1 2 )-quantum tag. As Baumert puts in his lecture notes [24], the corresponding difference sets "seem to belong to that special class of mathematical objects which are prone to independent rediscovery." References to several early instances of independent discovery as well as a proof of more general theorem can be found in [24].
Whether there exist infinitely many twin primes is one of the most elusive open problems in number theory. The first Hardy-Littlewood conjecture [25] suggests that the number n(x) of primes p ≤ x such that p + 2 is also a prime is asymptotically equal to Small twin primes are listed on the website The On-Line Encyclopedia of Integer Sequences [26].
Computer searches are effective for small parameters. A comprehensive list of known cyclic DS(v, k, µ)s for k ≤ 300 can be found at Center for Communications Research's website [27].

C. Orthogonal quantum tags
The previous subsection focused on the situation where each frame is tagged by the same pattern of |2 s. This is a reasonable assumption because if we use two or more quantum tags, we still have to consider the special case in which some consecutive frames happen to be tagged by the same pattern. Hence, using multiple tags do not offer more robust frame synchronization in a general setting.
However, with the previous method, we need to decode quantum error-correcting codes in order to obtain any metadata beyond boundary information. If additional metadata are relatively minor, it would make more sense if the receiver could obtain them without decoding protected qubits.
The use of multiple quantum tags makes it possible to directly retrieve minor metadata by locating |2 s. In fact, if a set S of quantum tags possesses orthogonality in such a way that the receiver can both locate a quantum tag and identify which, tagged frames can naturally carry |S|-ary classical information by regarding each frame as a logical |S|-ary digit. This subsection is devoted to a scheme of this type.
As in the previous method, we assume that each frame is of the same size v and contains k |2 s. The difference is that the pattern of inserted |2 s may be different from frame to frame. In order to mathematically define the kind of orthogonality we need, we take more advantage of classical coding theory.
A self-synchronizing code C ⊂ F v 2 is a binary block code of length v where the bit string formed by an overlapped portion of any two concatenated codewords is not a valid codeword. If the channel is assumed to be noiseless, the property that no codeword appears as a substring of two adjacent codewords allows for block synchronization without external help.
A well-known classical code is typically not selfsynchronizing. For instance, a linear code of length v must have the v-dimensional zero vector as its codeword. Hence, if the information source transmits two zero vectors in a row, a bit string of length v that strides the two is still a run of zeros, which is a valid codeword. Self-synchronizing codes are those that avoid such occurrences of valid codewords when there is misalignment.
We consider an error-tolerant variant of self-synchronizing codes. Take a sequence S of codewords of a binary block code C ⊆ F v 2 of length v. A splice of length v between codeword c = (c 0 , c 1 , . . . , c v−1 ) and the following codeword composed of the last i bits of c and the first v − i bits of c ′ for some positive integer i ≤ v − 1. A binary block code of length v is said to be of comma-free index ρ c if the Hamming distance between any codeword c ′′ and any splice of length v between any two codewords c, c ′ is at least ρ c . Informally, a code of length v and comma-free index ρ c has the property that there are at least ρ c discrepancies between a properly aligned valid codeword and a v bit substring of two adjacent codewords when compared bit by bit.
Comma-free indices of classical binary codes are similar to minimum distances in that a self-synchronizing code of length v and comma-free index ρ c assures block synchronization under the presence of up to ⌊ ρc−1 2 ⌋ bit flips in the received bit sequence of length v. In fact, to achieve synchronization, the receiver only needs to compare the received consecutive v bits with the valid codewords and look up the nearest neighbors. If there are less than or equal to ⌊ ρc−1 2 ⌋ bits that defer between the consecutive v bits and some valid codeword c, assuming that the channel does not produce more than ⌊ ρc−1 2 ⌋ bit flips, the receiver can safely declare that the string of bits at hand are properly aligned. If there is no codeword within ⌊ ρc−1 2 ⌋ bits in terms of Hamming distance, there must be misalignment. As in the minimum distance decoding, if the channel produces more than ⌊ ρc−1 2 ⌋ bit flips, the receiver may wrongly assume that the consecutive v bits are properly aligned when there is misalignement. In this sense, the comma-free index of a block code determines its block synchronization capability.
As is apparent from the above argument, the tag vector of a self-synchronizing (v, k, ρ)-quantum tag may be regarded as a self-synchronizing code of comma-free index ρ with only one codeword. With this viewpoint, if the tag vectors of frames are chosen so that they from a self-synchronizing code S, each frame can be seen as a codeword of S that carries classical |S|ary information. The goal of this subsection is to define and construct special patterns of |2 s that form a self-synchronizing code with a large number of codewords while keeping in mind the special requirement that we are not allowed to insert too many |2 s in a frame.
To correctly interpret classical metadata attached as codewords of a self-synchronizing code, we need to both locate and identify codewords. As is well-known, a binary block code of minimum distance d can identify codewords if synchronization is correct and the number of bit flips in a received vector is up to ⌊ d−1 2 ⌋. We use the supports of binary self-synchronizing codes as quantum tags. A set S of self-synchronizing quantum tags is of comma-free index ρ c and of distance d if the set of corresponding tag vectors forms a self-synchronizing code of comma-free index ρ c and minimum distance at least d. We say that the elements of S are orthogonal self-synchronizing (v, k, ρ c , d; |S|)-quantum tags if comma-free index ρ c and distance d are both positive and for any S ∈ S, the cardinality |S| = k. With this definition, the positions of 1s in a codeword of a self-synchronizing code specify where |2 s are inserted in a frame tagged by the corresponding quantum tag. The 0s in a codeword represent the payload qubits protected by a quantum error-correcting code.
The following proposition summarizes the argument given above in this subsection: Proposition 3.13: Assume that every frame consists of v qutrits and is tagged by one of orthogonal self-synchronizing (v, k, ρ c , d; s)-quantum tags. The location of the boundaries of each frame and additional metadata in the form of one classical s-ary digit can be obtained if the number of erasures and incursions in any consecutive v qutrits is at most ⌊ min(ρc,d)−1 2 ⌋. Self-synchronizing codes and related concepts have been investigated in a variety of fields from various viewpoints. Noticeable progress has been made on the theoretical side in recent research (see, for example, [28], [29]). Unfortunately, it appears that the known self-synchronizing codes are generally unsuitable for our purpose due to the fact that known classical self-synchronizing codes are typically cosets of linear codes and are thus of variable weight. In fact, while various selfsynchronizing codes that are of large alphabet size and contain codewords with many 1s are available, the binary case with emphasis on small constant weight k does not seem to have received much attention in the literature. Making things more difficult, whether self-synchronizing or not, finding a good code of small constant weight is already a difficult problem on its own. Nonetheless, as will be shown in the remainder of this subsection, there exist infinitely many nontrivial selfsynchronizing error-correcting codes of small constant weight.
Recall that the symbol π refers to the cyclic shift of a vector by one bit to the right. The periodic cross-correlation R x,y (t) at time t of v-dimensional vectors x = (x 0 , . . . , x v−1 ) and y = (y 0 , . . . , y v−1 ) over F 2 is defined as the inner product R x,y (t) = x · π t (y) = 0≤i≤v−1 x i y i+t between x and a cyclic shift of y, where the subscripts in the sum are taken modulo v. The periodic autocorrelations we defined in the previous subsection are the cross-correlations of x and itself.
A (v, k, λ a , λ c ) optical orthogonal code C ⊆ F v 2 of length v and weight k is a set of v-dimensional binary vectors of weight k such that for any c ∈ C its off-peak periodic autocorrelations are at most λ a and for any pair of distinct codewords c, c ′ ∈ C their periodic cross-correlations are at most λ c . In other words, it is a set of v-dimensional vectors with k 1s and v − k 0s whose coordinates are indexed by Z v such that for any c = (c 0 , c 1 , . . . , c v−1 ) ∈ C and any nonzero element t ∈ Z v and such that for any pair of distinct vectors c = (c 0 , c 1 , . . . , c v−1 ), c ′ = (c ′ 0 , c ′ 1 , . . . , c ′ v−1 ) ∈ C and any t ∈ Z v . The original motivation of the study of optical orthogonal codes was to realize codedivision multiple-access (CDMA) fiber optical communications [30], where asynchronous location and identification of codewords is important. For codeword location and identification, codes with a very high degree of orthogonality are desirable [15], which translates to the condition that off-peak autocorrelations and cross-correlations should be as small as possible. To keep the subsequent discussion simple, we only consider the case when λ a = λ c = 1. An optical orthogonal code with this restriction is said to be of index one and will be denoted as (v, k, 1)-OOC. To avoid triviality, we also assume that k ≥ 2.
Proof: It suffices to show that a (v, k, 1)-OOC C is of comma-free index k −2 and minimum distance at least 2k −2. By definition, for any two distinct codewords c, c ′ ∈ C, the cross-correlation C c,c ′ (0) at time 0 is at most one. Thus, the Hamming distance between any pair of distinct codewords is at least 2k − 2. To prove that the code is of comma-free index k − 2, consider a splice of a pair of codewords. Take a codeword c ∈ C. Because off-peak autocorrelations and cross-correlations are both at most one, there are at most two coordinates at which both c and a splice have 1s. Because any codeword in C has k 1s, the Hamming distance between a valid codeword and a splice is at least k − 2. Thus, C is of comma-free index k − 2.
We would like optical orthogonal codes with the largest possible number of codewords for given v and k. The Johnson bound gives the upper bound on the number of codewords [31]: Theorem 3.15: Let C be a (v, k, 1)-OOC. Then it holds that A (v, k, 1)-OOC is optimal if the number of codewords attains this upper bound. When v−1 is divisible by k and k−1, the right-hand side of the Johnson bound does not suffer from the slight drop due to the floor functions. Table I lists wellknown classes of optimal optical orthogonal codes that have exactly v−1 k(k−1) codewords. For instance, the following set of orthogonal self-synchronizing quantum tags is the well-known cyclotomic OOC [32]: Theorem 3.16: There exists a constant c k that depends on k such that for any prime p ≡ 1 (mod k(k − 1)) greater than c k there exists a set of orthogonal self-synchronizing (p, k, k− 2, 2k − 2; p−1 k(k−1) )-quantum tags. There are numerous other constructions and existence results on optical orthogonal codes. The most recent results can be found in [38]- [40] and references therein.
Note that optical orthogonal codes have been studied under various different names. Optimal (v, k, 1)-OOCs with v − 1 divisible by k and k − 1 are also known as cyclic difference families. Such an OOC is also equivalent to a system of representatives of block orbits of a cyclic simple 2-design of order v, block size k and index one. When the divisibility of v − 1 is not of concern, they may be called cyclic difference packings without short orbits. The equivalence between these mathematical objects was proved in [41]. The definitions of cyclic difference families and packings as well as known facts and various other related concepts can be found in [38].

D. Quantum packet headers
In this final subsection of Section III, we briefly discuss how to use our quantum tags when the number of qubits in the payload may be different from frame to frame. Such p ≡ 1 (mod k(k − 1)) prime, [32] p > c k , Projective geometry d a c5 = 0 [33]. c6 = 61 [34]. For k ≥ 7 in general, a sufficient condition is prime p > c k = k 2 k(k−1) that is congruent to one modulo k(k − 1).
b This is also known as Euclidean geometry in classical and quantum coding theory [35], [36].
c The same parameters may be realized as a generalized Bose-Chowla family [37].
d For a proof, see a standard reference book such as [14].
generalization may be more natural and reasonable in some situations. For instance, it makes sense to protect important quantum information by a long, strong quantum errorcorrecting code while using a shorter one for less important quantum information to optimize the communication rate. Quantum tags can be exploited when variable length frames are allowed as well. The key idea is to mimic the concept of packet headers.
In classical communications networks, overhead data are often attached at the beginning or the end of a frame as extra bits to signal the boundaries. In the simplest method we introduced in Section II, single |2 s are inserted to indicate the beginnings of frames. Because self-synchronizing tags are locatable even under the presence of quantum errors, we can use a very short one in place of the single |2 s. In fact, by following the same type of argument as in the previous two subsections, one can easily prove that a DS(v, k, µ) and a (v, k, 1)-OOC give v qutrit blocks that are locatable under the presence of up to any ⌊ k−µ−1 2 ⌋ and ⌊ k−2 2 ⌋ quantum errors respectively. By the same token, it is also straightforward to see that the scheme based on a DS(v, k, µ) and a (v, k, 1)-OOC tolerates up to k − µ − 1 and k − 2 erasures if they are the only possible kind of error.
To illustrate this method, assume that we would like to transmit qubits over the quantum erasure channel with one supplementary qubit in each frame as metadata. We encode one supplementary qubit by the four qubit code [7]. Take a DS(7, 3, 1), which forms a self-synchronizing (7, 3, 4)quantum tag. This tag makes the encoded physical four qubits locatable under the presence of up to one erasure on any qutrit. Hence, the resulting seven qutrits can be seen as a stand-alone locatable block that holds one qubit of information and can correct up to one erasure such as photon loss during optical quantum information processing [42], [43]. We attach this short block to the beginning of a long payload (see Fig. 2). Then, the payload together with the seven qutrits form a frame containing an extra short portion that marks the start of the information block and also carries one qubit of supplementary metadata.
We may call a locatable sequence of qutrits a quantum Header Payload Frame Fig. 2. Frame with a self-synchronizing quantum tag at the beginning. | The black boxes are |2 s. The white boxes are qubits. The first seven qutrits in the frame are the "quantum packet header" tagged by {0, 4, 6}, which is a cyclic DS(7, 3, 1). The next frame on the right shown partially is also tagged. The number of qubits the payload contains is arbitrary and may be different from frame to frame.
packet header if they are followed by the main information block consisting of an arbitrary number of qubits in a frame. We can use any self-synchronizing quantum tag as a quantum packet header. Trivially, orthogonal self-synchronizing quantum tags can be used the same way to add classical information in such a way that the receiver does not need to decode a quantum error-correcting code to obtain simple metadata. The qubits within a quantum tag may also serve as part of the payload if there is no need to add metadata except for boundary locations. While we can use single and orthogonal quantum tags as suboptimal solutions, it is unlikely that they give the best possible quantum packet headers. To formally study quantum packet headers, we need a notion analogous to periodic autoand cross-correlations. The Similarly, the aperiodic cross-correlation C x,y (t) at time t of v-dimensional vectors x = (x 0 , . . . , x v−1 ) and y = (y 0 , . . . , y v−1 ) over F 2 is defined by Single quantum tags need binary sequences with the lowest possible off-peak periodic autocorrelations for a given length and weight. By the same token, it is straightforward to see that if the payload of each frame consists of a sufficiently large number of qubits, ideal quantum packet headers are equivalent to binary sequences with the lowest possible aperiodic autocorrelations C x (t) for t = 0 for a given length and weight. Orthogonal quantum packet headers may be defined as a set of quantum tags of low aperiodic cross-correlations and large distance as in orthogonal quantum tags.
It is widely known in sequence design that aperiodic correlation properties are extremely difficult to analyze. In fact, in spite of their various important applications, there seem to exist only a few analytical results in the literature. As far as the author is aware, a theoretical study of aperiodic correlations of binary sequences of fixed weight is nonexistent except our naive observation that self-synchronizing codes of constant weight give a suboptimal solution. For known results on designing binary sequences with good aperiodic correlation properties, we refer the reader to [15].
As we have seen, it is indeed possible to frame a sequence of qubits into units and attach supplementary data by mimicking classical packet framing. We conclude this section by posing two questions: Problem 3.17: How can we characterize and construct a binary sequence of the lowest possible aperiodic autocorrelations for a given length and weight? Problem 3.18: How can we characterize and construct a constant-weight code of large minimum distance with a large number of codewords whose binary vector representations have good aperiodic cross-correlations?

IV. CONCLUDING REMARKS
We developed a coding theoretic method for parsing quantum information under the presence of quantum noise without assuming prior frame synchronization between the information source and sink. The notion of asynchronous quantum information processing we introduced opens paths to various possibilities such as helping local quantum processing involving quantum memory. In quantum communication scenarios, it may serve as a framework for quantum networks [44], [45] where users are self-synchronizing and can also attach labels to their quantum information. Attached metadata are not limited to classical information. They may be quantum information used as control qubits in a quantum network or ebits for entanglement-assisted quantum error correction [46] in which a few protected qubits play the role of ebits [47], [48].
While we have made the first crucial step toward realizing frame-wise asynchronous quantum information processing, as is mentioned in Section II, our error model does not consider some specific synchronization errors. For instance, deletion is one of the most extensively studied types of synchronization error in the classical domain. Informally, in a communication scenario, deletion represents the kind of situation where the receiver does not realize that a certain bit did not arrive. For example, assume that the sender uses the repetition code of length three and transmits the two codewords 000 and 111.
Assume also that the second bit of the first frame, say, 000 did not reach the destination. Suppose that the next frame, say, 111 arrived successfully. If there is no mechanism to detect the loss of the third bit, the first received message will be 001. If the receiver simply applies the majority vote decoding, the received vector 001 will be accepted as a valid codeword with a bit flip on the third bit. The receiver realizes that something does not add up only at the very end of the communication, where, to the eye of the receiver, the last bit of the final codeword never arrives.
Correcting deletion is known to be a very difficult problem in classical coding theory [10]. It would be even more difficult to correct such errors in the quantum domain. In fact, it appears that our scheme in its current form can not provide protection against this type of error in general. It would be of interest to study how one can overcome deletion of qubits as well.
Another interesting direction of research is the optimality of orthogonal self-synchronizing quantum tags. We derived the theoretical upper bound on the robustness of frame synchronization for the case when the same single quantum tag is used. We also proved that cyclic difference sets are equivalent to optimal self-synchronizing quantum tags. However, our knowledge on parameters of orthogonal self-synchronizing quantum tags is quite limited. It would be of importance to understand the relations between the number of orthogonal tags, length, weight, comma-free index, and distance. It would also be intriguing to provide optimal examples that meet a nontrivial bound that sharply captures a trade-off between parameters.
An equally interesting and challenging problem is to understand the structure of best possible quantum packet headers. If we take an approach similar to the case of quantum tags by regarding them as binary codes of constant weight, what we need to do would be generalize self-synchronizing codes to the aperiodic setting. A theoretical study of such aperiodically self-synchronizing codes of constant weight would be intriguing from the viewpoints of both classical and quantum information theory. This paper made the first attempt at developing a theory of frame synchronization in the quantum domain. We hope that the concepts we introduced will help develop fundamental building blocks for complex quantum computing and quantum communication.

ACKNOWLEDGMENT
The author thanks M.M. Wilde, D. Clark, V.D. Tonchev, and R.M. Wilson for stimulating discussions and valuable comments. He is grateful to the anonymous reviewers for their helpful comments and suggestions. The remark that the presented approach is essentially classical preprocessing is due to one of the reviewers.