texmf-dist/doc/latex/yquant/test5.qasm
raw| 1 | # |
| 2 | # File: test5.qasm |
| 3 | # Date: 22-Mar-04 |
| 4 | # Author: I. Chuang <[email protected]> |
| 5 | # |
| 6 | # Sample qasm input file - demonstrate arbitray qubit matrix ops |
| 7 | |
| 8 | def c-P,1,'\m{e^{i\alpha} & 0 \cr 0 & e^{-i\alpha}}' |
| 9 | def Ryt,0,'\m{\cos{\theta}&-\sin{\theta}\cr\sin{\theta}&\cos{\theta}}' |
| 10 | |
| 11 | qubit j0 |
| 12 | qubit j1 |
| 13 | |
| 14 | c-P j0,j1 |
| 15 | Ryt j0 |