




def 	__A	(			__lowerCamelCase					)   -> list:
	a		       =							[]
	a		       =							1

	for i in range(len(__lowerCamelCase					)					):
		if i + 1 < len(__lowerCamelCase					) and text[i] == text[i + 1]:
			count += 1
		else:
			encoded.append((text[i], count)					)
			a		       =							1

	return encoded





def 	__A	(			__lowerCamelCase					)   -> str:
	return "".join(char * length for char, length in encoded					)


if __name__ == "__main__":
		from doctest import testmod

		testmod(name="run_length_encode", verbose=True)
		testmod(name="run_length_decode", verbose=True)







import doctest

import projectq
from projectq.ops import H, Measure





def 	__A	(			__lowerCamelCase					)   -> int:
	a		       =							quantum_engine.allocate_qubit()
	H | qubit
	Measure | qubit
	return int(__lowerCamelCase					)


if __name__ == "__main__":
		doctest.testmod()

		# initialises a new quantum backend
		__UpperCamelCase      : List[Any]					      =   projectq.MainEngine()

		# Generate a list of 10 random numbers
		__UpperCamelCase      : Optional[int]					      =   [get_random_number(quantum_engine) for _ in range(10)]

		# Flushes the quantum engine from memory
		quantum_engine.flush()

		print("Random numbers", random_numbers_list)

