4

The package qasm2circ can be find here, which is a package to draw quantum circuit. I download it and follow the file Installation instructions. My OS is Ubuntu. I have the following problems:

  1. When I run the command qasm2png in the terminal in the folder qasm2circ-v1.4, it outputs thatqasm2png: command not found.

  2. The tex file in the folder samples can only be compiled from terminal with command xelatex but not editor. How strange! My editor is gedit with gedit-latex plugin and the configuration is http://t.imget.com/OriginalPicture/Soloman/geditlatexplugin.png

PS:I tried to add path but failed http://t.imget.com/OriginalPicture/Soloman/ubuntuquestionqasm.png

0

2 Answers 2

2

qasm2png is looking for /bin/csh to interpret the code but it seems that this does not exist on your system. This is almost certainly because you do not have csh installed. You can install it using Ubuntu's package manager. The package might be called something like tcsh rather than csh. (On my system /bin/csh is provided by tcsh which is an enhanced/extended version of the original csh.)

When you have installed it, check that it is found using which csh. This should return /bin/csh. Then try running qasm2png again.

To get the editor working, you either need to install things into your existing PATH, add the relevant directory to that PATH or specify the full path to relevant commands. (The last option may or may not work depending on how the scripts work exactly.)

14
  • 1
    The last option will not work. These scripts are…poorly designed. Props to the author for releasing the tool, but the scripts need to be worked on. It's interesting to me that Ubuntu doesn't come packaged with csh though; it was my understanding that quite a few older support utilities still use it. Sep 14, 2014 at 4:22
  • Thanks! qasm2png works but only output a dvi file not a png file, the same for qasmpdf. Sep 14, 2014 at 5:08
  • @EdenHarder Do you have netpbm installed? This would be using Ubuntu's package manager - it is not a TeX thing. According to the INSTALL file, this is required to produce png files. The scripts are not doing much error checking and are not going to give you useful error messages. I'm not sure why qasmpdf might be failing.
    – cfr
    Sep 14, 2014 at 16:27
  • @EdenHarder What am I meant to run qasm2png on? I can compile test1.tex to DVI OK. (At the terminal, anyhow.) But I'm not sure what I'm meant to apply qasm2png to. You said it gave you a DVI. From what? If I run it on test1.tex, I just get errors - nothing like a DVI. Be careful, too. It does not check to see that it is not overwriting an existing file and so will clobber your .tex files freely.
    – cfr
    Sep 14, 2014 at 23:47
  • @cfr Thanks! ./qasm2png samples/test1.qasm will only produce a DVI. Sep 15, 2014 at 0:45
0

Two possibilities:

  • Give the shell a path to work from or add the QASM directory to your PATH environment variable:

    $ ./qasm2png samples/test1.tex
    
  • Your editor is incorrectly configured. Please provide your editor and its QASM-related settings.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .