





import qiskit





def 						lowerCamelCase__     (     UpperCamelCase__			:       int = 2						)			-> qiskit.result.counts.Counts:



					'''simple docstring'''




					_snake_case									=				qubits

					# Using Aer's simulator
					_snake_case									=				qiskit.Aer.get_backend('aer_simulator'						)

					# Creating a Quantum Circuit acting on the q register
					_snake_case									=				qiskit.QuantumCircuit(snake_case__       ,    snake_case__						)

					# Adding a H gate on qubit 0 (now q0 in superposition)
					circuit.h(0						)

					for i in range(1       ,    snake_case__						):
										# Adding CX (CNOT) gate
										circuit.cx(i - 1       ,    snake_case__						)

					# Mapping the quantum measurement to the classical bits
					circuit.measure(list(range(snake_case__						)						)       ,    list(range(snake_case__						)						)						)

					# Now measuring any one qubit would affect other qubits to collapse
					# their super position and have same state as the measured one.

					# Executing the circuit on the simulator
					_snake_case									=				qiskit.execute(snake_case__       ,    snake_case__       ,    shots=1_000						)

					return job.result().get_counts(snake_case__						)


if __name__ == "__main__":
					print(F"Total count for various states are: {quantum_entanglement(3)}")










def 						lowerCamelCase__     (     UpperCamelCase__			:       list						)			-> list:



					'''simple docstring'''




					_snake_case									=				len(UpperCamelCase__						)
					for i in range(1       ,    UpperCamelCase__						):
										_snake_case									=				collection[i]
										_snake_case									=				0
										_snake_case									=				i - 1

										while low <= high:
															_snake_case									=				(low + high) // 2
															if val < collection[mid]:
																				_snake_case									=				mid - 1
															else:
																				_snake_case									=				mid + 1
										for j in range(UpperCamelCase__       ,    UpperCamelCase__       ,    -1						):
															_snake_case									=				collection[j - 1]
										_snake_case									=				val
					return collection


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



