Hi!
When we create a new Q# (extension. qs) file, this new file has a main namespace (usualy our project name) and then it includes a series of namespaces that will be used in our operations. Something similar to this image
The Q# file operation template includes 2 main namespaces to be used
open Microsoft.Quantum.Primitive;
This namespace provides access to basic operations such as the Hadamard gates, X, M, CNOT gates, and more. The implementation of these operations depends on the target machine. This is important because we will have to take into account the process in a simulator or X Quantum Computer.
open Microsoft.Quantum.Canon;
This namespace contains many useful functions for creating larger circuits, combinatorial and generic utilities. The implementation of the operations in the Canon is independent of the target machine, since they are built at the top of the primitive operations.
Happy QCoding!
Gretings @ Toronto
El Bruno
References
- Microsoft Quantum Development Kit
- Q# Reference, M operation
- Q# Reference, H operation
- Q# Reference, MResetZ operation
- Q# Reference, Reset operation
- Q# Reference, ResetAll operation
My Posts
- El Bruno, Releasing Qubits using Reset() and ResetAll() in Q#
- El Bruno, Using MResetZ() to reset Qubits in Q#
- El Bruno, Qubit operations in Q#
- El Bruno, Information about Simulators on Microsoft Quantum Development Kit (Do you have 16 TB RAM?)
- El Bruno, Hello QWorld using Microsoft #Quantum Development Kit (fix to build the project) [Updated]
- El Bruno, More information about the Microsoft bet in Quantum Computing
- El Bruno, Quantum Computing, let’s add this one to Artificial Intelligence and Mixed Reality!
6 thoughts on “#VS2017 – Main Namespaces to be used in Q#”