




import qiskit

def  SCREAMING_SNAKE_CASE							(       __UpperCamelCase		, __UpperCamelCase)      ->					qiskit.result.counts.Counts:
     a     =				qiskit.Aer.get_backend("aer_simulator")

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

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


if __name__ == "__main__":
   lowercase__				:      Optional[int]	   = single_qubit_measure(2, 2)
   print(F'Total count for various states are: {counts}')







import math
import sys

def  SCREAMING_SNAKE_CASE							(       __UpperCamelCase)      ->					int:
     if number != int(__UpperCamelCase):
          raise ValueError("the value of input must be a natural number")
     if number < 0:
          raise ValueError("the value of input must not be a negative number")
     if number == 0:
          return 1
     a     =				[-1] * (number + 1)
     a     =				0
     for i in range(1		, number + 1):
          a     =				sys.maxsize
          a     =				int(math.sqrt(__UpperCamelCase))
          for j in range(1		, root + 1):
               a     =				1 + answers[i - (j**2)]
               a     =				min(__UpperCamelCase		, __UpperCamelCase)
          a     =				answer
     return answers[number]


if __name__ == "__main__":
   import doctest

   doctest.testmod()

