# new_uhrig_sequence

Source: https://docs.q-ctrl.com/references/qctrl-open-controls/qctrlopencontrols/new_uhrig_sequence

```python
qctrlopencontrols.new_uhrig_sequence(duration, offset_count, pre_post_rotation=False, name=None)
```

Creates the Uhrig sequence.

### Parameters
* **duration** (*float*) – Total duration of the sequence $\tau$ (in seconds).
* **offset_count** (*int*) – Number of offsets $n$.
* **pre_post_rotation** (*bool* *,* *optional*) – If `True`, a $X_{\pi/2}$ rotation is added at the
  start and end of the sequence. Defaults to `False`.
* **name** (*string* *,* *optional*) – Name of the sequence. Defaults to `None`.
### Returns
The Uhrig sequence.
### Return type
[DynamicDecouplingSequence](https://docs.q-ctrl.com/references/qctrl-open-controls/qctrlopencontrols/DynamicDecouplingSequence.md#qctrlopencontrols.DynamicDecouplingSequence)

## Notes

The Uhrig sequence <sup>[1](#id2)</sup> is parameterized by duration $\tau$ and number of
offsets $n$. The sequence consists of $Y_{\pi}$ operations at offsets given by

$$
t_i = \tau \sin^2 \left( \frac{i\pi}{2(n+1)} \right) \;,
$$

where $i = 1, \cdots, n$.

## References

* <a id='id2'>**[1]**</a> [G. S. Uhrig, Physical Review Letters 98, 100504 (2007).](https://link.aps.org/doi/10.1103/PhysRevLett.98.100504)
