Figu 5
From: Contextual quantum neural networks for stock price prediction

Quantum Batch Learning. A diagram showing the learning procedure of our proposed quantum batch gradient update for a context of T. The top most qubit is an ancilla qubit. For a batch, a distribution over inputs is loaded succeeding qubits (the input qubits) and the following qubit(s) is for the output. The joint distribution of the inputs and outputs for the batch is loaded on the subsequent qubits. The circuit inside the Grey box (\(\hat{U}(\varvec{\theta })\)) is applied sequentially for a required number of iterations, is a contextual quantum neural network to prepare an approximate of the loaded joint distribution. A SWAP test is then used to take the fidelity loss between the two distributions.