




'''simple docstring'''



import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute
def 				SCREAMING_SNAKE_CASE_				(							__A       :				int = 1 ,  __A       :				int = 1						)				->				qiskit.result.counts.Counts:
   if isinstance(__A ,  __A						) or isinstance(__A ,  __A						):
      raise TypeError("inputs must be integers."						)
   if (bit_a < 0) or (bit_a < 0):
      raise ValueError("inputs must be positive."						)
   if (math.floor(__A						) != bit_a) or (math.floor(__A						) != bit_a):
      raise ValueError("inputs must be exact integers."						)
   if (bit_a > 1) or (bit_a > 1):
      raise ValueError("inputs must be less or equal to 1."						)

   # build registers
   _SCREAMING_SNAKE_CASE =   QuantumRegister(2 ,  "qr"						)
   _SCREAMING_SNAKE_CASE =   ClassicalRegister(2 ,  "cr"						)

   _SCREAMING_SNAKE_CASE =   QuantumCircuit(__A ,  __A						)

   # entanglement the qubits
   quantum_circuit.h(1						)
   quantum_circuit.cx(1 ,  0						)

   # send the information
   _SCREAMING_SNAKE_CASE =   str(__A						) + str(__A						)

   if c_information == "11":
      quantum_circuit.x(1						)
      quantum_circuit.z(1						)
   elif c_information == "10":
      quantum_circuit.z(1						)
   elif c_information == "01":
      quantum_circuit.x(1						)
   else:
      quantum_circuit.i(1						)

   # unentangled the circuit
   quantum_circuit.cx(1 ,  0						)
   quantum_circuit.h(1						)

   # measure the circuit
   quantum_circuit.measure(__A ,  __A						)

   _SCREAMING_SNAKE_CASE =   Aer.get_backend("aer_simulator"						)
   _SCREAMING_SNAKE_CASE =   execute(__A ,  __A ,  shots=10_00						)

   return job.result().get_counts(__A						)


if __name__ == "__main__":
 print(f'''Counts for classical state send: {superdense_coding(1,1)}''')







'''simple docstring'''



lowerCamelCase_	 =		(1, 1_53, 3_70, 3_71, 16_34, 24_67_80_51, 1_15_13_22_19_01_87_63_99_25_65_09_55_97_97_39_71_52_24_01)
lowerCamelCase_	 =		(-1_53, -1, 0, 1.2, 2_00, "A", [], {}, None)
def 				SCREAMING_SNAKE_CASE_				(							__A       :				int						)				->				bool:
   if not isinstance(__A ,  __A						) or n < 1:
      return False

   # Initialization of sum and number of digits.
   _SCREAMING_SNAKE_CASE =   0
   _SCREAMING_SNAKE_CASE =   0
   _SCREAMING_SNAKE_CASE =   n
   # Calculation of digits of the number
   while temp > 0:
      number_of_digits += 1
      temp //= 10
   # Dividing number into separate digits and find Armstrong number
   _SCREAMING_SNAKE_CASE =   n
   while temp > 0:
      _SCREAMING_SNAKE_CASE =   temp % 10
      total += rem**number_of_digits
      temp //= 10
   return n == total
def 				SCREAMING_SNAKE_CASE_				(							__A       :				int						)				->				bool:
   if not isinstance(__A ,  __A						) or n < 1:
      return False

   # Init a "histogram" of the digits
   _SCREAMING_SNAKE_CASE =   [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
   _SCREAMING_SNAKE_CASE =   0
   _SCREAMING_SNAKE_CASE =   0
   _SCREAMING_SNAKE_CASE =   n
   while temp > 0:
      _SCREAMING_SNAKE_CASE, _SCREAMING_SNAKE_CASE =   divmod(__A ,  10						)
      digit_histogram[rem] += 1
      digit_total += 1

   for cnt, i in zip(__A ,  range(len(__A						)						)						):
      total += cnt * i**digit_total

   return n == total
def 				SCREAMING_SNAKE_CASE_				(							__A       :				int						)				->				bool:
   if not isinstance(__A ,  __A						) or n < 1:
      return False
   _SCREAMING_SNAKE_CASE =   len(str(__A						)						)  # the power that all digits will be raised to
   # check if sum of each digit multiplied expo times is equal to number
   return n == sum(int(__A						) ** expo for i in str(__A						)						)
def 				SCREAMING_SNAKE_CASE_				(							)				->				Optional[Any]:
   _SCREAMING_SNAKE_CASE =   int(input("Enter an integer to see if it is an Armstrong number: "						).strip()						)
   print(f"""{num} is {"" if armstrong_number(__A						) else "not "}an Armstrong number."""						)
   print(f"""{num} is {"" if narcissistic_number(__A						) else "not "}an Armstrong number."""						)
   print(f"""{num} is {"" if pluperfect_number(__A						) else "not "}an Armstrong number."""						)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()

