

"""simple docstring"""






import qiskit





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase						) ->      qiskit.result.counts.Counts:
 __magic_name__     =      qiskit.Aer.get_backend('''aer_simulator'''						)

 # Create a Quantum Circuit acting on the q register
 __magic_name__     =      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
 __magic_name__     =      qiskit.execute(__UpperCamelCase      ,   __UpperCamelCase      ,   shots=1000						)

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


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




"""simple docstring"""






class        _lowercase					:







     def __init__(      self ,						UpperCamelCase_       ):
      __magic_name__     =      size
      __magic_name__     =      [0] * size
      __magic_name__     =      [0] * size







     @staticmethod
     def 	lowerCAmelCase__    (      UpperCamelCase_       ):
      return index | (index + 1)







     @staticmethod
     def 	lowerCAmelCase__    (      UpperCamelCase_       ):
      return (index & (index + 1)) - 1







     def 	lowerCAmelCase__    (      self ,						UpperCamelCase_ ,						UpperCamelCase_       ):
      __magic_name__     =      value
      while index < self.size:
       __magic_name__     =      self.get_prev(UpperCamelCase_       ) + 1
       if current_left_border == index:
        __magic_name__     =      value
       else:
        __magic_name__     =      max(UpperCamelCase_ ,						UpperCamelCase_ ,						UpperCamelCase_       )
       __magic_name__     =      self.get_next(UpperCamelCase_       )







     def 	lowerCAmelCase__    (      self ,						UpperCamelCase_ ,						UpperCamelCase_       ):
      right -= 1  # Because of right is exclusive
      __magic_name__     =      0
      while left <= right:
       __magic_name__     =      self.get_prev(UpperCamelCase_       )
       if left <= current_left:
        __magic_name__     =      max(UpperCamelCase_ ,						self.tree[right]       )
        __magic_name__     =      current_left
       else:
        __magic_name__     =      max(UpperCamelCase_ ,						self.arr[right]       )
        right -= 1
      return result


if __name__ == "__main__":
 import doctest

 doctest.testmod()

