1. Quantum Datasets
  2. /Binarized MNIST
  1. Quantum Datasets
  2. /Binarized MNIST

Binarized MNIST

Binarized MNIST

Binarized MNIST dataset visualization

Data for benchmarking machine learning models, taken from Train on classical, deploy on quantum: scaling generative quantum machine learning to a thousand qubits. This dataset is a binarized version of the well-known MNIST handwritten digits dataset.

Description of the dataset

The dataset consists of bit strings of length 784, that correspond to flattened images of size (28,28). The dataset is generated by normalizing the pixel values of the original MNIST dataset to [0,1] and then thresholding at 0.5 to create binary images. There are a total of 50000 training inputs and 10000 test inputs. Labels range from 0 to 9 and indicate the corresponding digits in the images. Please see the Source code tab to check how the data was generated.

Example usage

>>> [ds] = qml.data.load("other", name="binarized-mnist")
>>>
>>> ds.train['inputs']
array([[0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       ...,
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0]])
>>> ds.train['labels']
array([5, 0, 4, ..., 8, 4, 8])

Authors

Joseph Bowles

Updated

2025-06-16

version 0.1 : initial public release



Joseph Bowles

Joseph Bowles

Quantum Machine Learning researcher at Xanadu