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?
dotnet new -i Microsoft.Quantum.ProjectTemplates, that should provide you with versions of the
xunittemplates 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
xunittemplate 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
!()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 --userinstead.
@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."