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)A(t).

Returns

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

Return type

SparsePwc

SEE ALSO

Graph.hermitian_part : Hermitian part of an operator.

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

Was this useful?