





"""simple docstring"""


import qiskit




def 					lowercase__    (					lowercase_		,lowercase_			)					->		qiskit.result.counts.Counts:




      """simple docstring"""

      _UpperCamelCase      :	Optional[Any]						=       qiskit.Aer.get_backend("aer_simulator"			)

      # Create a Quantum Circuit acting on the q register
      _UpperCamelCase      :	str						=       qiskit.QuantumCircuit(lowercase_		,lowercase_			)

      # Map the quantum measurement to the classical bits
      circuit.measure([0]		,[0]			)

      # Execute the circuit on the simulator
      _UpperCamelCase      :	str						=       qiskit.execute(lowercase_		,lowercase_		,shots=1_000			)

      # Return the histogram data of the results of the experiment.
      return job.result().get_counts(lowercase_			)


if __name__ == "__main__":
  print(f"""Total count for various states are: {single_qubit_measure(1, 1)}""")







"""simple docstring"""


class      __SCREAMING_SNAKE_CASE    :







  '''simple docstring'''


  def __init__(		self   :       Optional[Any]					,   __a   :       list[int]	)		->				None:
        _UpperCamelCase      :	Tuple						=       len(__a	)
        _UpperCamelCase      :	Dict						=       [0] * len_array

        if len_array > 0:
              _UpperCamelCase      :	Optional[Any]						=       array[0]

        for i in range(1					,   __a	):
              _UpperCamelCase      :	Tuple						=       self.prefix_sum[i - 1] + array[i]

  def    __SCREAMING_SNAKE_CASE				(		self   :       Dict					,   __a   :       int					,   __a   :       int	)		->				int:
        if start == 0:
              return self.prefix_sum[end]

        return self.prefix_sum[end] - self.prefix_sum[start - 1]


  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[Any]					,   __a   :       int	)		->				bool:
        _UpperCamelCase      :	int						=       {0}
        for sum_item in self.prefix_sum:
              if sum_item - target_sum in sums:
                    return True

              sums.add(__a	)

        return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()
