




from __future__ import annotations

from random import randrange





def 	__A	(			__lowerCamelCase					)   -> list:
 if len(_UpperCAmelCase					) < 2:
  return collection
 a		       =							randrange(len(_UpperCAmelCase					)					)  # Use random element as pivot
 a		       =							collection[pivot_index]
 a		       =							[]  # All elements greater than pivot
 a		       =							[]  # All elements less than or equal to pivot

 for element in collection[:pivot_index]:
  (greater if element > pivot else lesser).append(_UpperCAmelCase					)

 for element in collection[pivot_index + 1 :]:
  (greater if element > pivot else lesser).append(_UpperCAmelCase					)

 return [*quick_sort(_UpperCAmelCase					), pivot, *quick_sort(_UpperCAmelCase					)]


if __name__ == "__main__":
  __UpperCamelCase      : str					      =   input("Enter numbers separated by a comma:\n").strip()
  __UpperCamelCase      : List[str]					      =   [int(item) for item in user_input.split(",")]
  print(quick_sort(unsorted))







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)

