:py:mod:`kosmos.circuit_runner.qiskit_result` ============================================= .. py:module:: kosmos.circuit_runner.qiskit_result Functions --------- .. py:function:: calculate_expectation_values(counts: dict[str, int]) -> numpy.ndarray Calculate Z-basis expectation values for each qubit from counts. :param counts: Mapping from bitstring to number of shots. :type counts: dict[str, int] :returns: Array of expectation values (one per qubit). :rtype: np.ndarray .. py:function:: job_expectation_values(job: qiskit_ibm_runtime.RuntimeJobV2) -> list[numpy.ndarray] Calculate expectation values from job results. :param job: The job to get results for. :type job: RuntimeJob :returns: A list of arrays, where each array contains the expectation values for one circuit in the job. :rtype: list[np.ndarray]