Skip to content

How to apply PQC or ControlledPQC? #742

Open
@Shuhul24

Description

@Shuhul24

I am using ControlledPQC and PQC for a couple of times in quantum machine learning. My question is that since I don't have any encoding data to be integrated into the quantum circuit, how can I just apply a ControlledPQC or PQC on just states that initialized as 0 states. In tutorials of PQC, they have been using some classical data and then encoding them and then applying the tfq.layers.PQC and finally compiling all these into tf.keras.Sequential. But in my case, I have input as qubits initialized as states?
Is there any way to apply PQC in this case?

Edit: I came across tfq.layers.Expectation which takes a circuit and a bunch of parameters as an input. But I don't get to know how to use tfq.layers.Expectation epoch-wise on a bunch of data? Is there any sample of code available where I can apply it on a very small data, say tf.random.normal? How can tfq.layers.Expectation be used as tf.keras.layers.Layer class?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions