Quantum computing (QC) has attracted much attention due to its enormous computing power, but proposed algorithms so far are not sufficient for practical use. Therefore, if a quantum computer could obtain algorithms by itself, the applicable field of QC would be extended greatly. In this study, we investigate a learning method for a quantum bit network (QBN) by utilizing the analogy between an artificial neural network and a QBN as described in the previous reports [1, 2]. According to this analogy, we can relate a synaptic weight matrix with a Hamiltonian. We propose a quantum version of Hebb learning as follows; we enhance both excitatory and inhibitory couplings according to the probability that arbitrary two quantum bits (qubits) take the same or opposite states when a QBN outputs a desired pattern. As a first step, we trained a QBN shown in Fig. 1 to learn the XOR problem. We updated the Hamiltonian only when the hidden qubit took the state “1” in order to break symmetry because the network always learns a pair of symmetric patterns whether these patterns are desired or not. A typical successful learning result is shown in Fig. 2. Though the success rate of learning with various initial Hamiltonians reaches only 50%, this preliminary result indicates certain possibility for implementing learning function with a QBN.