The general object that will manage all the segments and the interection with the AWG is the pulse object. The pulse object is best created in the station.
```python
from pulse_lib.base_pulse import pulselib
p = pulselib()
```
Let's intitialize the AWG's and make some channels in the pulse library
Where the virtual channels are the new names of the new channels created to do IQ channals. Each of these channels refer to a real channel (note that you can refer to the same real channel multiple times). It is recomendable to create one IQ virtual channel for each qubit.
Note to finize the initialisation of the pulse library, you should call:
```python
p.finish_init()
```
This will prepare all the segment/sequencing objects you might need later.
The code above can be placed in your station.
# Generating segments
Segments come by default in containers (e.g. for all the channels (real/virtual) you defined).
Note that all segments in these containers are assumed to have the same length (so P1, P2, P3, ...).
An example of defining some segments.
```python
seg = p.mk_segment('INIT')
seg2 = p.mk_segment('Manip')
seg3 = p.mk_segment('Readout')
```
Each segment has a unique name. This name we will use later for playback.
## Making your first pulse
To each segments you can add basic waveforms. Here you are free to add anything you want.
Some examples follow (times are by default in ns).
```python
# B0 is the barrier 0 channel
# adds a linear ramp from 10 to 20 ns with amplitude of 5 to 10.
One can see that here a call to a single loopobject it made. We will be sweeping from 50ns to 20us. This sweep axis is 0 (first axis). The default is always a new axis. You only need to explicitely specify it if you want to parameters to be coupled (e.g. swept on the same axis). The name is optional and can be used for plotting, same for the unit.
* Rabi experiment (power vs frequency of the pulse): Good example of a two dimensioal sweep