tensorflow / quantum

Hybrid Quantum-Classical Machine Learning in TensorFlow
https://www.tensorflow.org/quantum
Apache License 2.0
1.77k stars 560 forks source link

Is the parameters input in the same manner for two different `tfq.layers`? #746

Open Shuhul24 opened 1 year ago

Shuhul24 commented 1 year ago

I am using two different layers: tfq.layers.ControlledPQC and tfq.layers.State. But the circuit, parameter symbols and parameters values are same. Is the manner in which these parameter values / weights get distributed same for evaluating tfq.layers.ControlledPQC and tfq.layers.State?

lockwo commented 1 year ago

For state, the user explicitly maps the parameter names and their values, assuming the parameter names are the same in the ControlledPQC, then yes (also true if you specify the names in values to the ControlledPQC)