  A quantum neural network (QNN) is an object that extends the notion of a
classical neural network to quantum models for quantum data. We can create a
QNN by parametrizing a quantum process and then using it to model unknown
relations between quantum states. In this paper, we explore how to use
measurement-based quantum computation for quantum machine learning problems and
propose a universal QNN in this framework which we call the multiple-triangle
ansatz (MuTA). Using the proposed QNN, we solve several tasks, including
learning a universal set of gates, optimizing measurement with post-processing,
learning a quantum instrument, and the classification of classical data.
Finally, we discuss how to train an ansatz under the hardware constraints
imposed by photonic Gottesman-Kitaev-Preskill qubits. Our work demonstrates the
feasibility of using measurement-based quantum computation as a framework for
quantum machine learning algorithms.
