




'''simple docstring'''






def       __lowerCAmelCase (   snake_case__						):
			__UpperCamelCase				:      Optional[int]									=       len(snake_case__						)
			for cycle_start in range(0 ,				array_len - 1						):
						__UpperCamelCase				:      Union[str, Any]									=       array[cycle_start]

						__UpperCamelCase				:      Optional[Any]									=       cycle_start
						for i in range(cycle_start + 1 ,				snake_case__						):
									if array[i] < item:
												pos += 1

						if pos == cycle_start:
									continue

						while item == array[pos]:
									pos += 1

						__UpperCamelCase		, __UpperCamelCase				:      Union[str, Any]									=       item, array[pos]
						while pos != cycle_start:
									__UpperCamelCase				:      int									=       cycle_start
									for i in range(cycle_start + 1 ,				snake_case__						):
												if array[i] < item:
															pos += 1

									while item == array[pos]:
												pos += 1

									__UpperCamelCase		, __UpperCamelCase				:      List[str]									=       item, array[pos]

			return array


if __name__ == "__main__":
				assert cycle_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
				assert cycle_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]









'''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)}')



