I am currently researching on the topic of image processing in quantum computers. I recently did a project using pennylane (variational classifier) to classify biomedical images. However, I worked only with 2 and 4 qubit circuits and am wanting to try with a larger number of qubits. I am having some trouble understanding how I can go about designing a circuit of this size. Can I please get some help ?
Thank you in advance
machine learning either classical or quantum depends significantly on your data preparation and how you configure your cost function. because of the gpus and their incredible speed less attention is given to these two points and this is actually what happens here in the quantum realm. by far, the amplitude encoding scheme can encode a single 28*28 image with only 10 qubits and there would be more room for other features and you can you the circuit centric classifier by prof schuld for your problem.
another way is to use the universal qubit classifier but it would be the deepest network ever. Or, you can try out this paper.
if you are more precise i think i can help you more
I figured it out. Thank you for your reply
Hi @vijpandaturtle! To help create your variational circuit ansatz for a larger number of qubits, you could take a look at the templates provided by PennyLane: https://pennylane.readthedocs.io/en/stable/introduction/templates.html
One that is quite useful is the
StronglyEntanglingLayers. This template creates layers like the following:
For example, for a 10 qubit circuit, with 3 strongly entangling layers:
import pennylane as qml from pennylane.templates.layers import StronglyEntanglingLayers dev = qml.device('default.qubit', wires=10) @qml.qnode(dev) def circuit(weights): StronglyEntanglingLayers(weights, wires=list(range(10))) return qml.expval(qml.PauliZ(0)) init_weights = strong_ent_layers_normal(n_layers=3, n_wires=10) circuit(init_weights)
Thank you so much @josh !