Quantum Machine Learning, Machine Learning, Data Science, Programming, Hands On Tutorials.
X.iloc[indices_train], X.iloc[indices_test] y_train, y_test = y[indices_train], y[indices_test] # Applying PCA to reduce the dimensionality of the dataset to match the quantum feature map from sklearn.decomposition import PCA pca = PCA(n_components=2) # Reduce to 2 dimensions for the quantum