
import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute






def 						lowerCamelCase__							(      a = 1	,	a = 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
			_A:						Optional[int]	    = QuantumRegister(2	,	'''qr'''   )
			_A:						Any	    = ClassicalRegister(2	,	'''cr'''   )

			_A:						Optional[Any]	    = QuantumCircuit(a	,	a   )

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

			# send the information
			_A:						List[str]	    = 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   )

			_A:						int	    = Aer.get_backend('''aer_simulator'''   )
			_A:						int	    = 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)}""")





UpperCAmelCase__	:  str      =   1000






def 						lowerCamelCase__							(      a   )   ->     float:
   return x * x






def 						lowerCamelCase__							(      a	,	a	,	a	,	a = 4   )   ->     float:
   assert callable(
       a   ), f"""the function(object) passed should be callable your input : {function}"""
   assert isinstance(a	,	(float, int)   ), f"""a should be float or integer your input : {a}"""
   assert isinstance(function(a   )	,	(float, int)   ), (
       "the function should return integer or float return type of your function, "
       f"""{type(a   )}"""
   )
   assert isinstance(a	,	(float, int)   ), f"""b should be float or integer your input : {b}"""
   assert (
       isinstance(a	,	a   ) and precision > 0
   ), f"""precision should be positive integer your input : {precision}"""

   # just applying the formula of simpson for approximate integration written in
   # mentioned article in first comment of this file and above this function

   _A:						int	    = (b - a) / N_STEPS
   _A:						Any	    = function(a   ) + function(a   )

   for i in range(1	,	a   ):
      _A:						List[Any]	    = a + h * i
      result += function(a   ) * (4 if i % 2 else 2)

   result *= h / 3
   return round(a	,	a   )


if __name__ == "__main__":
   import doctest

   doctest.testmod()



