


UpperCAmelCase      :						int    =		{
    "0": 1,
    "1": 1,
    "2": 2,
    "3": 6,
    "4": 24,
    "5": 1_20,
    "6": 7_20,
    "7": 50_40,
    "8": 4_03_20,
    "9": 36_28_80,
}

UpperCAmelCase      :						Tuple    =		{1_45: 1_45}

UpperCAmelCase      :						Tuple    =		{
    1_45: 0,
    1_69: 3,
    3_63_01: 3,
    14_54: 3,
    8_71: 2,
    4_53_61: 2,
    8_72: 2,
}






def   __lowerCamelCase	(       lowerCamelCase__		:	int			):





			'''simple docstring'''




			if n in CACHE_SUM_DIGIT_FACTORIALS:
						return CACHE_SUM_DIGIT_FACTORIALS[n]
			lowerCamelCase								=     sum(DIGIT_FACTORIALS[let] for let in str(lowerCamelCase__			)			)
			lowerCamelCase								=     ret
			return ret






def   __lowerCamelCase	(       lowerCamelCase__		:	int     ,       lowerCamelCase__		:	set | None = None			):





			'''simple docstring'''




			lowerCamelCase								=     previous or set()
			if n in CHAIN_LENGTH_CACHE:
						return CHAIN_LENGTH_CACHE[n]
			lowerCamelCase								=     sum_digit_factorials(lowerCamelCase__			)
			if next_number in previous:
						lowerCamelCase								=     0
						return 0
			else:
						previous.add(lowerCamelCase__			)
						lowerCamelCase								=     1 + chain_length(lowerCamelCase__     ,       lowerCamelCase__			)
						lowerCamelCase								=     ret
						return ret






def   __lowerCamelCase	(       lowerCamelCase__		:	int = 60     ,       lowerCamelCase__		:	int = 1000000			):





			'''simple docstring'''




			return sum(1 for i in range(1     ,       lowerCamelCase__			) if chain_length(lowerCamelCase__			) == num_terms			)


if __name__ == "__main__":
		print(f"""{solution() = }""")





import math

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






def   __lowerCamelCase	(       lowerCamelCase__		:	int = 1     ,       lowerCamelCase__		:	int = 1			):





			'''simple docstring'''




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

			lowerCamelCase								=     QuantumCircuit(lowerCamelCase__     ,       lowerCamelCase__			)

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

			# send the information
			lowerCamelCase								=     str(lowerCamelCase__			) + str(lowerCamelCase__			)

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

			lowerCamelCase								=     Aer.get_backend("""aer_simulator"""			)
			lowerCamelCase								=     execute(lowerCamelCase__     ,       lowerCamelCase__     ,       shots=1000			)

			return job.result().get_counts(lowerCamelCase__			)


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

