I’m just start coding with Tensorflow-Quantum (TFQ), it’s a really nice module. In the tutorial I found one can setup a Variational Quantum Circuit (VQC) by something like
# Build the Keras model.
model = tf.keras.Sequential([
# The input is the data-circuit, encoded as a tf.string
tf.keras.layers.Input(shape=(), dtype=tf.string),
# The PQC layer returns the expected value of the readout gate, range [-1,1].
tfq.layers.PQC(model_circuit, model_readout),
])
The PQC Layer seems to need to specify the operators(model_readout). The process of the tutorial circuit is
Data Encode → Parametrized Gates → Measurement
I want to build a quantum circuit with the process looks like
Data Encode → Parametrized Gates → Data Encode → Parametrized Gates → .etc → Measurement
which is a technique called “Data-Reuploading” by Adrián Pérez Salinas
However, the PQC Layers seems couldn’t do the way I want because it need to specified with operators. Is there any way to create a Parametrized Layer only without any operators(measurement). Thank you so much.