[Tex/LaTex] Questions about using package `qasm2circ`

circuitikzcircuitspst-circtikz-circuit-lib

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

Best Answer

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.)

Related Question