




'''simple docstring'''






class  A		:




				'''simple docstring'''





				class  A		:




								'''simple docstring'''





								A				     =    '''_prev''', '''_data''', '''_next'''
								def __init__(self			,  _UpperCAmelCase			,  _UpperCAmelCase			,  _UpperCAmelCase      )     ->	Optional[Any]:
											__UpperCamelCase				:      Any									=       link_p
											__UpperCamelCase				:      Optional[Any]									=       element
											__UpperCamelCase				:      Tuple									=       link_n





								def 	a_	(self      )     ->	List[Any]:
											return (
											    f" Prev -> {self._prev is not None}, Next -> {self._next is not None}"
											)







				def __init__(self      )     ->	Dict:
							__UpperCamelCase				:      Union[str, Any]									=       self._Node(lowerCAmelCase__			,  lowerCAmelCase__			,  lowerCAmelCase__      )
							__UpperCamelCase				:      Union[str, Any]									=       self._Node(lowerCAmelCase__			,  lowerCAmelCase__			,  lowerCAmelCase__      )
							__UpperCamelCase				:      str									=       self._trailer
							__UpperCamelCase				:      Union[str, Any]									=       self._header
							__UpperCamelCase				:      Union[str, Any]									=       0
				def __len__(self      )     ->	Union[str, Any]:
							return self._size
				def 	a_	(self      )     ->	Optional[Any]:
							return self.__len__() == 0
				def 	a_	(self			,  _UpperCAmelCase			,  _UpperCAmelCase			,  _UpperCAmelCase      )     ->	Union[str, Any]:
							__UpperCamelCase				:      Any									=       self._Node(lowerCAmelCase__			,  lowerCAmelCase__			,  lowerCAmelCase__      )
							__UpperCamelCase				:      str									=       new_node
							__UpperCamelCase				:      Tuple									=       new_node
							self._size += 1
							return self





				def 	a_	(self			,  _UpperCAmelCase      )     ->	Any:
							__UpperCamelCase				:      Optional[int]									=       node._prev
							__UpperCamelCase				:      Optional[int]									=       node._next

							__UpperCamelCase				:      List[Any]									=       successor
							__UpperCamelCase				:      Optional[int]									=       predecessor
							self._size -= 1
							__UpperCamelCase				:      int									=       node._data
							__UpperCamelCase				:      Any									=       None
							del node
							return temp







class  A		(			_DoublyLinkedBase		):




				'''simple docstring'''





				def 	a_	(self      )     ->	Any:


							if self.is_empty():
										raise Exception("List is empty"      )
							return self._header._next._data
				def 	a_	(self      )     ->	str:


							if self.is_empty():
										raise Exception("List is empty"      )
							return self._trailer._prev._data
				def 	a_	(self			,  _UpperCAmelCase      )     ->	List[Any]:
							return self._insert(self._header			,  lowerCAmelCase__			,  self._header._next      )
				def 	a_	(self			,  _UpperCAmelCase      )     ->	Any:
							return self._insert(self._trailer._prev			,  lowerCAmelCase__			,  self._trailer      )
				def 	a_	(self      )     ->	Tuple:


							if self.is_empty():
										raise IndexError("remove_first from empty list"      )
							return self._delete(self._header._next      )





				def 	a_	(self      )     ->	List[Any]:


							if self.is_empty():
										raise IndexError("remove_first from empty list"      )
							return self._delete(self._trailer._prev      )








'''simple docstring'''






import math

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

def       __lowerCAmelCase (   snake_case__ = 1 ,				snake_case__ = 1						):
			if isinstance(snake_case__ ,				snake_case__						) or isinstance(snake_case__ ,				snake_case__						):
						raise TypeError("inputs must be integers."						)
			if (bit_a < 0) or (bit_a < 0):
						raise ValueError("inputs must be positive."						)
			if (math.floor(snake_case__						) != bit_a) or (math.floor(snake_case__						) != 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
			__UpperCamelCase				:      Tuple									=       QuantumRegister(2 ,				"qr"						)
			__UpperCamelCase				:      Dict									=       ClassicalRegister(2 ,				"cr"						)

			__UpperCamelCase				:      str									=       QuantumCircuit(snake_case__ ,				snake_case__						)

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

			# send the information
			__UpperCamelCase				:      Optional[Any]									=       str(snake_case__						) + str(snake_case__						)

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

			__UpperCamelCase				:      Dict									=       Aer.get_backend("aer_simulator"						)
			__UpperCamelCase				:      Tuple									=       execute(snake_case__ ,				snake_case__ ,				shots=1_000						)

			return job.result().get_counts(snake_case__						)


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



