


"""simple docstring"""



from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
lowercase_							 =       load_iris()
iris.keys()


print(f"""Target names: \n {iris.target_names} """)
print(f"""\n Features: \n {iris.feature_names}""")

# Train set e Test set
lowercase_ ,  lowercase_ ,  lowercase_ ,  lowercase_							 =       train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

lowercase_							 =       KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
lowercase_							 =       [[1, 2, 1, 4], [2, 3, 4, 5]]

lowercase_							 =       knn.predict(X_new)

print(
    f"""\nNew array: \n {X_new}\n\nTarget Names Prediction: \n"""
    f""" {iris['target_names'][prediction]}"""
)



"""simple docstring"""



import doctest

import projectq
from projectq.ops import H, Measure
def     UpperCAmelCase    (					_lowercase   :      projectq.cengines._main.MainEngine  )	->   int:


	"""simple docstring"""




	lowerCAmelCase_			       = quantum_engine.allocate_qubit()
	H | qubit
	Measure | qubit
	return int(_lowercase  )


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

		# initialises a new quantum backend
		lowercase_							 =       projectq.MainEngine()

		# Generate a list of 10 random numbers
		lowercase_							 =       [get_random_number(quantum_engine) for _ in range(10)]

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

		print('Random numbers', random_numbers_list)