texmf-dist/doc/latex/yquant/test8.qasm
raw| 1 | # |
| 2 | # File: test8.qasm |
| 3 | # Date: 22-Mar-04 |
| 4 | # Author: I. Chuang <[email protected]> |
| 5 | # |
| 6 | # Sample qasm input file - stage in |
| 7 | # simplification of quantum teleportation |
| 8 | |
| 9 | def c-Z,1,'Z' |
| 10 | |
| 11 | qubit q0,\psi |
| 12 | qubit q1,0 |
| 13 | qubit q2,0 |
| 14 | |
| 15 | H q1 |
| 16 | cnot q0,q1 |
| 17 | cnot q1,q2 |
| 18 | cnot q0,q1 |
| 19 | cnot q1,q2 |
| 20 | H q0 |
| 21 | c-Z q2,q0 |
| 22 | H q0 |
| 23 | H q0 |