# sparse_pwc_hermitian_part

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

```python
Graph.sparse_pwc_hermitian_part(operator)
```

Create the Hermitian part of a piecewise-constant operator.

### Parameters
**operator** ([*SparsePwc*](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/SparsePwc.md#boulderopal.graph.SparsePwc)) – The operator $A(t)$.
### Returns
The Hermitian part $\frac{1}{2}(A(t)+A^\dagger(t))$.
### Return type
[SparsePwc](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/SparsePwc.md#boulderopal.graph.SparsePwc)

### SEE ALSO
[`Graph.hermitian_part`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/hermitian_part.md#boulderopal.graph.Graph.hermitian_part)
: Hermitian part of an operator.

[`Graph.sparse_pwc_operator`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/sparse_pwc_operator.md#boulderopal.graph.Graph.sparse_pwc_operator)
: Create SparsePwcs.

## Examples

Create a Hermitian sparse PWC operator.

```pycon
>>> from scipy.sparse import coo_matrix
>>> sigma_m = np.array([[0, 1], [0, 0]])
>>> sp_m = graph.constant_sparse_pwc_operator(duration=0.1, operator=coo_matrix(sigma_m))
>>> graph.sparse_pwc_hermitian_part(sp_m)
<SparsePwc: operation_name="sparse_pwc_hermitian_part", value_shape=(2, 2)>
```
