
"""simple docstring"""




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  return abs(_UpperCamelCase						) if a == 0 else greatest_common_divisor(b % a ,				_UpperCamelCase						)




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  while y:  # --> when y=0 then loop will terminate and return x as final GCD.
    _lowercase:			List[str]       =     y, x % y
  return abs(_UpperCamelCase						)




def  _lowerCAmelCase		(		):






  """simple docstring"""



  try:
    _lowercase:			str       =     input('''Enter two integers separated by comma (,): '''						).split(''','''						)
    _lowercase:			Optional[Any]       =     int(nums[0]						)
    _lowercase:			List[Any]       =     int(nums[1]						)
    print(
        f'''greatest_common_divisor({num_a}, {num_a}) = '''
        f'''{greatest_common_divisor(_UpperCamelCase ,				_UpperCamelCase						)}'''						)
    print(f'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(_UpperCamelCase ,				_UpperCamelCase						)}'''						)
  except (IndexError, UnboundLocalError, ValueError):
    print('''Wrong input'''						)


if __name__ == "__main__":
  main()


"""simple docstring"""




import qiskit




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  _lowercase:			Dict       =     qiskit.Aer.get_backend('''aer_simulator'''						)

  # Create a Quantum Circuit acting on the q register
  _lowercase:			str       =     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
  _lowercase:			Tuple       =     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__":
  A__   :					Optional[int]							=   single_qubit_measure(2, 2)
  print(f"""Total count for various states are: {counts}""")
