derek-wang-ibm / coding-with-qiskit

Material for Coding with Qiskit 1.x
Apache License 2.0
17 stars 11 forks source link

Error when optimize the problem for quantum execution #2

Open phanducthien82 opened 2 months ago

phanducthien82 commented 2 months ago

Hi everybody, I'm watching video 5 and following the instructions there. When I get to "Step 2: Optimize the problem for quantum execution," I get the error TranspilerError: "The control-flow construct 'if_else' is not supported by the backend ." I compared the code I wrote to the instructions in the video, and there was no difference, but an error occurred when I executed it. Please check again and give me further instructions. Thank you!

err
derek-wang-ibm commented 1 month ago

Can you try using ibm_cusco as in the notebook? This device should support this if_else control logic