by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Anton Felix Lorenzen
@anfelor
@cgranade That is helpful, I didn't know about that :). Do you know how the different metrics are related? Probably 'Width' should be restricted as much as possible and I can imagine that a rotation is costlier than a Pauli Gate (?)
I have a background in math and coding, but I know virtually nothing about quantum physics, let alone quantum computers
Many thanks for the Quantum Katas by the way! I really like this hands-on approach to teaching
@anfelor: Happy to help! The resources estimator is really focused around counting the kinds of operations that are uniquely costly on quantum computers, esp. error-corrected quantum computers. To a good approximation, the cost of a quantum algorithm is determined by how many times the T operation gets called. As you note, that can happen indirectly when you call rotations or other operations, as the resources estimator expands those operations into equivalent implementations based on T. You can see some of those expansions in the runtime at https://github.com/microsoft/qsharp-runtime/tree/master/src/Simulation/Simulators/QCTraceSimulator/Circuits. From that perspective, the thing to worry most about is the T depth. Under that cost model, Pauli operations are pretty much free, since you don't need to call T to implement them.
Mariia Mykhailova
@anfelor I'm glad you're enjoying the Katas!
For the question on the extra qubit, https://github.com/tcNickolas/MiscQSharp/tree/master/DecoratingTheTree2019-Optimize talks a bit about improving performance in simulation: each extra qubit (roughly) doubles the number of numbers needed to represent the state of a system (and to update it when applying a gate), so you're not going to notice the difference between 5 and 6 qubits, but the difference between 26 and 27 is quite noticeable. It wouldn't be the case for a real device, of course, since it wouldn't update the individual amplitudes - the physics would take care of that
Anton Felix Lorenzen
@anfelor
@tcNickolas_twitter I finally got around to reading your blog post. I am actually a bit surprised that Q# can't do that optimization automatically since it should be similar to let-floating and that is essentially a solved problem, see 3.1 in https://www.microsoft.com/en-us/research/publication/let-floating-moving-bindings-to-give-faster-programs/
@cgranade I don't understand yet what makes the T operation so costly; something about error correction? But then that should apply to rotations too? I looked at the definitions of rotations, but they all seem to reduce to Interface_R which is marked intrinsic..
Anton Felix Lorenzen
@anfelor
Do you know of some papers/blog posts/READMEs that describe the architecture of the Simulator in more detail? I only found https://arxiv.org/abs/1604.06460 so far
Anton Felix Lorenzen
@anfelor
Ah, I found out about the Solovay Kitaev algorithm which can approximate rotations by T operations. I guess that answers my question :)
Mariia Mykhailova
@anfelor I'm not saying such optimizations are impossible to do - just that at the moment Q# compiler doesn't do them.
Sarah Kasier
@crazy4pi314
Gonna be hanging out on twitch working on some Q# contributions today! 12pm PDT twitch.tv/crazy4pi314
Sarah Kasier
@crazy4pi314
Starting now!
@crazy4pi314 ðŸ’•
Streaming again now, join at https://www.twitch.tv/crazy4pi314!
Thien Nguyen
@tnguyen-ornl
Do we have a documentation/issue tracker for the new Q# targeting system that I can follow?
In particular, the 'relatively new' concept of IQuantumMachine (C#) and EntryPoint (Q#). An example of how to define a new 'target', e.g. equivalent to the current approach of subclassing QuantumSimulator in the C# driver, would be very helpful :)
Sarah Kasier
@crazy4pi314
Streaming some Shor PR cleanup and starting some API documentation enhancements in 30 min! twitch.tv/crazy4pi314
Rolf Huisman
@RolfHuisman

Do we have a documentation/issue tracker for the new Q# targeting system that I can follow?
In particular, the 'relatively new' concept of IQuantumMachine (C#) and EntryPoint (Q#). An example of how to define a new 'target', e.g. equivalent to the current approach of subclassing QuantumSimulator in the C# driver, would be very helpful :)

In the https://github.com/qsharp-community/qsharp-integrations/blob/master/src/OpenQasm/OpenQasmDriver.cs a variation of this is used.

bettinaheim
@bettinaheim

Do we have a documentation/issue tracker for the new Q# targeting system that I can follow?
In particular, the 'relatively new' concept of IQuantumMachine (C#) and EntryPoint (Q#). An example of how to define a new 'target', e.g. equivalent to the current approach of subclassing QuantumSimulator in the C# driver, would be very helpful :)

@tnguyen-ornl
Just to give a heads-up, our setup regarding targeting is still a bit in flux, so please expect some changes in the near future. If you tell me more concretely what you are looking into/looking for I may be able to help.
As far as the simulator is concerned, we are looking into ways to make it easier for people to define their custom simulators deriving from our base class (this is also still in flux!). If you feel like sharing, all information about what people are interested in doing is useful for us.
As a side note (not related to targeting) with this release entry points are now fully functional in the sense that a driver code is no longer required. :)

Rolf Huisman
@RolfHuisman
@bettinaheim Can you tell a bit more details ? Looked at the IRewriteRule to see if I can revive the IBM integeration, but that one seems more suited to rewrite Q# to Q#.
@RolfHuisman: The C# code generation step is implemented as an IRewriteStep that transforms Q# â†’ Q# as the identity, but has the side effect of leaving C# files for the Csc Task to pick up: https://github.com/microsoft/qsharp-runtime/blob/master/src/Simulation/CsharpGeneration/RewriteStep.fs#L24. You may be able to do something similar for your integration project as well.
Thien Nguyen
@tnguyen-ornl

@bettinaheim: Thanks for the info. Yeah, what I'm looking into is somewhat similar to the OpenQASM integration example. I just want to make sure the way I'm doing that is future-proof w.r.t. the Q# direction :) For instance, in Q#, we can write a for loop to run 'shots' which is not ideal in terms of QASM generation. In the Q# entry point system, it seems like we are going to be able to explicitly specify multiple top-level Q# functions for different targets (pls correct me if I'm wrong), hence users can just rewrite the entry-point function for the QASM/hardware target.

Regarding the specific project, we are still early in the planning/design phase. Hopefully, we will have something to share with the community in the near future :)

the Roman Mercury
@theRomanMercury
I recently learned about Q # and started researching. I had a lot of questions in my head during my research. I have answered many questions with Quantum Katas. A very good resource.
Mariia Mykhailova
@theRomanMercury I'm glad you find the Katas useful :-) Please feel free to suggest improvements!
the Roman Mercury
@theRomanMercury
@tcNickolas_twitter Hello Mariia. Thank you for your answer. What would you suggest to study after superposition and basic gates?
Mariia Mykhailova
@theRomanMercury The roadmap at https://github.com/microsoft/QuantumKatas/wiki/Roadmap serves a dual purpose - it's a list of katas/tutorials that are already created or need to be created in the approximate order of study. The next topic after superposition would be measurements - technically you can skip ahead to quantum oracles which don't rely on measurements, but that's a more advanced topic
Anton Felix Lorenzen
@anfelor
I found it super useful to read "Mike & Ike" (Quantum Computation and Quantum Information). It is hugely readable if a bit verbose coming from a mathematical background and explains the algorithms in much detail.
the Roman Mercury
@theRomanMercury
I started reading the book. It looks very useful.
Harshit Garg
@githg22_gitlab
Hello I was trying to install qsharp and ran into some errors. Is this the right place to ask for help? Thanks.
the Roman Mercury
@theRomanMercury
which error do you get ?
Harshit Garg
@githg22_gitlab
I'm using Solus 4.1, dotnet Core SDK 3.1 installed with snap
This error comes at the step
dotnet iqsharp install
the Roman Mercury
@theRomanMercury
I downloaded Anaconda and lunched the Visual Studio Code from there then run dotnet iqsharp install and it installed.
But now when I click to play icon at codes I got syntax error
Harshit Garg
@githg22_gitlab
I don't need to install .NET framework do I
the Roman Mercury
@theRomanMercury

Pre-requisites

Python 3.6 or later
Jupyter Notebook
.NET Core SDK 3.1

Harshit Garg
@githg22_gitlab
Yeah so I have all that
This is exactly what I get
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/home/\$USERNAME/.dotnet/tools/.store/microsoft.quantum.iqsharp/0.11.2004.2825/microsoft.quantum.iqsharp/0.11.2004.2825/tools/netcoreapp3.1/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET Core runtime can be found at:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=solus.4.1-x64
the Roman Mercury
@theRomanMercury
which version did you install ?
Harshit Garg
@githg22_gitlab
dot net sdk? 3.1.300
Sagar Mishra
@achieveordie
Hello, I've got a problem in using Q# in Visual Studio Code. VS Code always shows that it doesn't identify any namespace and marks it with a red line. Same thing happens for intrinsic functions and gates like Length, M, X etc. Here's the link to Screenshot for reference - https://imgur.com/a/HRchnuQ
Also, the compiler runs the code perfectly despite having this "error". How can I solve this issue?
Mariia Mykhailova
@theRomanMercury @githg22_gitlab: That sounds like an issue with the DOTNET_ROOT environment variable. This blog post has some good advice for debugging DOTNET_ROOT issues on Linux: https://natemcmaster.com/blog/2018/05/12/dotnet-global-tools/#common-errors