Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sagar Mishra
    @achieveordie

    However, I've got a new problem.
    I am trying to follow along with the debugging tutorial - https://docs.microsoft.com/en-us/quantum/user-guide/using-qsharp/testing-debugging?tabs=tabid-vscode

    It says that I have to create a new project using dotnet new xunit -lang Q# in my terminal.
    But doesn't xunit only provide C#, F# and VB? How can I get it to install another language? I thought we could only install new templates?

    Cassandra Granade
    @cgranade
    @achieveordie: If you run dotnet new -i Microsoft.Quantum.ProjectTemplates, that should provide you with versions of the console, classlib, and xunit templates for use with Q#. If you run dotnet new --list, that will then show you a list of all your installed templates, including what languages you have versions of those templates for. The xunit template for Q# sets up a basic Q# unit testing project that uses the @Test("QuantumSimulator") Q# attribute to denote operations that should be run as unit tests; the Quantum Development Kit will then turn those unit tests into xunit facts, so that they work with the dotnet test command.
    the Roman Mercury
    @theRomanMercury
    @crazy4pi314 are we able to download Azure Quantum ?
    Sarah Kasier
    @crazy4pi314
    So, Azure quantum is a collection of services ranging from hardware to the Quantum Development Kit to quantum inspired algorithm solutions. You can download the QDK which has the simulators that @cgranade was mentioning.
    Kevin McFarlane
    @kevinmcfarlane
    FYI, for anyone working through the basics of gates and so on I've found that the symbolic calculator here https://www.symbolab.com/solver/matrix-vector-calculator is a useful aid.
    Cassandra Granade
    @cgranade
    @kevinmcfarlane Something I've found really helpful for working through the linear algebra for quantum computing is to use NumPy to perform calcultions. QuTiP is also a great library for understanding quantum computing, and is more specialized to quantum than NumPy. Both can work great for helping to learn the math being quantum computing.
    @kevinmcfarlane Another great option, though, is to use the Microsoft.Quantum.Diagnostics.DumpMachine and DumpRegister callables to explore how different operations modify the state of your simulator as you run them.
    Sagar Mishra
    @achieveordie
    Thank you @cgranade for the help. I've got more questions when I was going through Katas, I don't want to spam here because these problems have less to do with errors and more to do with quantum logic. Are such questions allowed here?
    Cassandra Granade
    @cgranade
    @achieveordie Happy to do what I can to help! As for what questions are on-topic here, I'll leave that to @crazy4pi314 and the other qsharp.community moderators, but I'm happy to do what I can to help out with quantum computing questions.
    Sarah Kasier
    @crazy4pi314
    Quantum computing questions are fine here @achieveordie, but if you need fancier formatting/longer posts you can also post on the quantum computing stack exchange and link us here!
    Sarah Kasier
    @crazy4pi314
    And don't forget, #QuantumDevelopWithMe will be on twitch.tv/crazy4pi314 in ~2h where I'll be working on the qRAM library for Q#!
    Sagar Mishra
    @achieveordie
    @crazy4pi314 I thought the same too, it would have been painful to format the question here, here's the link to my question on SE - https://quantumcomputing.stackexchange.com/questions/12410/creating-a-w-state-for-2k-qubits Thanks a lot for the help! :)
    Barry Burd
    @allmycode_twitter
    I'm having a hellova' time trying to install iqsharp on jupyter. I keep getting error messages about not being able to acquire a lock. I think it's a dotnet problem, but I'm not familiar with either dotnet or jupyter. Searching on the error message hasn't helped. What can I try next?
    Cassandra Granade
    @cgranade
    @allmycode_twitter: Can you share the error messages that you're getting?
    Barry Burd
    @allmycode_twitter
    @cgranade While I was trying to reproduce the error message, the installation started working. My only concern is that I had to use Administrator privs on Windows to execute dotnet iqsharp install. That won't mess anything up, will it?
    @cgrande Oops! "No namespace with the name "Microsoft.Quantum.Intrinsic" exists." Is that possibly because my package versions don't match?
    Barry Burd
    @allmycode_twitter
    @cgrande Both say Microsoft.Quantum.Katas 0.11.2004.2825
    @cgranade (both In[1] and Out[2], that is)
    Barry Burd
    @allmycode_twitter
    @cgranade I successfully added the .Katas package to the notebook, but I get the "No namespace" error when I try to run Task 1.1.
    Cassandra Granade
    @cgranade
    @allmycode_twitter: I'll admit it's a bit hard to diagnose without a bit more detail, sorry. Some screenshots in particular would help provide context. The chat here supports images with ![]() notation, or you can file an issue either at https://github.com/microsoft/iqsharp/ for IQ# issues or https://github.com/microsoft/QuantumKatas/ for kata issues with more detail about the context in which you're encountering these errors. That in turn could help us solve the problem better. That said, in the meantime, installing IQ# as an administrator isn't generally necessary unless your Jupyter installation is locked to Administrator only; in that case, you can always opt for a user-local installation by using dotnet iqsharp install --user instead.
    Barry Burd
    @allmycode_twitter
    @cgranade I'm providing screenshots. including the package error message
    Sarah Kasier
    @crazy4pi314
    So it looks like the versions listed in Out[1]: don't match so you need to make sure the version of the Katas and the installed IQ# are the same
    Cassandra Granade
    @cgranade
    @allmycode_twitter Thanks, that helps a lot! In the first screenshot, you can see that the version of Microsoft.Quantum.Standard is 0.11.2006.403 doesn't match the version of Microsoft.Quantum.Katas, 0.11.2004.2825. It looks like the katas haven't been updated to support the latest version of IQ#, such that I'd recommend using the Binder deployment, or explicitly installing version 0.11.2004.2825 of IQ# locally instead of the latest. You can also file an issue at https://github.com/microsoft/QuantumKatas/issues about the versions of IQ# supported by the katas.
    Mariia Mykhailova
    @tcNickolas_twitter
    @allmycode_twitter @cgranade I'm aware that the Katas have not been updated to the latest QDK release, it's just that I didn't have time this week to get to it :-( If anybody wants to give it a try I'll be happy to review
    Barry Burd
    @allmycode_twitter
    @cgranade @tcNickolas_twitter I'm making progress... package error
    Mariia Mykhailova
    @tcNickolas_twitter
    @allmycode_twitter It's this issue: microsoft/QuantumKatas#261. The reason is the leftover build artifacts from building on a previous version of Q#; once you remove bin and obj folders and restart the notebook, the error should disappear.
    Barry Burd
    @allmycode_twitter
    By the way, I don't want to use Binder because it times out after 10 minutes while I'm researching solutions.
    There aren't any obj or bin folders in the SingleQubitGates folder directory listing
    Barry Burd
    @allmycode_twitter
    There were no subfolders to delete.
    Barry Burd
    @allmycode_twitter
    Problem solved :-) Was looking in the wrong folder for the obj subfolder. Thank you @cgranade and @tcNickolas_twitter .
    vashisth malik
    @VashisthMalik_twitter
    @tcNickolas_twitter @cgranade I am participating in warm up contest . Just new to q# . From where I can get the syntax of language fast?
    Mariia Mykhailova
    @tcNickolas_twitter
    @VashisthMalik_twitter The contest announcement has a lot of starting links, two good resources are https://docs.microsoft.com/quantum and https://github.com/Microsoft/QuantumKatas/, the latter have a lot of practice problems with solutions worked out. Enjoy the contest!
    Harshit Garg
    @githg22_gitlab
    Is anyone else stuck on the increment problem? I think my code is correct but it doesn't satisfy the Adj+Ctl thing because it uses measurement
    Cassandra Granade
    @cgranade
    @githg22_gitlab: Is that one of the contest problems? If so, you should be able to do it without measurement, so that your solution can in principle be used when your input register is in superposition.

    @githg22_gitlab: Taking a hint from the problem statement itself, I'd suggest that the last sentence is especially relevant here.

    "This operation can be implemented using just the X gate and its controlled variants."

    Harshit Garg
    @githg22_gitlab
    @cgranade It's more like I'm using an extra qubit that needs to be reset and that functor wouldn't keep the operation Adj
    And I can't find a way to test it locally through python
    Sagar Mishra
    @achieveordie
    I've got a small question, Can we apply the unwrapping operator on LittleEndian? I don't think we can do that because of the no-clone theorem, I can solve the increment problem with array of qubits, but cannot wrap my mind to do that on LittleEndian. I couldn't find any relevant operation in Microsoft.Quantum.Arithematic to apply X gate on Little Endian either...
    Harshit Garg
    @githg22_gitlab
    Yup you can do that
    Just write !
    Just write register!
    Stupid gitter
    LittleEndian is basically a different name for Qubit[], literally no other difference
    Sagar Mishra
    @achieveordie
    Won't that be qarray = LittleEndian!?
    I mean, I get what you mean, but I still find it a bit uncomfortable without having to use using()
    Also, as a side question, does the changes that we make on the unwrapped array reflected automatically in the user-defined LittleEndian?
    Harshit Garg
    @githg22_gitlab
    I think it does
    So umm
    Cam you give a hint as to how you solved the problem?
    I've been stuck at this for the past 24 hours