5
votes
Accepted
How do you represent one-qubit rotations in two registers as a $4\times 4$ unitary matrix?
Note 100% sure if this is what you are asking but when you have a circuit like:
and you want to write it as a $4 \times 4$ Unitary matrix $U$ then you can do it as:
$ U = R_y(a[0]) \otimes R_z(a[1]) ...
5
votes
Accepted
Does TensorFlow Quantum tfq.convert_to_tensor work on custom gates?
I'm the engineer who looks after TensorFlow Quantum. Serializing custom gates is not supported. There is an active issue on the GitHub here: https://github.com/tensorflow/quantum/issues/354 . A quick ...
5
votes
Accepted
Sympy suddently does not work together with TFQ
Just to add a little more context to your answer: TensorFlow-Quantum 0.4.0 has an explicit version dependency on sympy==1.5.0 in the ...
4
votes
Accepted
Encoding Numeric data as a quantum circuit in TFQ
I can lend some ideas, but since I don't know exactly what you're after I will have to guess a bit.
Looking at the original snippet from the MNIST tutorial:
...
4
votes
Accepted
How to turn off multiprocessing in TensorFlow Quantum
There is no way to disable multiprocessing in TensorFlow Quantum without also affecting TensorFlow. That being said, there are still some workarounds to your problem that might be worth trying. It ...
3
votes
Cannot import tensorflow_quantum module in Colab
I believe Google Colab has been updated to use Python 3.10 as its default. You can check by running
!python --version
Tensorflow Quantum is only compatible with ...
3
votes
How to learn parameters in a quantum circuit, given an interference pattern?
I think there might be a lot to unpack here. Just making sure my understanding of the problem is correct:
I hand you a quantum circuit with some free parameters and then I hand you some samples from ...
3
votes
How do you represent one-qubit rotations in two registers as a $4\times 4$ unitary matrix?
The easiest way to get the unitary matrix of a couple of operations in Cirq is the unitary method on the Circuit class. In your ...
2
votes
Decomposition of the multi-controlled gate in tensorflow quantum
There is no decomposition being done for controlled operations by default. The library expects whatever simulator it is using to have support for the controlled_by ...
1
vote
Use parametrized quantum circuit output amplitudes for training in tensorflow
Using tfq.layers.State() you can directly access the state amplitudes and you do not need operators.
1
vote
How to learn parameters in a quantum circuit, given an interference pattern?
Here's an update for those interested (& before I had read Michael's comment)
I changed my problem around a bit, after discovering TFQ/cirq cannot (yet) handle serialising complex power-raised ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tfq × 18programming × 12
cirq × 11
quantum-enhanced-machine-learning × 6
circuit-construction × 3
machine-learning × 3
quantum-neural-network × 3
quantum-gate × 2
quantum-state × 2
quantum-circuit × 2
algorithm × 1
simulation × 1
matrix-representation × 1
python × 1