


import qiskit
from qiskit.providers import Backend






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)->  tuple[qiskit.QuantumCircuit, str, str]:




      """simple docstring"""

      snake_case_       ,    snake_case_       =      bin(SCREAMING_SNAKE_CASE					)[2:], bin(SCREAMING_SNAKE_CASE					)[2:]  # Remove leading '0b'

      # Ensure that both strings are of the same length
      if len(SCREAMING_SNAKE_CASE					) > len(SCREAMING_SNAKE_CASE					):
            snake_case_       =      y.zfill(len(SCREAMING_SNAKE_CASE					)					)
      else:
            snake_case_       =      x.zfill(len(SCREAMING_SNAKE_CASE					)					)

      # We need (3 * number of bits in the larger number)+1 qBits
      # The second parameter is the number of classical registers, to measure the result
      snake_case_       =      qiskit.QuantumCircuit((len(SCREAMING_SNAKE_CASE					) * 3) + 1					,					len(SCREAMING_SNAKE_CASE					) + 1					)

      # We are essentially "not-ing" the bits that are 1
      # Reversed because it's easier to perform ops on more significant bits
      for i in range(len(SCREAMING_SNAKE_CASE					)					):
            if x[::-1][i] == "1":
                  circuit.x(SCREAMING_SNAKE_CASE					)
      for j in range(len(SCREAMING_SNAKE_CASE					)					):
            if y[::-1][j] == "1":
                  circuit.x(len(SCREAMING_SNAKE_CASE					) + j					)

      return circuit, x, y






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					)->  Tuple:




      """simple docstring"""

      circuit.ccx(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)
      circuit.cx(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)
      circuit.ccx(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)
      circuit.cx(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)
      circuit.cx(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE = qiskit.Aer.get_backend('''aer_simulator'''					)					,					)->  int:




      """simple docstring"""

      if vala < 0 or vala < 0:
            raise ValueError('''Both Integers must be positive!'''					)

      # Store the Integers
      snake_case_       ,    snake_case_       ,    snake_case_       =      store_two_classics(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					)
      for i in range(len(SCREAMING_SNAKE_CASE					)					):
            full_adder(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					len(SCREAMING_SNAKE_CASE					) + i					,					len(SCREAMING_SNAKE_CASE					) + len(SCREAMING_SNAKE_CASE					) + i					,					len(SCREAMING_SNAKE_CASE					) + len(SCREAMING_SNAKE_CASE					) + i + 1					)
            circuit.barrier()  # Optional, just for aesthetics

      # Measure the resultant qBits
      for i in range(len(SCREAMING_SNAKE_CASE					) + 1					):
            circuit.measure([(len(SCREAMING_SNAKE_CASE					) * 2) + i]					,					[i]					)

      snake_case_       =      qiskit.execute(SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE					,					shots=1					).result()

      # The result is in binary. Convert it back to int
      return int(list(res.get_counts()					)[0]					,					2					)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



UpperCAmelCase			=    10**8






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE					)->  bool:




      """simple docstring"""

      if n % 10 == 0:
            return False
      snake_case_       =      str(SCREAMING_SNAKE_CASE					)
      return s == s[::-1]






def        __lowerCAmelCase    ()->  int:




      """simple docstring"""

      snake_case_       =      set()
      snake_case_       =      1
      snake_case_       =      5
      while sum_squares < LIMIT:
            snake_case_       =      first_square + 1
            while sum_squares < LIMIT:
                  if is_palindrome(SCREAMING_SNAKE_CASE					):
                        answer.add(SCREAMING_SNAKE_CASE					)
                  last_square += 1
                  sum_squares += last_square**2
            first_square += 1
            snake_case_       =      first_square**2 + (first_square + 1) ** 2

      return sum(SCREAMING_SNAKE_CASE					)


if __name__ == "__main__":
   print(solution())