


"""simple docstring"""
import qiskit
from qiskit.providers import Backend






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	)	->tuple[qiskit.QuantumCircuit, str, str]:
	"""simple docstring"""





	__snake_case      ,				__snake_case      :		List[str]         =							bin(_snake_case	)[2:], bin(_snake_case	)[2:]  # Remove leading '0b'

	# Ensure that both strings are of the same length
	if len(_snake_case	) > len(_snake_case	):
		__snake_case      :		Tuple         =							y.zfill(len(_snake_case	)	)
	else:
		__snake_case      :		Optional[int]         =							x.zfill(len(_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      :		Optional[int]         =							qiskit.QuantumCircuit((len(_snake_case	) * 3) + 1	,  len(_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(_snake_case	)	):
		if x[::-1][i] == "1":
			circuit.x(_snake_case	)
	for j in range(len(_snake_case	)	):
		if y[::-1][j] == "1":
			circuit.x(len(_snake_case	) + j	)

	return circuit, x, y






def 						lowercase				(	_snake_case		: qiskit.QuantumCircuit	,  _snake_case		: int	,  _snake_case		: int	,  _snake_case		: int	,  _snake_case		: int	,  )	->List[Any]:
	"""simple docstring"""





	circuit.ccx(_snake_case	,  _snake_case	,  _snake_case	)
	circuit.cx(_snake_case	,  _snake_case	)
	circuit.ccx(_snake_case	,  _snake_case	,  _snake_case	)
	circuit.cx(_snake_case	,  _snake_case	)
	circuit.cx(_snake_case	,  _snake_case	)






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	,  _snake_case		: Backend = 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      :		List[str]         =							store_two_classics(_snake_case	,  _snake_case	)
	for i in range(len(_snake_case	)	):
		full_adder(_snake_case	,  _snake_case	,  len(_snake_case	) + i	,  len(_snake_case	) + len(_snake_case	) + i	,  len(_snake_case	) + len(_snake_case	) + i + 1	)
		circuit.barrier()  # Optional, just for aesthetics

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

	__snake_case      :		Optional[int]         =							qiskit.execute(_snake_case	,  _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()













"""simple docstring"""


_UpperCamelCase							:       str       					=		10**8




def      snake_case    (A_ :int ):







  '''simple docstring'''

  if n % 1_0 == 0:
    return False
  a	:     Optional[int]							=  str(A_ )
  return s == s[::-1]




def      snake_case    ():







  '''simple docstring'''

  a	:     Tuple							=  set()
  a	:     Optional[Any]							=  1
  a	:     List[str]							=  5
  while sum_squares < LIMIT:
    a	:     int							=  first_square + 1
    while sum_squares < LIMIT:
      if is_palindrome(A_ ):
        answer.add(A_ )
      last_square += 1
      sum_squares += last_square**2
    first_square += 1
    a	:     List[str]							=  first_square**2 + (first_square + 1) ** 2

  return sum(A_ )


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




