def __init__(
        self,
        initial_state: int | list[int] = 0,
        qubits: Sequence[cirq.Qid] | None = None,
        classical_data: cirq.ClassicalDataStore | None = None,
    ):
        """Initializes the ClassicalBasisSimState object.

        Args:
            qubits: The qubits to simulate.
            initial_state: The initial state for the simulation.
            classical_data: The classical data container for the simulation.

        Raises:
            ValueError: If qubits not provided and initial_state is int.
                        If initial_state is not an int, list[int], or np.ndarray.

        An initial_state value of type integer is parsed in big endian order.
        """
        if isinstance(initial_state, int):
            if qubits is None:
                raise ValueError('qubits must be provided if initial_state is not list[int]')
            state = ClassicalBasisState(
                big_endian_int_to_bits(initial_state, bit_count=len(qubits))
            )
        elif isinstance(initial_state, (list, np.ndarray)):
            state = ClassicalBasisState(initial_state)
        else:
            raise ValueError('initial_state must be an int or list[int] or np.ndarray')
        super().__init__(state=state, qubits=qubits, classical_data=classical_data)
Initializes the ClassicalBasisSimState object.

        Args:
            qubits: The qubits to simulate.
            initial_state: The initial state for the simulation.
            classical_data: The classical data container for the simulation.

        Raises:
            ValueError: If qubits not provided and initial_state is int.
                        If initial_state is not an int, list[int], or np.ndarray.

        An initial_state value of type integer is parsed in big endian order.
        
cirq-core/cirq/sim/classical_simulator.py