# complex_optimizable_pwc_signal

Source: https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/complex_optimizable_pwc_signal

```python
Graph.complex_optimizable_pwc_signal(segment_count, duration, maximum, initial_values=None, *, name=None)
```

Create a complex optimizable piecewise-constant signal.

### Parameters
* **segment_count** (*int*) – The number of segments of the signal.
* **duration** (*float*) – The duration of the signal.
* **maximum** (*float*) – The upper bound for the modulus of the signal values.
* **initial_values** (*np.ndarray* *or* *list* *[* *np.ndarray* *] or* *None* *,* *optional*) – Initial values for the signal. You can either provide a single array,
  or a list of them. If a list of arrays is used, they must have the same length.
  Defaults to None, meaning the optimizer initializes the variables with random values.
* **name** (*str* *or* *None* *,* *optional*) – The name of the node.
### Returns
The optimizable piecewise-constant signal.
### Return type
[Pwc](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Pwc.md#boulderopal.graph.Pwc)

### SEE ALSO
[`Graph.real_optimizable_pwc_signal`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/real_optimizable_pwc_signal.md#boulderopal.graph.Graph.real_optimizable_pwc_signal)
: Create a real optimizable Pwc signal.

[`Graph.complex_pwc_signal`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/complex_pwc_signal.md#boulderopal.graph.Graph.complex_pwc_signal)
: Create a complex piecewise-constant signal from moduli and phases.

[`Graph.optimization_variable`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/optimization_variable.md#boulderopal.graph.Graph.optimization_variable)
: Create optimization variables, which can be bounded, semi-bounded, or unbounded.

[`Graph.pwc_signal`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/pwc_signal.md#boulderopal.graph.Graph.pwc_signal)
: Create a piecewise-constant signal.

## Notes

Note that this function sets limits to the modulus of the signal.

If you want to set (different) limits to the real and imaginary parts instead,
consider using graph.real_optimizable_signal to create signals for the
real and imaginary parts, which you can pass to graph.complex_value.
