3 <style|<tuple|tmdoc|maxima>>
7 Utilizzare sessioni di Qcl in <TeXmacs>
10 <name|Qcl> è un linguaggio di programmazione di alto livello e indipendente
11 dall'architettura per i computer quantistici, con una sintassi derivata dai
12 linguaggi procedurali classici come il <name|C> o il <name|Pascal>. Questo
13 permette la completa implementazione e la simulazione di algoritmi
14 quantistici (includendo componenti classiche) in un formalismo consistente.
15 L'interfaccia di <TeXmacs> è utile soprattutto per visualizzare in modo
16 leggibile gli stati quantici. Per maggiori informazioni si veda
19 \ \ \ \ http://tph.tuwien.ac.at/~oemer/qcl.html
22 Come consiglio, gli utilizzatori farebbero meglio ad installare la versione
23 binaria più recente, ora vi è la 0.5, poiché è difficile compilare dai
24 codici sorgenti. Inoltre, se si installa <name|Qcl> dalla versione binaria,
25 ci si assicuri che tutta la directory di libreria, <verbatim|lib>, sia
26 sotto la directory in cui sono posti i file binari <verbatim|qcl>.
28 <\session|qcl|default>
30 QCL Quantum Computation Language (32 qubits, seed 1051277574)
32 [0/32] <with|mode|math|1<hspace|0.25spc><with|color|magenta|\|<with|math
33 font family|rm|0>\<rangle\>>>
36 <\input|<\with|color|red>
44 <\input|<\with|color|red>
53 [1/32] <with|mode|math|0.92388<hspace|0.25spc><with|color|magenta|\|<with|math
54 font family|rm|0>\<rangle\>>-0.38268<hspace|0.25spc><with|color|magenta|\|<with|math
55 font family|rm|1>\<rangle\>>>
58 <\input|<\with|color|red>
67 [1/32] <with|mode|math|0.38268<hspace|0.25spc><with|color|magenta|\|<with|math
68 font family|rm|0>\<rangle\>>+0.92388<hspace|0.25spc><with|color|magenta|\|<with|math
69 font family|rm|1>\<rangle\>>>
72 <\input|<\with|color|red>
83 STATE: 1 / 32 qubits allocated, 31 / 32 qubits free
88 0.38268<hspace|0.25spc><with|color|magenta|\|<with|math font
89 family|rm|0>\<rangle\>>+0.92388<hspace|0.25spc><with|color|magenta|\|<with|math
90 font family|rm|1>\<rangle\>>
94 <\input|<\with|color|red>
102 <\input|<\with|color|red>
107 operator dft(qureg q) { const n=#q; int i; int j;for i=1 to n { for j=1
108 to i-1 { if q[n-1] and q[n-j] {Phase(pi/2^(i-j));}} H(q[n-1]);}
115 at "operator dft(qureg q) { c ...":
121 illegal scope: Global symbol dft already defined
126 <\input|<\with|color|red>
135 [1/32] <with|mode|math|0.70711<hspace|0.25spc><with|color|magenta|\|<with|math
136 font family|rm|0>\<rangle\>>+0.70711<hspace|0.25spc><with|color|magenta|\|<with|math
137 font family|rm|1>\<rangle\>>>
140 <\input|<\with|color|red>
149 <apply|tmdoc-copyright|2003|Chu-Ching Huang, Lucia Gecchelin>
151 <expand|tmdoc-license|Permission is granted to copy, distribute and/or
152 modify this document under the terms of the GNU Free Documentation License,
153 Version 1.1 or any later version published by the Free Software Foundation;
154 with no Invariant Sections, with no Front-Cover Texts, and with no
155 Back-Cover Texts. A copy of the license is included in the section entitled
156 "GNU Free Documentation License".>
161 <associate|paragraph width|150mm>
162 <associate|odd page margin|30mm>
163 <associate|page right margin|30mm>
164 <associate|page top margin|30mm>
165 <associate|reduction page right margin|25mm>
166 <associate|page type|a4>
167 <associate|reduction page bottom margin|15mm>
168 <associate|even page margin|30mm>
169 <associate|reduction page left margin|25mm>
170 <associate|page bottom margin|30mm>
171 <associate|reduction page top margin|15mm>
172 <associate|language|italian>
178 <associate|toc-10|<tuple|8.2|?>>
179 <associate|toc-11|<tuple|8.3|?>>
180 <associate|gly-1|<tuple|1|?>>
181 <associate|idx-1|<tuple|<uninit>|?>>
182 <associate|idx-2|<tuple|1|?>>
183 <associate|gly-2|<tuple|2|?>>
184 <associate|toc-12|<tuple|8.4|?>>
185 <associate|gly-3|<tuple|3|?>>
186 <associate|toc-13|<tuple|8.5|?>>
187 <associate|idx-3|<tuple|3|?>>
188 <associate|gly-4|<tuple|4|?>>
189 <associate|toc-14|<tuple|8.6|?>>
190 <associate|idx-4|<tuple|7|?>>
191 <associate|gly-5|<tuple|5|?>>
192 <associate|toc-15|<tuple|8.7|?>>
193 <associate|idx-5|<tuple|8|?>>
194 <associate|gly-6|<tuple|6|?>>
195 <associate|toc-16|<tuple|8.8|?>>
196 <associate|gly-7|<tuple|7|?>>
197 <associate|gly-8|<tuple|8|?>>
198 <associate|gly-9|<tuple|9|?>>
199 <associate|toc-1|<tuple|1|?>>
200 <associate|toc-2|<tuple|2|?>>
201 <associate|toc-3|<tuple|3|?>>
202 <associate|toc-4|<tuple|4|?>>
203 <associate|toc-5|<tuple|5|?>>
204 <associate|toc-6|<tuple|6|?>>
205 <associate|toc-7|<tuple|7|?>>
206 <associate|toc-8|<tuple|8|?>>
207 <associate|toc-9|<tuple|8.1|?>>