I was having trouble learning how to use qasm_src kwarg.
Jack wrote some important instructions on slack:
qasm_src is only a kwarg to the QisJob ctor.
If you want to pass source via stdin to the qisjob command, just give no file arg and pipe stdin to the instance
as an example:
echo 'OPENQASM 2.0; include qelib1.inc; qreg q[1]; creg c[1]; h q[0]; measure q[0] -> c[0];' | qisjob -b ibmqx2
Note: qelib1.inc needs to be inside quotes.
Though, this example itself was not enough to make it work since it was throwing the error:
UnboundLocalError: local variable 'the_source' referenced before assignment
Jack found that to be solvable with un-indenting a line.
This fix can now be seen here.
I was having trouble learning how to use
qasm_src
kwarg.Jack wrote some important instructions on slack:
as an example:
echo 'OPENQASM 2.0; include qelib1.inc; qreg q[1]; creg c[1]; h q[0]; measure q[0] -> c[0];' | qisjob -b ibmqx2
Note:
qelib1.inc
needs to be inside quotes.Though, this example itself was not enough to make it work since it was throwing the error:
UnboundLocalError: local variable 'the_source' referenced before assignment
Jack found that to be solvable with un-indenting a line. This fix can now be seen here.