rho_m_flattenΒΆ

Post Processing - Classical Shadow - Rho M Flatten (qurry.process.classical_shadow.rho_m_flatten)

qurry.process.classical_shadow.rho_m_flatten.rho_m_flatten_core(shots: int, counts: list[dict[str, int]], random_unitary_um: dict[int, dict[int, Literal[0, 1, 2] | int]], selected_classical_registers: list[int]) tuple[list[ndarray[tuple[int, int], dtype[complex128]]], list[int], float][source]ΒΆ

Rho M Cell Core calculation and directly return :cls:`ClassicalShadowComplex`.

Parameters:
  • shots (int) – The number of shots.

  • counts (list[dict[str, int]]) – The list of the counts.

  • random_unitary_um (dict[int, dict[int, Union[Literal[0, 1, 2], int]]]) – The shadow direction of the unitary operators.

  • selected_classical_registers (list[int]) – The list of the index of the selected_classical_registers.

Returns:

tuple[

list[np.ndarray[tuple[int, int], np.dtype[np.complex128]]], list[int], float

]:

The list of rho_m, the sorted list of the selected qubits, and calculation time.