#VS2017 – Main Namespaces to be used in Q#


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


My Posts



Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: