


"""simple docstring"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn.datasets import load_iris
from sklearn.metrics import ConfusionMatrixDisplay
from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier

def 				_snake_case      (   __snake_case							:      Any   ):




   """simple docstring"""







   return (data["data"], data["target"])

def 				_snake_case      (   __snake_case							:      Optional[int]						, __snake_case							:      Optional[int]   ):




   """simple docstring"""







   _lowerCamelCase	:					int   =		XGBClassifier()
   classifier.fit(a__						, a__   )
   return classifier

def 				_snake_case      (   ):




   """simple docstring"""







   _lowerCamelCase	:					str   =		load_iris()
   _lowerCamelCase	:					List[str]   =		data_handling(a__   )
   _lowerCamelCase	:					int   =		train_test_split(
       a__						, a__						, test_size=0.25   )

   _lowerCamelCase	:					Optional[Any]   =		iris['target_names']

   # Create an XGBoost Classifier from the training data
   _lowerCamelCase	:					Dict   =		xgboost(a__						, a__   )

   # Display the confusion matrix of the classifier with both training and test sets
   ConfusionMatrixDisplay.from_estimator(
       a__						, a__						, a__						, display_labels=a__						, cmap="""Blues"""						, normalize="""true"""						, )
   plt.title("""Normalized Confusion Matrix - IRIS Dataset"""   )
   plt.show()


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)
 main()









"""simple docstring"""


import qiskit


def        UpperCAmelCase      (					a__     ,      a__ ):





						'''simple docstring'''






						lowerCAmelCase   :List[Any]						=			qiskit.Aer.get_backend('aer_simulator' )

						# Create a Quantum Circuit acting on the q register
						lowerCAmelCase   :Optional[int]						=			qiskit.QuantumCircuit(a__     ,      a__ )

						# Apply X (NOT) Gate to Qubits 0 & 1
						circuit.x(0 )
						circuit.x(1 )

						# Map the quantum measurement to the classical bits
						circuit.measure([0, 1]     ,      [0, 1] )

						# Execute the circuit on the qasm simulator
						lowerCAmelCase   :Dict						=			qiskit.execute(a__     ,      a__     ,      shots=10_00 )

						# Return the histogram data of the results of the experiment.
						return job.result().get_counts(a__ )


if __name__ == "__main__":
		__SCREAMING_SNAKE_CASE   =   single_qubit_measure(2, 2)
		print(F"""Total count for various states are: {counts}""")