sparse_pwc_hermitian_part

Graph.sparse_pwc_hermitian_part(operator)

Creates 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

pwc_operator_hermitian_part()

Create the Hermitian part of a Pwc 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)>