# sample_pwc

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

```python
Graph.sample_pwc(pwc, sample_times, *, name=None)
```

Sample a Pwc at the given times.

### Parameters
* **pwc** ([*Pwc*](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Pwc.md#boulderopal.graph.Pwc)) – The Pwc to sample.
* **sample_times** (*list* *or* *tuple* *or* *np.ndarray* *(* *1D* *,* *real* *)*) – The times at which you want to sample the Pwc. Must be ordered, contain
  at least one element, and lie between 0 and the duration of the Pwc.
  For a sample time $t$ the returned value
  lies in the half open interval $t_{j-1} < t \leq t_j$, where
  $t_j$ indicates the boundary of a segment.
* **name** (*str* *or* *None* *,* *optional*) – The name of the node.
### Returns
The values of the Pwc at the given times.
### Return type
[Tensor](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)

### SEE ALSO
[`Graph.sample_stf`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/sample_stf.md#boulderopal.graph.Graph.sample_stf)
: Sample an Stf at given times.

## Notes

For more information on Pwc nodes see the [Working with time-dependent functions in
Boulder Opal](https://docs.q-ctrl.com/boulder-opal/topics/working-with-time-dependent-functions-in-boulder-opal) topic.
