Patent ID: 7251397

Claim:
An encoder for encoding an optical wavelength-multiplexed signal compliant with optical CDMA into a code having a code pattern, comprising: L optical fibers (where L is an integer equal to or greater than two) each having a plurality of gratings; and a circulator for coupling the plurality of optical fibers, wherein, the code pattern contains n time bins, including time bin 1 , time bin 2 , . . . , time bin m, . . . , and time bin n (where n is an integer equal to or greater than two); the number of wavelengths assigned to a time bin m (where 1≦m≦n; m is an integer) is defined as Q(m), which is a function of m; among the Q(m) wavelengths assigned to the time bin m, a wavelength identified by an index q (where 1≦q≦Q(m); q is an integer) is defined as λ(m, q), which is a function of m and q; and each of the L optical fibers is represented by an index s (where 1≦s≦L; s is an integer), wherein, in each optical fiber s (where 1≦s≦L), gratings respectively corresponding to the time bins m (where 1≦m≦n) are formed, and at a distant position from a position of a grating which reflects an optical signal of a wavelength λ(m, q 1 ) corresponding to at least one time bin m included among the n time bins, another grating which belongs to the same time bin m and which reflects an optical signal of a wavelength λ(m, q 2 ) (where 1≦q 1 ≦Q(m); 1≦q 2 ≦Q(m); q 1 ≠q 2 ; q 1 and q 2 are integers) different from the wavelength λ(m, q 1 ) is formed; and in each optical fiber s, an optical path difference from the grating which reflects the optical signal of the wavelength λ(m, q 1 ) to the other grating which reflects the optical signal of the wavelength λ(m, q 2 ) is defined as d(m, q 2 , s), wherein a sum of the optical path differences d(m, q 2 , s) for all of the L optical fibers equals zero.