>>> sigma_z = np.array([[1.0, 0.0],[0.0, -1.0]])
>>> graph.pwc_operator(
... signal=graph.pwc(durations=np.array([0.1, 0.2]), values=np.array([1, 2])),
... operator=sigma_z,
... name="operator",
... )
<Pwc: name="operator", operation_name="pwc_operator", value_shape=(2, 2), batch_shape=()>
>>> result = qctrl.functions.calculate_graph(graph=graph, output_node_names=["operator"])
>>> result.operator["operator"]
[
{"value": array([[1.0, 0.0], [0.0, -1.0]]), "duration": 0.1},
{"value": array([[2.0, 0.0], [0.0, -2.0]]), "duration": 0.2},
]