qiboteam / qiboml

Quantum Machine Learning using Qibo
Apache License 2.0
9 stars 3 forks source link

`qiboml` models modular vs monolithic approach #32

Open BrunoLiegiBastonLiegi opened 1 month ago

BrunoLiegiBastonLiegi commented 1 month ago

Currently, #20 is implementing a modular approach to the construction of a model (variational circuit), in the sense that the circuit is seen as a sequence of layers, each one with its parameters, if any. To build the model, then, the user has to allocate the layers and pass them to the QuantumModel.

An alternative, more monolithic approach, would be to just ask the user to construct a circuit and pass it directly to the QuantumModel, providing, perhaps, some standard circuits as we are doing with the layers right now. The major advantage of this approach being that the parameters are all grouped together, making it easier to set them.

alecandido commented 1 month ago

Just a slightly different take: Qibo Circuits are already modules, through their concatenation and .on_qubits() operations.

Though the Circuit modularity would be in charge of Qibo, and Qiboml would only integrate modules at the ML frameworks' level.