3
$\begingroup$

For educational purposes I would like to make some circuits in the nice IBM quantum experience circuit composer GUI. The only problem is that the set of gates I can use here is quite limited (I would like to use a "delay" instruction which is included in qiskit). The only problem is that the qiskit editor tab is set to read only mode. I was wondering if there was a way to enable this editor.

Thanks!

$\endgroup$
5
  • 4
    $\begingroup$ I’m voting to close this question because it is not about quantum computing (similarly to how a question about GUI controls in Google Sky would not be a question about astronomy). $\endgroup$ Nov 1 at 17:48
  • $\begingroup$ @AdamZalcman, the way I see it is: can you ask a question about code editors on SoF? 🤔 I see some of them on SoF and they are not closed, so... $\endgroup$
    – user206904
    Nov 1 at 20:35
  • $\begingroup$ @user206904 Yes, you can. They have many suitable tags (e.g. generic "code-editor" and some specific ones) and even tags appropriate for other more general types of editors such as text editors (e.g. "editor", "text-editor"). $\endgroup$ Nov 1 at 20:55
  • $\begingroup$ @AdamZalcman, Okay then, to me this is not different than asking about code editors in SoF, so I think... IMHO this question is not really off-topic... I would argue SoF might be a bit more suitable place to ask it, but idk... People who know Qiskit are mainly here more than SoF I guess... $\endgroup$
    – user206904
    Nov 1 at 21:31
  • $\begingroup$ @user206904 Yeah, I agree there are some good arguments for both positions. There's been some discussions on meta, e.g. here. I invite you to join in! :-) $\endgroup$ Nov 1 at 22:03
0
$\begingroup$

The way this works in IBM Quantum Experience is with the IBM Quantum Lab:

https://lab.quantum-computing.ibm.com/

This will open a Jupyter Notebook where Qiskit is preinstalled.

$\endgroup$
0
$\begingroup$

No there is no way to edit the Qiskit generated code.

Imagine if you change the names of the variables to whatever you want, how do you expect it to build a circuit out of it? Converting an assembly language like QASM to Python is relatively easy, you will notice the Qiskit code generated by the composer uses a very specific and consistent way for naming the registers. However doing the conversion in the other way, is not that easy due to the different ways of writing python codes. (possible, by forcing some constrains, but no easy, so probably the Qiskit developers preferred to avoid the headache)

You can just create the circuit via the circuit composer, then copy-paste the read-only code generated in a jupyter-notebook and do the remaining modifications manually on https://lab.quantum-computing.ibm.com/ (or install Qiskit locally if you want)

$\endgroup$
3
  • $\begingroup$ I would love to understand why the downvote -_- $\endgroup$
    – user206904
    Nov 1 at 21:29
  • $\begingroup$ I am not the downvoter, but my guess would be the reason is the phrasing of the answer as a rhetorical question. Otherwise, the answer could also be wrong in some subtle way - I can't tell since I don't actually know qiskit and circuit composer. $\endgroup$ Nov 1 at 22:04
  • $\begingroup$ Thanks for the hint, I edited my question. Maybe you are correct, to me the answer is so obvious, but maybe not to everyone if they don't have much knowledge with coding, and how compiling and parsing a programming language works. I edited my question to explain that $\endgroup$
    – user206904
    Nov 1 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.