tensorflow / quantum

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

Unrecognized program type: <clas 'keras.engine.functional.functional'> #751

Open deepquantum88 opened 1 year ago

deepquantum88 commented 1 year ago

I was trying to run simple quantum circuit performing binary classification on processors "rainbow and weber", but it throws an error. Is there any short example performing machine learning task on quantum virtual machine? any help

lockwo commented 1 year ago

Is TFQ supposed to be compatible with QVM (ie does QVM have documentation on it)? Since I imagine the QVM is basically just a different kind of cirq backend, if specifying it as a backend doesn’t work I would guess it isn’t supported.

deepquantum88 commented 1 year ago

Thank you for you response. I follows your youtube videos related to tfq cirq implementations. :) as we perform QML tasks on ibmq real devices. I am planning to use TFQ PQC on QVM.

lockwo commented 1 year ago

Looking at QVM I suspect you will have to write some interfacing code, I wasn't able to get QVM working trivially as a normal backend. You can see examples of how the cirq backend here: https://github.com/tensorflow/quantum/blob/master/tensorflow_quantum/core/ops/circuit_execution_ops.py.