Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [q#]

Q# is a domain-specific programming language used to express quantum algorithms. This tag should be used for questions related to creating/programming quantum algorithms using the 'Q#' language. If the question is not related to, or arising from some quantum aspect of Q#, it might be better to ask ...

3
votes
1answer
71 views

Quantum counting in Q#

I cannot seem to get an estimate for the number of solutions using the quantum counting algorithm described in Nielsen and Chuang, i.e. phase estimation with the Grover iteration acting as $U$. I try ...
3
votes
1answer
121 views

Practical example of Grover's algorithm (in Q#)

Is there any real example for Grover's algorithm but with real database (generated from SQL or file)? I download the Q# development kit & its example, there was one call DatabaseSearchExample ...
1
vote
1answer
25 views

Q# How to use a namespace in another project?

I have some utility operations that I'd like to use across projects. How can I import its namespace using Q# in Visual Studio 2017 in other projects?
5
votes
1answer
66 views

How to construct the “Inversion About the Mean” operator?

It seems like it should be simple, based on how Nielsen and Chuang talk about it, but I cannot seem to correctly implement the Inversion About the Mean operator ($2|\psi\rangle \langle\psi| - \mathcal{...
1
vote
1answer
111 views

How to add two integers in Q#?

I have programmed in C++, but I am interested in writing quantum programs. I have some experience with Microsoft's Q#, and I know about the canonical Shor's and Grover's algorithms. Can anyone tell ...
1
vote
1answer
78 views

How to measure in an arbitrary basis in Q#?

Q# has a measurement operator defined as follows according to the docs: operation Measure (bases : Pauli[], qubits : Qubit[]) : Result Where you give a Pauli gate ...
4
votes
2answers
61 views

How does one obtain amplitude information in Q#?

Is it possible to obtain amplitude information (in lexicographic ordering) for a particular qubit register in Q#? For example, in the following code: ...
3
votes
2answers
105 views

Finding the maximum number of Q# simulatable qubits

I'm new to Q# and I was curious on how one would find the number of Q# simulatable qubits for a specific machine. I know Microsoft has an approximation of 16GB ~ 30 qubits but I wanted a better ...
5
votes
1answer
72 views

Q# factorization Method Program

Is there a method to calculate prime factorization in Q# of Visual Studio of Microsoft Quantum Development Kit? In the python language, it is the sympy.factorint ...
7
votes
2answers
113 views

Can we perform quantum mechanical simulations using a quantum computer?

I'm a computer science major who's really keen on physics and quantum mechanics. I have started learning about Q# and D-Wave, but I just wanted to know if it's possible to test quantum mechanical ...
5
votes
3answers
175 views

Is there something like GitHub for Quantum Programming?

I'm just learning about quantum computer but some of it has been available for people to research & practice so I'd like to study it myself. The only kind of quantum computing I found so far is ...
5
votes
3answers
128 views

Checking value of variable using quantum approach

A beginner question after watching few videos. Say, var=a; var can be either of two values, ...
7
votes
3answers
171 views

How do you send an array of qubits to an operation in Q#?

I have the following operation in my .qs files: operation myOp(qubits: Qubit[]) : () { // uses elements from the qubit array } How do I send an ...
7
votes
2answers
118 views

From Q# measurements to Bloch sphere

I would like to represent the state of a qubit on a Bloch sphere from the measurements made with Q#. According the documentation, it is possible to measure a qubit in the different Pauli bases (...
11
votes
4answers
425 views

Do real commercial Quantum Computers exist?

We have been reading about Quantum Computers being developed and tested in labs. And also, we have quantum simulator programs that use limited virtual qubits (up to 30-40 qubits if cloud-based). And ...
58
votes
6answers
2k views

Are there emulators for quantum computers?

Is there any way to emulate a quantum computer in my normal computer, so that I will be able to test and try quantum programming languages (such as Q#)? I mean something that I can really test my ...