amazon-braket-examples icon indicating copy to clipboard operation
amazon-braket-examples copied to clipboard

Can't find controlled-RY gate in Amazon Braket SDK.

Open AWIS99 opened this issue 2 years ago • 1 comments

I am searching for qiskit.circuit.QuantumCircuit.cry( ) methods equivalent function in Amazon Braket SDK. I also tried writing the code in Qiskit first and then run it using the Qiskit provider for Amazon Braket. But it also throws key error for cry( ) function. Please help.

image

AWIS99 avatar Sep 30 '22 10:09 AWIS99

Hi, we currently do not have a cry gate. Depending on your use case, you may pass a custom unitary gate with the corresponding matrix. Additionally, you may be interested in using OpenQASM to submit your programs to the LocalSimulator, which currently supports arbitrary control modifiers on gates. For example ctrl @ ry(theta) c, q; would give a controlled RY gate on q, controlled by c. You can find more info about simulating OpenQASM programs on the local simulator in our example notebook. Please let me know if you have any more questions!

ajberdy avatar Sep 30 '22 16:09 ajberdy