diff options
author | Norbert Preining <norbert@preining.info> | 2020-06-14 03:02:26 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-06-14 03:02:26 +0000 |
commit | 893b65e5d4c0b7cb8ebbfca9ee6b090b9a4a182c (patch) | |
tree | f6b0cff2cf2f8e30ef3edbfa6c7205e588e81515 /graphics/pgf/contrib/yquant/doc/qasm/test13.qasm | |
parent | 2d0067edb74f15b431d7a1e3a42b4f525986cef0 (diff) |
CTAN sync 202006140302
Diffstat (limited to 'graphics/pgf/contrib/yquant/doc/qasm/test13.qasm')
-rw-r--r-- | graphics/pgf/contrib/yquant/doc/qasm/test13.qasm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/yquant/doc/qasm/test13.qasm b/graphics/pgf/contrib/yquant/doc/qasm/test13.qasm new file mode 100644 index 0000000000..a8def4239c --- /dev/null +++ b/graphics/pgf/contrib/yquant/doc/qasm/test13.qasm @@ -0,0 +1,42 @@ +# +# File: test13.qasm +# Date: 22-Mar-04 +# Author: I. Chuang <ichuang@mit.edu> +# +# Sample qasm input file - three-qubit phase +# estimation circuit with QFT and controlled-U + + defbox CU,3,1,'U' + defbox CU2,3,1,'U^2' + defbox CU4,3,1,'U^4' + def c-S,1,'S' + def c-T,1,'T' + + qubit j0,0 # QFT qubits + qubit j1,0 + qubit j2,0 + qubit s0 # U qubits + qubit s1 + + h j0 # equal superposition + h j1 + h j2 + + CU4 j0,s0,s1 # controlled-U + CU2 j1,s0,s1 + CU j2,s0,s1 + + h j0 # QFT + c-S j0,j1 + h j1 + nop j0 + c-T j0,j2 + c-S j1,j2 + h j2 + nop j0 + nop j0 + nop j1 + + measure j0 # final measurement + measure j1 + measure j2 |