sparse_pwc_hermitian_part

Graph.sparse_pwc_hermitian_part(operator)

Create the Hermitian part of a piecewise-constant operator.

Parameters

operator (SparsePwc) – The operator \(A(t)\).

Returns

The Hermitian part \(\frac{1}{2}(A(t)+A^\dagger(t))\).

Return type

SparsePwc

See also

hermitian_part()

Hermitian part of an operator.

sparse_pwc_operator()

Create SparsePwcs.

Examples

Create a Hermitian sparse PWC operator.

>>> 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)>