


import math

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







def  _lowerCamelCase(			lowercase__ = 1     ,				lowercase__ = 1			)		->			qiskit.result.counts.Counts:

		'''simple docstring'''







		if isinstance(lowercase__     ,				lowercase__			) or isinstance(lowercase__     ,				lowercase__			):
				raise TypeError('inputs must be integers.'			)
		if (bit_a < 0) or (bit_a < 0):
				raise ValueError('inputs must be positive.'			)
		if (math.floor(lowercase__			) != bit_a) or (math.floor(lowercase__			) != 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
		__lowercase=    QuantumRegister(2     ,				'qr'			)
		__lowercase=    ClassicalRegister(2     ,				'cr'			)

		__lowercase=    QuantumCircuit(lowercase__     ,				lowercase__			)

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

		# send the information
		__lowercase=    str(lowercase__			) + str(lowercase__			)

		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(lowercase__     ,				lowercase__			)

		__lowercase=    Aer.get_backend('aer_simulator'			)
		__lowercase=    execute(lowercase__     ,				lowercase__     ,				shots=1_0_0_0			)

		return job.result().get_counts(lowercase__			)


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










from __future__ import annotations

from enum import Enum





class    A					(     A_				):
							UpperCamelCase_     :							List[Any] =24
							UpperCamelCase_     :							List[Any] =21
							UpperCamelCase_     :							int =18
							UpperCamelCase_     :							Optional[int] =15
							UpperCamelCase_     :							Tuple =12
							UpperCamelCase_     :							List[str] =9
							UpperCamelCase_     :							Any =6
							UpperCamelCase_     :							List[str] =3
							UpperCamelCase_     :							str =2
							UpperCamelCase_     :							str =1
							UpperCamelCase_     :							Optional[int] =-1
							UpperCamelCase_     :							List[Any] =-2
							UpperCamelCase_     :							str =-3
							UpperCamelCase_     :							Tuple =-6
							UpperCamelCase_     :							Tuple =-9
							UpperCamelCase_     :							Optional[int] =-12
							UpperCamelCase_     :							str =-15
							UpperCamelCase_     :							Optional[Any] =-18
							UpperCamelCase_     :							Any =-21
							UpperCamelCase_     :							List[str] =-24





class    A					(     A_				):
							UpperCamelCase_     :							str =8
							UpperCamelCase_     :							Optional[Any] =7
							UpperCamelCase_     :							Tuple =6
							UpperCamelCase_     :							List[Any] =5
							UpperCamelCase_     :							Optional[Any] =4
							UpperCamelCase_     :							Union[str, Any] =3
							UpperCamelCase_     :							Union[str, Any] =2
							UpperCamelCase_     :							int =1







def  _lowerCamelCase(			lowercase__     ,				lowercase__     ,				lowercase__     ,				)		->			float:

		'''simple docstring'''







		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    SIUnit[known_prefix.lower()]
		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    SIUnit[unknown_prefix.lower()]
		__lowercase=    known_amount * (
		    1_0 ** (known_prefix.value - unknown_prefix.value)
		)
		return unknown_amount







def  _lowerCamelCase(			lowercase__     ,				lowercase__     ,				lowercase__     ,				)		->			float:

		'''simple docstring'''







		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    BinaryUnit[known_prefix.lower()]
		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    BinaryUnit[unknown_prefix.lower()]
		__lowercase=    known_amount * (
		    2 ** ((known_prefix.value - unknown_prefix.value) * 1_0)
		)
		return unknown_amount


if __name__ == "__main__":
	import doctest

	doctest.testmod()






