def __init__(self, sim_state: SimulationStateBase[TSimulationState]):
        """Initializes the step result.

        Args:
            sim_state: The `SimulationStateBase` for this step.
        """
        super().__init__(sim_state)
        self._merged_sim_state_cache: TSimulationState | None = None
        qubits = sim_state.qubits
        self._qubits = qubits
        self._qubit_mapping = {q: i for i, q in enumerate(qubits)}
        self._qubit_shape = tuple(q.dimension for q in qubits)
        self._classical_data = sim_state.classical_data
Initializes the step result.

        Args:
            sim_state: The `SimulationStateBase` for this step.
        
cirq-core/cirq/sim/simulator_base.py