  The emerging technology of quantum neural networks (QNNs) attracts great
attention from both the fields of machine learning and quantum physics with the
capability to gain quantum advantage from an artificial neural network (ANN)
system. Comparing to the classical counterparts, QNNs have been proven to be
able to speed up the information processing, enhance the prediction or
classification efficiency as well as offer versatile and experimentally
friendly platforms. It is well established that Kerr nonlinearity is an
indispensable element in a classical ANN, while, in a QNN, the roles of Kerr
nonlinearity are not yet fully understood. In this work, we consider a bosonic
QNN and investigate both classical (simulating an XOR gate) and quantum
(generating Schr\"odinger cat states) tasks to demonstrate that the Kerr
nonlinearity not only enables non-trivial tasks but also makes the system more
robust to errors.
