Consider a fiber where a Bragg grating of length $L$ is fabricated. According to the theory of coupled modes the amplitudes of the forward wave $a$ and backward wave $b$ are related by the following equations:
\[\begin{cases}
\dfrac{da}{dz} = i \kappa b \\[2pt]
\dfrac{db}{dz} = -i \kappa a
\end{cases},\]
where $\kappa$ is the strength of the grating.
Let's consider that the complex amplitude of the wave incident from the left is $A_0$.