'''simple docstring'''




import qiskit

def 	UpperCamelCase_							(					_UpperCAmelCase  :      int			,	_UpperCAmelCase  :      int    )    ->    qiskit.result.counts.Counts:


       """simple docstring"""







       _UpperCAmelCase     :  Dict							      =    qiskit.Aer.get_backend("aer_simulator"    )

       # Create a Quantum Circuit acting on the q register
       _UpperCAmelCase     :  List[Any]							      =    qiskit.QuantumCircuit(_UpperCAmelCase			,	_UpperCAmelCase    )

       # Apply X (NOT) Gate to Qubits 0 & 1
       circuit.x(0    )
       circuit.x(1    )

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

       # Execute the circuit on the qasm simulator
       _UpperCAmelCase     :  int							      =    qiskit.execute(_UpperCAmelCase			,	_UpperCAmelCase			,	shots=1_000    )

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


if __name__ == "__main__":
  __SCREAMING_SNAKE_CASE       :     Dict     =  single_qubit_measure(2, 2)
  print(F'Total count for various states are: {counts}')





'''simple docstring'''






from __future__ import annotations

from typing import Any






class    __snake_case       (   _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    pass







class    __snake_case       :







    """simple docstring"""



    def __init__(   self    :  Union[str, Any]    ,						lowerCamelCase    :  Any		)   ->  None:
      lowerCAmelCase_			:      Any			=   data
      lowerCAmelCase_			:      Node | None			=   None

    def __iter__(   self    :  Union[str, Any]		)   ->  Optional[Any]:
      lowerCAmelCase_			:      Union[str, Any]			=   self
      lowerCAmelCase_			:      Any			=   []
      while node:
        if node in visited:
          raise ContainsLoopError
        visited.append(lowerCamelCase		)
        yield node.data
        lowerCAmelCase_			:      int			=   node.next_node





    @property
    def __lowercase   (   self    :  str		)   ->  bool:
      try:
        list(self		)
        return False
      except ContainsLoopError:
        return True


if __name__ == "__main__":
  __A					:  Dict											=      Node(1)
  __A					:  Optional[Any]											=      Node(2)
  __A					:  int											=      Node(3)
  __A					:  Optional[Any]											=      Node(4)
  print(root_node.has_loop)  # False
  __A					:  Any											=      root_node.next_node
  print(root_node.has_loop)  # True

  __A					:  List[Any]											=      Node(5)
  __A					:  Dict											=      Node(6)
  __A					:  str											=      Node(5)
  __A					:  Dict											=      Node(6)
  print(root_node.has_loop)  # False

  __A					:  Optional[int]											=      Node(1)
  print(root_node.has_loop)  # False



