Owen L
Owen L
In cirq, there is a `state = cirq.Simulator().simulate(circuit).state_vector()` to get the state vector (or maybe that has changed recently, there was a bunch of changes leading up to cirq 1.0)
State accepts any circuit and parameters and generates the state. The initial state could be anything, but you just have to prepend that to the circuit you feed in to...
Every circuit starts off in |0>.
There are examples in the docs, see (https://www.tensorflow.org/quantum/tutorials/research_tools): ```python final_probs = tf.squeeze(tf.abs(tfq.layers.State()(REFERENCE_CIRCUIT).to_tensor()) ** 2) ```
State is not differentiable, so no gradients are possible. That specific error is actually because you shouldn't index the result outside of the call (if you move the indexing to...
You can use `tfq.layers.State` to check the state
I think state takes the circuit and parameters as input, so you would want to extract those from the PQC (you can check the docs to see if I'm right)....
I don't think 2.11.0 support is finalized yet (see https://github.com/tensorflow/quantum/pull/756 and https://github.com/tensorflow/quantum/pull/755). When it is finalized it will be through TFQ nightly, 0.7.2 requires TF 2.7.0 (see the requirements file...
To install with bezel, see the install from source instructions: https://www.tensorflow.org/quantum/install
Hmmm there are probably other issues in TFQ that need to be fixed before being stable than, TF 2.11 support will probably be out with the next release.