Quantum Computation Language: Difference between revisions

Content deleted Content added
Dummy edit to add attribution - content copied from Quantum Programming - Special:Diff/810712988
m Examples: <source>
Line 45:
 
Like in modern programming languages, it is possible to define new operations which can be used to manipulate quantum data. For example:
<source lang="cpp">
 
operator diffuse (qureg q) {
H(q); // Hadamard Transform
Line 53:
!H(q); // undo Hadamard Transform
}
</source>
 
defines inverse about the mean operator used in [[Grover's algorithm]]. This allows one to define algorithms on a higher level of abstraction and extend the library of functions available for programmers.