3

I am using IBM's Quantum Experience and I have a small problem. Dragging and dropping the gates takes a while, and they don't have a Toffoli gate. So I have to redrag in the gates that construct the Toffoli gate and it takes a while.

The composer takes in QASM files, so I tried to look up documentation for it, and some kind of editor for it (my thinking was I could more quickly type than drag, and I could copy and paste). However, I didn't find very much. The only thing I found was this reference to a package for it which converts the code into circuit diagrams. The code syntax appears significantly different, and I don't think that's what I want.

So I have two questions:

  1. Is there any editor for this so I can put files in .qasm format?
  2. Is there any documentation for this?

Thanks! Any help would be appreciated.

EDIT: I also found this and this, but I'm not sure if either are right. To make it even more confusing, the second link makes it seem like there are two kinds of QASM, and I'm not sure which one IBM uses.

Auden Young
  • 1,147
  • 2
  • 18
  • 39

2 Answers2

4

It seems that QASM is the process of being renamed, so many of the links are broken. You can find the Open Quantum Assembly Language spec at this github location:

https://github.com/IBM/qiskit-openqasm/tree/master/

The date in the PDF is January 2017.

Ross Duncan
  • 610
  • 1
  • 5
  • 11
3

Looks like it was defined in the 2005 paper 'An evaluation framework and instruction set architecture for ion-trap based quantum micro-architectures' by S Balensiefer et al:

Screenshot of opreation table

So I'd refer to that paper. A bit surprising that it's not defined by IBM anywhere easily searchable.


PS: if you just want to move boxes faster, the editor for my toy quantum circuit simulator Quirk is significantly faster than IBM's editor. (For example: the circuit adds space and reflows as you insert gates, controls are moved independently, shift+click copies gates instead of dragging, and you can ctrl+click to drag whole columns.)

Craig Gidney
  • 17,763
  • 5
  • 68
  • 136
  • Thanks so much for responding! Two quick questions, though: 1. It appears that the paper is using QCL, not QASM - is this an incorrect interpretation? 2. Do you know where I could find some editor for QASM? Again, thanks for all your help! – Auden Young Sep 29 '16 at 23:01
  • @heather My guess is that it's niche enough that there's not editors better than a standard text editor with autocomplete and customizable syntax highlighting. Maybe try notepad++? – Craig Gidney Sep 29 '16 at 23:25
  • Okay. I'll try notepad++ and use that paper for documentation. Thanks for all your help! – Auden Young Sep 30 '16 at 11:16