I just tried coding my first quantum circuit using the code snippets examples provided via IBM QLab. I ran the code as instructed and it doesn't work as shown. Does anyone know why the code doesnt work? Any thoughts, suggestions, appreciated! Thank-you! Jeffrey
Try to use this code, I saw at the very last line have "," instead of an "arrow" "->":
OPENQASM 2.0; include "qelib1.inc"; qreg q; creg c; h q; cx q,q; measure q -> c;
If you get an execution error like this:
Traceback (most recent call last): File "", line 8, in job = execute(circuit, simulator, shots=1000) NameError: name 'execute' is not defined Use %tb to get the full traceback
follow along this solution.