



import math

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





def     __lowerCamelCase							(   __magic_name__						:	str = 1  ,			__magic_name__						:	Dict = 1    ):

							if isinstance(__magic_name__  ,			__magic_name__    ) or isinstance(__magic_name__  ,			__magic_name__    ):
														raise TypeError("inputs must be integers."    )
							if (bit_a < 0) or (bit_a < 0):
														raise ValueError("inputs must be positive."    )
							if (math.floor(__magic_name__    ) != bit_a) or (math.floor(__magic_name__    ) != 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__:							int									=QuantumRegister(2  ,			"qr"    )
							a__:							Dict									=ClassicalRegister(2  ,			"cr"    )

							a__:							Tuple									=QuantumCircuit(__magic_name__  ,			__magic_name__    )

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

							# send the information
							a__:							int									=str(__magic_name__    ) + str(__magic_name__    )

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

							a__:							List[Any]									=Aer.get_backend("aer_simulator"    )
							a__:							List[Any]									=execute(__magic_name__  ,			__magic_name__  ,			shots=1_000    )

							return job.result().get_counts(__magic_name__    )


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













"""simple docstring"""





def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE = 10_00       )       ->						str:
    """simple docstring"""

    if (not isinstance(SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       )) or (digit_position <= 0):
        raise ValueError('Digit position must be a positive integer'       )
    elif (not isinstance(SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       )) or (precision < 0):
        raise ValueError('Precision must be a nonnegative integer'       )

    # compute an approximation of (16 ** (n - 1)) * pi whose fractional part is mostly
    # accurate
    UpperCamelCase__								=     (
        4 * _subsum(SCREAMING_SNAKE_CASE			,						1			,						SCREAMING_SNAKE_CASE       )
        - 2 * _subsum(SCREAMING_SNAKE_CASE			,						4			,						SCREAMING_SNAKE_CASE       )
        - _subsum(SCREAMING_SNAKE_CASE			,						5			,						SCREAMING_SNAKE_CASE       )
        - _subsum(SCREAMING_SNAKE_CASE			,						6			,						SCREAMING_SNAKE_CASE       )
    )

    # return the first hex digit of the fractional part of the result
    return hex(int((sum_result % 1) * 16       )       )[2:]







def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       )       ->						float:
    """simple docstring"""

    UpperCamelCase__								=     0.0
    for sum_index in range(digit_pos_to_extract + precision       ):
        UpperCamelCase__								=     8 * sum_index + denominator_addend
        if sum_index < digit_pos_to_extract:
            # if the exponential term is an integer and we mod it by the denominator
            # before dividing, only the integer part of the sum will change;
            # the fractional part will not
            UpperCamelCase__								=     pow(
                16			,						digit_pos_to_extract - 1 - sum_index			,						SCREAMING_SNAKE_CASE       )
        else:
            UpperCamelCase__								=     pow(16			,						digit_pos_to_extract - 1 - sum_index       )
        total += exponential_term / denominator
    return total


if __name__ == "__main__":
  import doctest

  doctest.testmod()




