Amplitude coded square wave

Hi all,

I’m trying to generating a square wave, the amplitude of each chip the
square wave is coded by a 113-bit legendre code respectively.

The following code is generating a source for legendre code:
#ls 113-bit
bits = (1,0,0,1, 0,0,0,1, 0,1,1,1, 1,0,1,0,
1,1,1,0, 0,1,0,1, 1,0,1,1, 0,1,0,0,
1,1,1,0, 1,0,1,1, 1,1,0,1, 0,0,0,1,
0,0,1,1, 0,1,0,1, 1,1,0,0, 0,1,0,0,
0,0,1,0, 0,1,0,0, 0,0,1,1, 1,1,1,0,
0,1,1,0, 0,1,1,1, 1,0,1,0, 0,0,1,0,
0,1,0,0, 0,0,1,0, 0,0,1,1, 1,0,1,0,
1)
in_data = gr.vector_source_b(self._bits, True )

 # Map to constellation
 constellation = [-1, 1]
 mapper = gr.chunks_to_symbols_bf(self._constellation)

And the sig_source is used to generate a square wave :
#generate square wave
self.sqr = gr.sig_source_f(if_rate, gr.GR_CONST_WAVE, options.rate,
options.amplitude,0)

Is there any approach could code the amplitude of each chip of the
square wave to be the source code?

Looking forward to your help
Thank you so much!

Regards,
Yan