





from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      def __init__(		self      ,							a__      ,							a__ = None      ,							a__ = None      ,							a__ = None      ,							a__ = False      ,							a__ = False      ,							a__ = None      ,							**a__      ,							):



             """simple docstring"""





             super().__init__(
                 a__      ,							split=a__      ,							features=a__      ,							cache_dir=a__      ,							keep_in_memory=a__      ,							streaming=a__      ,							num_proc=a__      ,							**a__      ,							)
             _lowerCamelCase							:     str	=		path_or_paths if isinstance(a__      ,							a__) else {self.split: path_or_paths}
             _lowerCamelCase							:     Tuple	=		Text(
                 cache_dir=a__      ,							data_files=a__      ,							features=a__      ,							**a__      ,							)



      def 				__snake_case			(		self):



             """simple docstring"""





             if self.streaming:
                    _lowerCamelCase							:     Union[str, Any]	=		self.builder.as_streaming_dataset(split=self.split)
             # Build regular (map-style) dataset
             else:
                    _lowerCamelCase							:     List[str]	=		None
                    _lowerCamelCase							:     Optional[int]	=		None
                    _lowerCamelCase							:     Dict	=		None
                    _lowerCamelCase							:     Optional[Any]	=		None

                    self.builder.download_and_prepare(
                        download_config=a__      ,							download_mode=a__      ,							verification_mode=a__      ,							base_path=a__      ,							num_proc=self.num_proc      ,							)
                    _lowerCamelCase							:     Dict	=		self.builder.as_dataset(
                        split=self.split      ,							verification_mode=a__      ,							in_memory=self.keep_in_memory)
             return dataset








import qiskit




def    __UpperCAmelCase(      lowercase_ = 2      ):
       _lowerCamelCase							:     Optional[Any]	=		qubits

       # Using Aer's simulator
       _lowerCamelCase							:     Optional[int]	=		qiskit.Aer.get_backend('''aer_simulator'''      )

       # Creating a Quantum Circuit acting on the q register
       _lowerCamelCase							:     List[str]	=		qiskit.QuantumCircuit(lowercase_ ,    lowercase_      )

       # Adding a H gate on qubit 0 (now q0 in superposition)
       circuit.h(0      )

       for i in range(1 ,    lowercase_      ):
              # Adding CX (CNOT) gate
              circuit.cx(i - 1 ,    lowercase_      )

       # Mapping the quantum measurement to the classical bits
       circuit.measure(list(range(lowercase_      )      ) ,    list(range(lowercase_      )      )      )

       # Now measuring any one qubit would affect other qubits to collapse
       # their super position and have same state as the measured one.

       # Executing the circuit on the simulator
       _lowerCamelCase							:     str	=		qiskit.execute(lowercase_ ,    lowercase_ ,    shots=10_00      )

       return job.result().get_counts(lowercase_      )


if __name__ == "__main__":
       print(F'''Total count for various states are: {quantum_entanglement(3)}''')

