-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate parameters for the trainable part and the encoding part in EstimatorQNN #820
Comments
Thanks for pointing this out @Pingal-Pratyush-Nath, this is an interesting and tricky problem! Currently, Change the Note that changing the structure of the circuit for every data point (or Currently, we do not have a plan for including dynamic feature maps in |
@Pingal-Pratyush-Nath I am skeptical towards this being a feature but another idea could be to reframe the qnn to reduce computational overhead. What if instead, the QNN was instantiated with an ISA compliant ansatz and then the circuit was fed the datapoints in the form of transpiled ISA circuits. So you would take your initial data, turn each into a virtual circuit (QuantumCircuit) and then run the passmanager on all of these to make them ISA, this forms your dataset. Then you feed the QNN the data ISA circs and internally it stitches together each of these with the ISA ansatz and sends them in as jobs. This would just mean that you transpile the ansatz only once, reducing computational overhead. This kind of model could be worth investigating internally as a way to run "quantum data" through our NeuralNets. Honestly, I think I have convinced myself this is a good idea whilst writing this, maybe this should be a feature for 1.1 - @edoaltamura @OkuyanBoga. |
We currently plan to include this feature by the release of version In the first instance, we do not plan to support dynamic feature maps and the |
What should we add?
The circuit that we pass in the estimator QNN contains two parts : the encoding part(non trainable) and the trainable part. If the encoding circuit changes for every data point, we will have to reinstantiate the model every-time. It would have been better if we can change that encoding part of the model every time we call the model. I know we can create a parameterized circuit and pass in the parameters everytime, but sometimes the circuit itself changes depending on the data point and it is difficult to use Torch Connector for that.
I have added a sample code.
The text was updated successfully, but these errors were encountered: