diff --git a/AdvantageBenchmark/privateBuild/host.csproj b/AdvantageBenchmark/privateBuild/host.csproj index 5fbd6838ee9..0af33ce55d9 100644 --- a/AdvantageBenchmark/privateBuild/host.csproj +++ b/AdvantageBenchmark/privateBuild/host.csproj @@ -1,4 +1,4 @@ - + diff --git a/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj b/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj index b7284bec583..e89bfdce2bb 100644 --- a/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj +++ b/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj index a78b19dd7c0..2dc489c798d 100644 --- a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj @@ -22,7 +22,7 @@ - + diff --git a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj index 094f95bf64b..8b0e1a36091 100644 --- a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj +++ b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj index 8bd1d9a7828..d3011e0359f 100644 --- a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj +++ b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyControlledX.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyControlledX.cs index 8e179f2d8a7..63f155fd82e 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyControlledX.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyControlledX.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyControlledZ.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyControlledZ.cs index 1cfbeed2a0e..5fff7c75896 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyControlledZ.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyControlledZ.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledH.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledH.cs index 453fbe28339..274a2801506 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledH.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledH.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRx.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRx.cs index 56e7358db96..d20ed65cdfa 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRx.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRx.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRy.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRy.cs index 05c811dc667..b8f7b623790 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRy.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRy.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRz.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRz.cs index d6343548bca..5227619f2c1 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRz.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledRz.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledS.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledS.cs index e9e08bdb6f3..6398e5de92d 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledS.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledS.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledSWAP.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledSWAP.cs index e6d8e72382a..de99bdeec47 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledSWAP.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledSWAP.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledT.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledT.cs index 3f3e4902be5..f371a01c766 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledT.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledT.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledX.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledX.cs index 13aaf95b503..fd34d8e56ed 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledX.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledX.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledY.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledY.cs index 5e409019a40..064773160bc 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledY.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledY.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledZ.cs b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledZ.cs index 09eb9f70e9e..4e08dcda810 100644 --- a/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledZ.cs +++ b/src/Simulation/Simulators/QuantumSimulator/ApplyUncontrolledZ.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Assert.cs b/src/Simulation/Simulators/QuantumSimulator/Assert.cs index fb7d2ec5952..fc54ba1fcc1 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Assert.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Assert.cs @@ -2,9 +2,6 @@ // Licensed under the MIT License. using System; -using System.Diagnostics; -using System.Linq; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; using static System.Math; diff --git a/src/Simulation/Simulators/QuantumSimulator/AssertProb.cs b/src/Simulation/Simulators/QuantumSimulator/AssertProb.cs index 8cc32bb0f9e..955ba22929b 100644 --- a/src/Simulation/Simulators/QuantumSimulator/AssertProb.cs +++ b/src/Simulation/Simulators/QuantumSimulator/AssertProb.cs @@ -2,9 +2,6 @@ // Licensed under the MIT License. using System; -using System.Diagnostics; -using System.Linq; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; using static System.Math; diff --git a/src/Simulation/Simulators/QuantumSimulator/Exp.cs b/src/Simulation/Simulators/QuantumSimulator/Exp.cs index fcab47bc9e8..a9450d1c388 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Exp.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Exp.cs @@ -2,8 +2,6 @@ // Licensed under the MIT License. using System; -using System.Linq; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Extensions.cs b/src/Simulation/Simulators/QuantumSimulator/Extensions.cs index 9f073e6c6bd..2e38358e372 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Extensions.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Extensions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Reflection; using System.Diagnostics; using System.Linq; diff --git a/src/Simulation/Simulators/QuantumSimulator/H.cs b/src/Simulation/Simulators/QuantumSimulator/H.cs index 57b9aed9169..4b8a954bdd8 100644 --- a/src/Simulation/Simulators/QuantumSimulator/H.cs +++ b/src/Simulation/Simulators/QuantumSimulator/H.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/IsingXX.cs b/src/Simulation/Simulators/QuantumSimulator/IsingXX.cs index e36cdf6c602..e3283033548 100644 --- a/src/Simulation/Simulators/QuantumSimulator/IsingXX.cs +++ b/src/Simulation/Simulators/QuantumSimulator/IsingXX.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/IsingYY.cs b/src/Simulation/Simulators/QuantumSimulator/IsingYY.cs index 924a7903981..11338a1576d 100644 --- a/src/Simulation/Simulators/QuantumSimulator/IsingYY.cs +++ b/src/Simulation/Simulators/QuantumSimulator/IsingYY.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/IsingZZ.cs b/src/Simulation/Simulators/QuantumSimulator/IsingZZ.cs index 6265db3967d..8d182817fae 100644 --- a/src/Simulation/Simulators/QuantumSimulator/IsingZZ.cs +++ b/src/Simulation/Simulators/QuantumSimulator/IsingZZ.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/M.cs b/src/Simulation/Simulators/QuantumSimulator/M.cs index 860daa5643e..51afcaf347c 100644 --- a/src/Simulation/Simulators/QuantumSimulator/M.cs +++ b/src/Simulation/Simulators/QuantumSimulator/M.cs @@ -1,10 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Diagnostics; -using System.Linq; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Measure.cs b/src/Simulation/Simulators/QuantumSimulator/Measure.cs index 56b0dfaf6fb..630d2a1fbcf 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Measure.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Measure.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs index c99bced0ba2..8b8059f22be 100644 --- a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs +++ b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs @@ -2,11 +2,9 @@ // Licensed under the MIT License. using System; -using System.Linq; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Common; using System.Runtime.InteropServices; -using System.Threading; using Microsoft.Quantum.Simulation.Simulators.Exceptions; using Microsoft.Quantum.Intrinsic.Interfaces; using System.Collections.Generic; diff --git a/src/Simulation/Simulators/QuantumSimulator/Qubit.cs b/src/Simulation/Simulators/QuantumSimulator/Qubit.cs index 010ccab7bf7..02424dfbc3e 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Qubit.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Qubit.cs @@ -5,7 +5,6 @@ using Microsoft.Quantum.Simulation.Core; using System; using System.Diagnostics; -using System.Runtime.InteropServices; namespace Microsoft.Quantum.Simulation.Simulators { diff --git a/src/Simulation/Simulators/QuantumSimulator/QubitManager.cs b/src/Simulation/Simulators/QuantumSimulator/QubitManager.cs index da2ac62b7cb..b1bcc7b09fa 100644 --- a/src/Simulation/Simulators/QuantumSimulator/QubitManager.cs +++ b/src/Simulation/Simulators/QuantumSimulator/QubitManager.cs @@ -5,7 +5,6 @@ using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Simulators.Exceptions; using System.Diagnostics; -using System.Runtime.InteropServices; namespace Microsoft.Quantum.Simulation.Simulators { diff --git a/src/Simulation/Simulators/QuantumSimulator/R.cs b/src/Simulation/Simulators/QuantumSimulator/R.cs index fb3d85ab9ea..9308e6f49b5 100644 --- a/src/Simulation/Simulators/QuantumSimulator/R.cs +++ b/src/Simulation/Simulators/QuantumSimulator/R.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Random.cs b/src/Simulation/Simulators/QuantumSimulator/Random.cs index 419bf425112..073e9e2ab92 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Random.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Random.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Reset.cs b/src/Simulation/Simulators/QuantumSimulator/Reset.cs index 16f0ff3e39c..7a52215b8ec 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Reset.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Reset.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Rx.cs b/src/Simulation/Simulators/QuantumSimulator/Rx.cs index ec092af18d9..547ca6e0146 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Rx.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Rx.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Ry.cs b/src/Simulation/Simulators/QuantumSimulator/Ry.cs index 81962a986de..9813e2d15b4 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Ry.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Ry.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Rz.cs b/src/Simulation/Simulators/QuantumSimulator/Rz.cs index 6784d7eb149..d3e052d88d0 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Rz.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Rz.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/S.cs b/src/Simulation/Simulators/QuantumSimulator/S.cs index c1e265bba3d..592f23a17d2 100644 --- a/src/Simulation/Simulators/QuantumSimulator/S.cs +++ b/src/Simulation/Simulators/QuantumSimulator/S.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/SWAP.cs b/src/Simulation/Simulators/QuantumSimulator/SWAP.cs index 88f967a5bc3..b3cc0597e1e 100644 --- a/src/Simulation/Simulators/QuantumSimulator/SWAP.cs +++ b/src/Simulation/Simulators/QuantumSimulator/SWAP.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/StackTrace.cs b/src/Simulation/Simulators/QuantumSimulator/StackTrace.cs index c0840d02100..63ede1e4457 100644 --- a/src/Simulation/Simulators/QuantumSimulator/StackTrace.cs +++ b/src/Simulation/Simulators/QuantumSimulator/StackTrace.cs @@ -1,13 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Newtonsoft.Json; using System; using System.Collections.Generic; -using System.Text; using Microsoft.Quantum.Simulation.Core; using System.Diagnostics; -using System.Linq; namespace Microsoft.Quantum.Simulation.Common { diff --git a/src/Simulation/Simulators/QuantumSimulator/StateDumper.cs b/src/Simulation/Simulators/QuantumSimulator/StateDumper.cs index 9198616d9cd..1faa7bda1a5 100644 --- a/src/Simulation/Simulators/QuantumSimulator/StateDumper.cs +++ b/src/Simulation/Simulators/QuantumSimulator/StateDumper.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/T.cs b/src/Simulation/Simulators/QuantumSimulator/T.cs index c95dde4528d..8e8e5d364a1 100644 --- a/src/Simulation/Simulators/QuantumSimulator/T.cs +++ b/src/Simulation/Simulators/QuantumSimulator/T.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/X.cs b/src/Simulation/Simulators/QuantumSimulator/X.cs index c01f5b65535..3ea6d275b5e 100644 --- a/src/Simulation/Simulators/QuantumSimulator/X.cs +++ b/src/Simulation/Simulators/QuantumSimulator/X.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Y.cs b/src/Simulation/Simulators/QuantumSimulator/Y.cs index 42fda7e38e7..4469dd356ea 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Y.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Y.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/Simulators/QuantumSimulator/Z.cs b/src/Simulation/Simulators/QuantumSimulator/Z.cs index ef8a174c2a6..efe41238a64 100644 --- a/src/Simulation/Simulators/QuantumSimulator/Z.cs +++ b/src/Simulation/Simulators/QuantumSimulator/Z.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Runtime.InteropServices; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledX.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledX.qs deleted file mode 100644 index 4bf60fd83dd..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledX.qs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the controlled-X (or CNOT) gate to a pair of qubits. Note that the Controlled - /// functor is not supported. - /// - /// # Description - /// \begin{align} - /// \operatorname{CNOT} \mathrel{:=} - /// \begin{bmatrix} - /// 1 & 0 & 0 & 0 \\\\ - /// 0 & 1 & 0 & 0 \\\\ - /// 0 & 0 & 0 & 1 \\\\ - /// 0 & 0 & 1 & 0 - /// \end{bmatrix}, - /// \end{align} - /// - /// where rows and columns are ordered as in the quantum concepts guide. - /// - /// # Input - /// ## control - /// Control qubit for the CNOT gate. - /// ## target - /// Target qubit for the CNOT gate. - /// - /// # Remarks - /// Equivalent to: - /// ```qsharp - /// CNOT(control, target); - /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyControlledX") - internal operation ApplyControlledX (control : Qubit, target : Qubit) : Unit is Adj { - CNOT(control, target); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledZ.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledZ.qs deleted file mode 100644 index 70cb2a6d068..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyControlledZ.qs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the controlled-Z (CZ) gate to a pair of qubits. Note that the Controlled - /// functor is not supported. - /// - /// $$ - /// \begin{align} - /// 1 & 0 & 0 & 0 \\\\ - /// 0 & 1 & 0 & 0 \\\\ - /// 0 & 0 & 1 & 0 \\\\ - /// 0 & 0 & 0 & -1 - /// \end{align}, - /// $$ - /// where rows and columns are organized as in the quantum concepts guide. - /// - /// # Input - /// ## control - /// Control qubit for the CZ gate. - /// ## target - /// Target qubit for the CZ gate. - /// - /// # Remarks - /// Equivalent to: - /// ```qsharp - /// Controlled Z([control], target); - /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyControlledZ") - internal operation ApplyControlledZ (control : Qubit, target : Qubit) : Unit is Adj { - Controlled Z([control], target); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledH.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledH.qs deleted file mode 100644 index 74a4e5f61fa..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledH.qs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the Hadamard transformation to a single qubit. Note that the Controlled - /// functor is not supported. - /// - /// # Description - /// \begin{align} - /// H \mathrel{:=} - /// \frac{1}{\sqrt{2}} - /// \begin{bmatrix} - /// 1 & 1 \\\\ - /// 1 & -1 - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledH") - internal operation ApplyUncontrolledH (qubit : Qubit) : Unit is Adj { - H(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRx.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRx.qs deleted file mode 100644 index 8db8b3733a1..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRx.qs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies a rotation about the $x$-axis by a given angle. Note that the Controlled - /// functor is not supported. - /// - /// # Description - /// \begin{align} - /// R_x(\theta) \mathrel{:=} - /// e^{-i \theta \sigma_x / 2} = - /// \begin{bmatrix} - /// \cos \frac{\theta}{2} & -i\sin \frac{\theta}{2} \\\\ - /// -i\sin \frac{\theta}{2} & \cos \frac{\theta}{2} - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// Angle about which the qubit is to be rotated. - /// ## qubit - /// Qubit to which the gate should be applied. - /// - /// # Remarks - /// Equivalent to: - /// ```qsharp - /// R(PauliX, theta, qubit); - /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRx") - internal operation ApplyUncontrolledRx (theta : Double, qubit : Qubit) : Unit is Adj { - Rx(theta, qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRy.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRy.qs deleted file mode 100644 index bd72cde1e7e..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRy.qs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies a rotation about the $y$-axis by a given angle. Note that the Controlled - /// functor is not supported. - /// - /// # Description - /// \begin{align} - /// R_y(\theta) \mathrel{:=} - /// e^{-i \theta \sigma_y / 2} = - /// \begin{bmatrix} - /// \cos \frac{\theta}{2} & -\sin \frac{\theta}{2} \\\\ - /// \sin \frac{\theta}{2} & \cos \frac{\theta}{2} - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// Angle about which the qubit is to be rotated. - /// ## qubit - /// Qubit to which the gate should be applied. - /// - /// # Remarks - /// Equivalent to: - /// ```qsharp - /// R(PauliY, theta, qubit); - /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRy") - internal operation ApplyUncontrolledRy (theta : Double, qubit : Qubit) : Unit is Adj { - Ry(theta, qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRz.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRz.qs deleted file mode 100644 index 5c864aae74f..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledRz.qs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies a rotation about the $z$-axis by a given angle. Note that the Controlled - /// functor is not supported. - /// - /// # Description - /// \begin{align} - /// R_z(\theta) \mathrel{:=} - /// e^{-i \theta \sigma_z / 2} = - /// \begin{bmatrix} - /// e^{-i \theta / 2} & 0 \\\\ - /// 0 & e^{i \theta / 2} - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// Angle about which the qubit is to be rotated. - /// ## qubit - /// Qubit to which the gate should be applied. - /// - /// # Remarks - /// Equivalent to: - /// ```qsharp - /// R(PauliZ, theta, qubit); - /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRz") - internal operation ApplyUncontrolledRz (theta : Double, qubit : Qubit) : Unit is Adj { - Rz(theta, qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledS.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledS.qs deleted file mode 100644 index 1b64c5e7839..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledS.qs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the π/4 phase gate to a single qubit. Note that the Controlled functor - /// is not supported. - /// - /// # Description - /// \begin{align} - /// S \mathrel{:=} - /// \begin{bmatrix} - /// 1 & 0 \\\\ - /// 0 & i - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledS") - internal operation ApplyUncontrolledS (qubit : Qubit) : Unit is Adj { - S(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledT.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledT.qs deleted file mode 100644 index 60cf1ecd7b8..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledT.qs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the π/8 gate to a single qubit. Note that the Controlled functor is - /// not supported. - /// - /// # Description - /// \begin{align} - /// T \mathrel{:=} - /// \begin{bmatrix} - /// 1 & 0 \\\\ - /// 0 & e^{i \pi / 4} - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledT") - internal operation ApplyUncontrolledT (qubit : Qubit) : Unit is Adj { - T(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledX.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledX.qs deleted file mode 100644 index 08a566bc840..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledX.qs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the Pauli $X$ gate. Note that the Controlled functor is not supported. - /// - /// # Description - /// \begin{align} - /// \sigma_x \mathrel{:=} - /// \begin{bmatrix} - /// 0 & 1 \\\\ - /// 1 & 0 - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledX") - internal operation ApplyUncontrolledX (qubit : Qubit) : Unit is Adj { - X(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledY.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledY.qs deleted file mode 100644 index bee6d1fb7b3..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledY.qs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the Pauli $Y$ gate. Note that the Controlled functor is not supported. - /// - /// # Description - /// \begin{align} - /// \sigma_y \mathrel{:=} - /// \begin{bmatrix} - /// 0 & -i \\\\ - /// i & 0 - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledY") - internal operation ApplyUncontrolledY (qubit : Qubit) : Unit is Adj { - Y(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledZ.qs b/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledZ.qs deleted file mode 100644 index ffb10e7e364..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/ApplyUncontrolledZ.qs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the Pauli $Z$ gate. Note that the Controlled functor is not supported. - /// - /// # Description - /// \begin{align} - /// \sigma_z \mathrel{:=} - /// \begin{bmatrix} - /// 1 & 0 \\\\ - /// 0 & -1 - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## qubit - /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledZ") - internal operation ApplyUncontrolledZ (qubit : Qubit) : Unit is Adj { - Z(qubit); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualInPlace.qs b/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualInPlace.qs index 427e3c50451..b6db789bc43 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualInPlace.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualInPlace.qs @@ -12,7 +12,7 @@ namespace Microsoft.Quantum.Diagnostics { internal operation IterateThroughCartesianPower (length : Int, value : Int, op : (Int[] => Unit)) : Unit { mutable bounds = new Int[length]; - for (i in 0 .. length - 1) + for i in 0 .. length - 1 { set bounds = bounds w/ i <- value; } @@ -33,7 +33,7 @@ namespace Microsoft.Quantum.Diagnostics { //computes the next element in the Cartesian product set arr = arr w/ 0 <- arr[0] + 1; - for (i in 0 .. Length(arr) - 2) + for i in 0 .. Length(arr) - 2 { if (arr[i] == bounds[i]) { @@ -73,7 +73,7 @@ namespace Microsoft.Quantum.Diagnostics { fail "qubits and stateIds must have the same length"; } - for (i in 0 .. Length(qubits) - 1) + for i in 0 .. Length(qubits) - 1 { let id = basis[i]; let qubit = qubits[i]; @@ -120,7 +120,7 @@ namespace Microsoft.Quantum.Diagnostics { internal operation AssertEqualOnBasisVector (basis : Int[], givenU : (Qubit[] => Unit), expectedU : (Qubit[] => Unit is Adj)) : Unit { let tolerance = 1e-5; - using (qubits = Qubit[Length(basis)]) { + use qubits = Qubit[Length(basis)] { AssertAllZeroWithinTolerance(qubits, tolerance); FlipToBasis(basis, qubits); givenU(qubits); diff --git a/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualReferenced.qs b/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualReferenced.qs index eed629789a1..8766380257a 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualReferenced.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/AssertOperationsEqualReferenced.qs @@ -20,7 +20,7 @@ namespace Microsoft.Quantum.Diagnostics { internal operation PrepareEntangledState (left : Qubit[], right : Qubit[]) : Unit is Adj + Ctl { - for (idxQubit in 0 .. Length(left) - 1) + for idxQubit in 0 .. Length(left) - 1 { H(left[idxQubit]); Controlled X([left[idxQubit]], right[idxQubit]); @@ -55,7 +55,7 @@ namespace Microsoft.Quantum.Diagnostics { /// Operation defining the expected behavior for the operation under test. operation AssertOperationsEqualReferenced (nQubits : Int, actual : (Qubit[] => Unit), expected : (Qubit[] => Unit is Adj)) : Unit { // Prepare a reference register entangled with the target register. - using ((reference, target) = (Qubit[nQubits], Qubit[nQubits])) { + use (reference, target) = (Qubit[nQubits], Qubit[nQubits]) { PrepareEntangledState(reference, target); actual(target); Adjoint expected(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/CCNOT.qs b/src/Simulation/TargetDefinitions/Decompositions/CCNOT.qs index 99772e845a0..e845e6cc422 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/CCNOT.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/CCNOT.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the doubly controlled–NOT (CCNOT) gate to three qubits. @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Controlled X([control1, control2], target); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.CCNOT") operation CCNOT (control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj + Ctl { body (...) { Controlled X([control1, control2], target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/CCNOTFromCCZ.qs b/src/Simulation/TargetDefinitions/Decompositions/CCNOTFromCCZ.qs index 5b1601c799b..fcc55c6aaa6 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/CCNOTFromCCZ.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/CCNOTFromCCZ.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the doubly controlled–NOT (CCNOT) gate to three qubits. @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Controlled X([control1, control2], target); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.CCNOT") operation CCNOT (control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj + Ctl { body (...) { // [Page 15 of arXiv:1206.0758v3](https://arxiv.org/pdf/1206.0758v3.pdf#page=15) diff --git a/src/Simulation/TargetDefinitions/Decompositions/CNOT.qs b/src/Simulation/TargetDefinitions/Decompositions/CNOT.qs index 7817f4fd480..ead30a51ac0 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/CNOT.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/CNOT.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the controlled-NOT (CNOT) gate to a pair of qubits. @@ -31,7 +30,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Controlled X([control], target); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.CNOT") operation CNOT (control : Qubit, target : Qubit) : Unit is Adj + Ctl { body (...) { Controlled X([control], target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/ExpFrac.qs b/src/Simulation/TargetDefinitions/Decompositions/ExpFrac.qs index 5a0bdeeb3f1..e891e67c7f3 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ExpFrac.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ExpFrac.qs @@ -4,7 +4,6 @@ namespace Microsoft.Quantum.Intrinsic { open Microsoft.Quantum.Math; open Microsoft.Quantum.Convert; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the exponential of a multi-qubit Pauli operator @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// the qubit register is to be rotated. /// ## qubits /// Register to apply the given rotation to. - @EnableTestingViaName("Test.TargetDefinitions.ExpFrac") operation ExpFrac (paulis : Pauli[], numerator : Int, power : Int, qubits : Qubit[]) : Unit is Adj + Ctl { // Note that power must be converted to a double and used with 2.0 instead of 2 to allow for // negative exponents that result in a fractional denominator. diff --git a/src/Simulation/TargetDefinitions/Decompositions/ExpFracFromExpUtil.qs b/src/Simulation/TargetDefinitions/Decompositions/ExpFracFromExpUtil.qs index 226630ffb79..10f986aac12 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ExpFracFromExpUtil.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ExpFracFromExpUtil.qs @@ -4,7 +4,6 @@ namespace Microsoft.Quantum.Intrinsic { open Microsoft.Quantum.Math; open Microsoft.Quantum.Convert; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the exponential of a multi-qubit Pauli operator @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// the qubit register is to be rotated. /// ## qubits /// Register to apply the given rotation to. - @EnableTestingViaName("Test.TargetDefinitions.ExpFrac") operation ExpFrac (paulis : Pauli[], numerator : Int, power : Int, qubits : Qubit[]) : Unit is Adj + Ctl { body (...) { if (Length(paulis) != Length(qubits)) { fail "Arrays 'pauli' and 'target' must have the same length"; } diff --git a/src/Simulation/TargetDefinitions/Decompositions/ExpFromExpUtil.qs b/src/Simulation/TargetDefinitions/Decompositions/ExpFromExpUtil.qs index 6bd54f9a036..74118c24c5d 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ExpFromExpUtil.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ExpFromExpUtil.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the exponential of a multi-qubit Pauli operator. @@ -23,7 +22,6 @@ namespace Microsoft.Quantum.Intrinsic { /// target register is to be rotated. /// ## qubits /// Register to apply the given rotation to. - @EnableTestingViaName("Test.TargetDefinitions.Exp") operation Exp (paulis : Pauli[], theta : Double, qubits : Qubit[]) : Unit is Adj + Ctl { body (...) { if (Length(paulis) != Length(qubits)) { fail "Arrays 'pauli' and 'qubits' must have the same length"; } diff --git a/src/Simulation/TargetDefinitions/Decompositions/ExpUtil.qs b/src/Simulation/TargetDefinitions/Decompositions/ExpUtil.qs index 5131ac27048..2b25fdb2ea4 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ExpUtil.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ExpUtil.qs @@ -2,9 +2,7 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - @EnableTestingViaName("Test.TargetDefinitions.ExpUtil") internal operation ExpUtil (paulis : Pauli[], theta : Double, qubits : Qubit[], rotation : ((Pauli, Qubit) => Unit is Adj + Ctl)) : Unit is Ctl { if (Length(paulis) != Length(qubits)) { fail "Arrays 'paulis' and 'qubits' must have the same length"; } if (Length(paulis) == 1) { @@ -12,7 +10,7 @@ namespace Microsoft.Quantum.Intrinsic { } else { // Length(paulis) > 1 within { - for (i in 0 .. Length(paulis) - 1) { + for i in 0 .. Length(paulis) - 1 { MapPauli(qubits[i], PauliZ, paulis[i]); } } diff --git a/src/Simulation/TargetDefinitions/Decompositions/ExpUtilFromIsing.qs b/src/Simulation/TargetDefinitions/Decompositions/ExpUtilFromIsing.qs index b1bbc9d0dc4..ebc50d9aca4 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ExpUtilFromIsing.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ExpUtilFromIsing.qs @@ -2,9 +2,7 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - @EnableTestingViaName("Test.TargetDefinitions.ExpUtil") internal operation ExpUtil (paulis : Pauli[], theta : Double, qubits : Qubit[], rotation : ((Pauli, Qubit) => Unit is Adj + Ctl)) : Unit is Ctl { if (Length(paulis) != Length(qubits)) { fail "Arrays 'paulis' and 'qubits' must have the same length"; } if (Length(paulis) == 1) { @@ -28,7 +26,7 @@ namespace Microsoft.Quantum.Intrinsic { } else { // Length(paulis) > 2 within { - for (i in 0 .. Length(paulis) - 1) { + for i in 0 .. Length(paulis) - 1 { MapPauli(qubits[i], PauliZ, paulis[i]); } } diff --git a/src/Simulation/TargetDefinitions/Decompositions/HFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/HFromSinglyControlled.qs index ff638cc18d9..f1c18932cc9 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/HFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/HFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Hadamard transformation to a single qubit. @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.H") operation H (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledH(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/I.qs b/src/Simulation/TargetDefinitions/Decompositions/I.qs index 39ddebc3797..debdfc92c68 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/I.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/I.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs the identity operation (no-op) on a single qubit. @@ -10,7 +9,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Remarks /// This is a no-op. It is provided for completeness and because /// sometimes it is useful to call the identity in an algorithm or to pass it as a parameter. - @EnableTestingViaName("Test.TargetDefinitions.I") operation I (target : Qubit) : Unit is Adj + Ctl { body (...) { } adjoint self; diff --git a/src/Simulation/TargetDefinitions/Decompositions/IsingXX.qs b/src/Simulation/TargetDefinitions/Decompositions/IsingXX.qs deleted file mode 100644 index 2c4b93c4ad1..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/IsingXX.qs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the two qubit Ising $XX$ rotation gate. - /// - /// # Description - /// \begin{align} - /// XX(\theta) \mathrel{:=} - /// \begin{bmatrix} - /// \cos \theta & 0 & 0 & -i\sin \theta \\\\ - /// 0 & \cos \theta & -i\sin \theta & 0 \\\\ - /// 0 & -i\sin \theta & \cos \theta & 0 \\\\ - /// -i\sin \theta & 0 & 0 & \cos \theta - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// The angle about which the qubits are rotated. - /// ## qubit0 - /// The first qubit input to the gate. - /// ## qubit1 - /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingXX") - internal operation IsingXX (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { - Exp([PauliX, PauliX], theta * 2.0, [qubit0, qubit1]); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/IsingYY.qs b/src/Simulation/TargetDefinitions/Decompositions/IsingYY.qs deleted file mode 100644 index 51d3a76c929..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/IsingYY.qs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the two qubit Ising $YY$ rotation gate. - /// - /// # Description - /// \begin{align} - /// YY(\theta) \mathrel{:=} - /// \begin{bmatrix} - /// \cos \theta & 0 & 0 & i\sin \theta \\\\ - /// 0 & \cos \theta & -i\sin \theta & 0 \\\\ - /// 0 & -i\sin \theta & \cos \theta & 0 \\\\ - /// i\sin \theta & 0 & 0 & \cos \theta - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// The angle about which the qubits are rotated. - /// ## qubit0 - /// The first qubit input to the gate. - /// ## qubit1 - /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingYY") - internal operation IsingYY (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { - Exp([PauliY, PauliY], theta * 2.0, [qubit0, qubit1]); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/IsingZZ.qs b/src/Simulation/TargetDefinitions/Decompositions/IsingZZ.qs deleted file mode 100644 index 16649bcffd6..00000000000 --- a/src/Simulation/TargetDefinitions/Decompositions/IsingZZ.qs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - - /// # Summary - /// Applies the two qubit Ising $ZZ$ rotation gate. - /// - /// # Description - /// \begin{align} - /// ZZ(\theta) \mathrel{:=} - /// \begin{bmatrix} - /// e^{-i \theta / 2} & 0 & 0 & 0 \\\\ - /// 0 & e^{-i \theta / 2} & 0 & 0 \\\\ - /// 0 & 0 & e^{-i \theta / 2} & 0 \\\\ - /// 0 & 0 & 0 & e^{i \theta / 2} - /// \end{bmatrix}. - /// \end{align} - /// - /// # Input - /// ## theta - /// The angle about which the qubits are rotated. - /// ## qubit0 - /// The first qubit input to the gate. - /// ## qubit1 - /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingZZ") - internal operation IsingZZ (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { - Exp([PauliZ, PauliZ], theta * 2.0, [qubit0, qubit1]); - } -} \ No newline at end of file diff --git a/src/Simulation/TargetDefinitions/Decompositions/M.qs b/src/Simulation/TargetDefinitions/Decompositions/M.qs index a8fb33939a2..77f43700d34 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/M.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/M.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs a measurement of a single qubit in the @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Measure([PauliZ], [qubit]); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.M") operation M (qubit : Qubit) : Result { return Measure([PauliZ], [qubit]); } diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetX.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetX.qs index 183fbbfd0e3..13a09519900 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetX.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetX.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; open Microsoft.Quantum.Targeting; /// # Summary @@ -26,7 +25,6 @@ namespace Microsoft.Quantum.Measurement { "BasicQuantumFunctionality", "MResetX is replaced by a supported implementation on all execution targets." ) - @EnableTestingViaName("Test.TargetDefinitions.MResetX") operation MResetX (target : Qubit) : Result { let result = Measure([PauliX], [target]); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetXExplicit.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetXExplicit.qs index d853dc9e8e5..0254cd0fc6e 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetXExplicit.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetXExplicit.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the X basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $X$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetX") operation MResetX (target : Qubit) : Result { MapPauli(target, PauliZ, PauliX); let result = M(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetXWithNoReuse.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetXWithNoReuse.qs index 0db2613018d..b83ed66273b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetXWithNoReuse.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetXWithNoReuse.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the X basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $X$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetX") operation MResetX (target : Qubit) : Result { // Because the qubit cannot be reused after measurement, no actual // reset is required. diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetY.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetY.qs index 290b1fb8352..80beea433fb 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetY.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetY.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; open Microsoft.Quantum.Targeting; /// # Summary @@ -26,7 +25,6 @@ namespace Microsoft.Quantum.Measurement { "BasicQuantumFunctionality", "MResetY is replaced by a supported implementation on all execution targets." ) - @EnableTestingViaName("Test.TargetDefinitions.MResetY") operation MResetY (target : Qubit) : Result { let result = Measure([PauliY], [target]); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetYExplicit.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetYExplicit.qs index 1bb586cfb8e..940b959b726 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetYExplicit.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetYExplicit.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the Y basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $Y$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetY") operation MResetY (target : Qubit) : Result { MapPauli(target, PauliZ, PauliY); let result = M(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs index a2337edb403..20a68832277 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the Y basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $Y$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetY") operation MResetY (target : Qubit) : Result { // Because the qubit cannot be reused after measurement, no actual // reset is required. diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetZ.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetZ.qs index 8bb4a8849ec..34db679ded6 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetZ.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetZ.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; open Microsoft.Quantum.Targeting; /// # Summary @@ -26,7 +25,6 @@ namespace Microsoft.Quantum.Measurement { "BasicQuantumFunctionality", "MResetZ is replaced by a supported implementation on all execution targets." ) - @EnableTestingViaName("Test.TargetDefinitions.MResetZ") operation MResetZ (target : Qubit) : Result { let result = M(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetZExplicit.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetZExplicit.qs index 53dac30786f..00fafd690db 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetZExplicit.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetZExplicit.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the Z basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $Z$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetZ") operation MResetZ (target : Qubit) : Result { let result = M(target); Reset(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/MResetZWithNoReuse.qs b/src/Simulation/TargetDefinitions/Decompositions/MResetZWithNoReuse.qs index a18daeb426b..2f0b3a56e24 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MResetZWithNoReuse.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MResetZWithNoReuse.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Measures a single qubit in the Z basis, @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Measurement { /// /// # Output /// The result of measuring `target` in the Pauli $Z$ basis. - @EnableTestingViaName("Test.TargetDefinitions.MResetZ") operation MResetZ (target : Qubit) : Result { // Because the qubit cannot be reused after measurement, no actual // reset is required. diff --git a/src/Simulation/TargetDefinitions/Decompositions/Measure.qs b/src/Simulation/TargetDefinitions/Decompositions/Measure.qs index 06f83119c47..bee6db6510b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Measure.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Measure.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs a joint measurement of one or more qubits in the @@ -39,7 +38,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Remarks /// If the basis array and qubit array are different lengths, then the /// operation will fail. - @EnableTestingViaName("Test.TargetDefinitions.Measure") operation Measure (bases : Pauli[], qubits : Qubit[]) : Result { if (Length(bases) != Length(qubits)) { fail "Arrays 'bases' and 'qubits' must be of the same length."; } mutable res = One; @@ -53,9 +51,9 @@ namespace Microsoft.Quantum.Intrinsic { } } else { - using( q = Qubit() ) { + use q = Qubit() { H(q); - for( k in 0 .. Length(bases) - 1 ) { + for k in 0 .. Length(bases) - 1 { if( bases[k] == PauliX ) { Controlled X ([qubits[k]], q); } if( bases[k] == PauliZ ) { Controlled Z ([qubits[k]], q); } if( bases[k] == PauliY ) { Controlled Y ([qubits[k]], q); } diff --git a/src/Simulation/TargetDefinitions/Decompositions/MeasureWithNoReuse.qs b/src/Simulation/TargetDefinitions/Decompositions/MeasureWithNoReuse.qs index 1bac07a8550..19d2f6c1c53 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/MeasureWithNoReuse.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/MeasureWithNoReuse.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs a joint measurement of one or more qubits in the @@ -39,7 +38,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Remarks /// If the basis array and qubit array are different lengths, then the /// operation will fail. - @EnableTestingViaName("Test.TargetDefinitions.Measure") operation Measure (bases : Pauli[], qubits : Qubit[]) : Result { if (Length(bases) != Length(qubits)) { fail "Arrays 'bases' and 'qubits' must be of the same length."; } if (Length(bases) == 1) { @@ -49,12 +47,12 @@ namespace Microsoft.Quantum.Intrinsic { return M(qubits[0]); } else { - using (q = Qubit()) { + use q = Qubit() { within { H(q); } apply { - for (k in 0 .. Length(bases) - 1) { + for k in 0 .. Length(bases) - 1 { if (bases[k] == PauliX) { Controlled X([qubits[k]], q); } if (bases[k] == PauliZ) { Controlled Z([qubits[k]], q); } if (bases[k] == PauliY) { Controlled Y([qubits[k]], q); } diff --git a/src/Simulation/TargetDefinitions/Decompositions/PreparePostM.qs b/src/Simulation/TargetDefinitions/Decompositions/PreparePostM.qs index 680d9d74faf..bfdd2c314b1 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/PreparePostM.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/PreparePostM.qs @@ -2,9 +2,7 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - @EnableTestingViaName("Test.TargetDefinitions.PreparePostM") internal operation PreparePostM(result : Result, qubit : Qubit) : Unit { // This platform requires reset after measurement, and then must // re-prepare the measured state in the qubit. diff --git a/src/Simulation/TargetDefinitions/Decompositions/PreparePostMNoop.qs b/src/Simulation/TargetDefinitions/Decompositions/PreparePostMNoop.qs index fb5dc304282..dfd4afd5cc1 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/PreparePostMNoop.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/PreparePostMNoop.qs @@ -2,9 +2,7 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - @EnableTestingViaName("Test.TargetDefinitions.PreparePostM") internal operation PreparePostM(result : Result, qubit : Qubit) : Unit { // This platform does not require any post-measurement reset, so // no additional work is needed. diff --git a/src/Simulation/TargetDefinitions/Decompositions/R.qs b/src/Simulation/TargetDefinitions/Decompositions/R.qs index bd3f376d6d4..6a8572b92d2 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/R.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/R.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the given Pauli axis. @@ -26,7 +25,6 @@ namespace Microsoft.Quantum.Intrinsic { /// When called with `pauli = PauliI`, this operation applies /// a *global phase*. This phase can be significant /// when used with the `Controlled` functor. - @EnableTestingViaName("Test.TargetDefinitions.R") operation R (pauli : Pauli, theta : Double, qubit : Qubit) : Unit is Adj + Ctl { if (pauli == PauliX) { Rx(theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/R1.qs b/src/Simulation/TargetDefinitions/Decompositions/R1.qs index 02ed51439bd..87c88d9f4dc 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/R1.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/R1.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $\ket{1}$ state by a given angle. @@ -25,7 +24,6 @@ namespace Microsoft.Quantum.Intrinsic { /// R(PauliZ, theta, qubit); /// R(PauliI, -theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.R1") operation R1 (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { R(PauliZ, theta, qubit); R(PauliI, -theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/R1Frac.qs b/src/Simulation/TargetDefinitions/Decompositions/R1Frac.qs index 056e0ba9e54..8cd29fb0fba 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/R1Frac.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/R1Frac.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $\ket{1}$ state by an angle specified @@ -35,7 +34,6 @@ namespace Microsoft.Quantum.Intrinsic { /// RFrac(PauliZ, -numerator, denominator + 1, qubit); /// RFrac(PauliI, numerator, denominator + 1, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.R1Frac") operation R1Frac (numerator : Int, power : Int, qubit : Qubit) : Unit is Adj + Ctl { RFrac(PauliZ, -numerator, power + 1, qubit); RFrac(PauliI, numerator, power + 1, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/RFrac.qs b/src/Simulation/TargetDefinitions/Decompositions/RFrac.qs index 2c1e1b7be37..e99a14bf512 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/RFrac.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/RFrac.qs @@ -4,7 +4,6 @@ namespace Microsoft.Quantum.Intrinsic { open Microsoft.Quantum.Math; open Microsoft.Quantum.Convert; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the given Pauli axis by an angle specified @@ -39,7 +38,6 @@ namespace Microsoft.Quantum.Intrinsic { /// // PI() is a Q# function that returns an approximation of π. /// R(pauli, -PI() * IntAsDouble(numerator) / IntAsDouble(2 ^ (power - 1)), qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.RFrac") operation RFrac (pauli : Pauli, numerator : Int, power : Int, qubit : Qubit) : Unit is Adj + Ctl { // Note that power must be converted to a double and used with 2.0 instead of 2 to allow for // negative exponents that result in a fractional denominator. diff --git a/src/Simulation/TargetDefinitions/Decompositions/Reset.qs b/src/Simulation/TargetDefinitions/Decompositions/Reset.qs index 651ba46e2fa..b6a06a5761b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Reset.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Reset.qs @@ -16,7 +16,6 @@ namespace Microsoft.Quantum.Intrinsic { "BasicQuantumFunctionality", "Reset is replaced by a supported implementation on all execution targets." ) - @EnableTestingViaName("Test.TargetDefinitions.Reset") operation Reset (qubit : Qubit) : Unit { if (M(qubit) == One) { X(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/ResetAll.qs b/src/Simulation/TargetDefinitions/Decompositions/ResetAll.qs index 6a520c85bb7..9daa8d3c1d5 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ResetAll.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ResetAll.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Given an array of qubits, measure them and ensure they are in the |0⟩ state @@ -11,9 +10,8 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubits /// An array of qubits whose states are to be reset to $\ket{0}$. - @EnableTestingViaName("Test.TargetDefinitions.ResetAll") operation ResetAll (qubits : Qubit[]) : Unit { - for (qubit in qubits) { + for qubit in qubits { Reset(qubit); } } diff --git a/src/Simulation/TargetDefinitions/Decompositions/ResetWithoutReuse.qs b/src/Simulation/TargetDefinitions/Decompositions/ResetWithoutReuse.qs index ef28b037cf2..f301194b99b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ResetWithoutReuse.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ResetWithoutReuse.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Given a single qubit, measures it and ensures it is in the |0⟩ state @@ -11,7 +10,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// The qubit whose state is to be reset to $\ket{0}$. - @EnableTestingViaName("Test.TargetDefinitions.Reset") operation Reset (qubit : Qubit) : Unit { // This platform doesn't support use of a qubit after measurement, so // `Reset` is really just marking the qubit as measured. diff --git a/src/Simulation/TargetDefinitions/Decompositions/Rx.qs b/src/Simulation/TargetDefinitions/Decompositions/Rx.qs index e7cf9c8be1c..7c13b9d3715 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Rx.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Rx.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $x$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliX, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rx") operation Rx (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { R(PauliX, theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/RxFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/RxFromSinglyControlled.qs index e964eb00297..bcf07a180dd 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/RxFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/RxFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # SummaRx /// Applies a rotation about the $x$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliX, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rx") operation Rx (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledRx(theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/Ry.qs b/src/Simulation/TargetDefinitions/Decompositions/Ry.qs index ac1cb18dcfa..06c3c0bfa92 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Ry.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Ry.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $y$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliY, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Ry") operation Ry (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { R(PauliY, theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/RyFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/RyFromSinglyControlled.qs index 5b6d46032b0..93b0f404e12 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/RyFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/RyFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $y$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliY, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Ry") operation Ry (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledRy(theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/Rz.qs b/src/Simulation/TargetDefinitions/Decompositions/Rz.qs index 08d0e2b239b..8aadfb3859b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Rz.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Rz.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $z$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliZ, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rz") operation Rz (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { R(PauliZ, theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/RzFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/RzFromSinglyControlled.qs index 09bfa6aec51..f8901ea1d6b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/RzFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/RzFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $z$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliZ, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rz") operation Rz (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledRz(theta, qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/SFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/SFromSinglyControlled.qs index 09655566e04..a3522892acf 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/SFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/SFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the π/4 phase gate to a single qubit. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.S") operation S (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledS(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/SWAP.qs b/src/Simulation/TargetDefinitions/Decompositions/SWAP.qs index 5b987ea6b74..ee2c95aae1b 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/SWAP.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/SWAP.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the SWAP gate to a pair of qubits. @@ -33,7 +32,6 @@ namespace Microsoft.Quantum.Intrinsic { /// CNOT(qubit2, qubit1); /// CNOT(qubit1, qubit2); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.SWAP") operation SWAP (qubit1 : Qubit, qubit2 : Qubit) : Unit is Adj + Ctl { body (...) { within { diff --git a/src/Simulation/TargetDefinitions/Decompositions/SWAPFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/SWAPFromSinglyControlled.qs index 90eaf3fba0a..3beb32ccbd7 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/SWAPFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/SWAPFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the SWAP gate to a pair of qubits. @@ -33,7 +32,6 @@ namespace Microsoft.Quantum.Intrinsic { /// CNOT(qubit2, qubit1); /// CNOT(qubit1, qubit2); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.SWAP") operation SWAP (qubit1 : Qubit, qubit2 : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledSWAP(qubit1, qubit2); diff --git a/src/Simulation/TargetDefinitions/Decompositions/SetToBasisState.qs b/src/Simulation/TargetDefinitions/Decompositions/SetToBasisState.qs index 740925d833c..ff7ec846edf 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/SetToBasisState.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/SetToBasisState.qs @@ -3,7 +3,6 @@ namespace Microsoft.Quantum.Measurement { open Microsoft.Quantum.Intrinsic; - open Microsoft.Quantum.Diagnostics; /// # Summary /// Sets a qubit to a given computational basis state by measuring the @@ -18,7 +17,6 @@ namespace Microsoft.Quantum.Measurement { /// # Remarks /// As an invariant of this operation, calling `M(q)` immediately /// after `SetToBasisState(result, q)` will return `result`. - @EnableTestingViaName("Test.TargetDefinitions.SetToBasisState") operation SetToBasisState(desired : Result, target : Qubit) : Unit { if (desired != M(target)) { X(target); diff --git a/src/Simulation/TargetDefinitions/Decompositions/TFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/TFromSinglyControlled.qs index 222ef97d9e1..e327305d5ae 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/TFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/TFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the π/8 gate to a single qubit. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.T") operation T (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledT(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/Utils.qs b/src/Simulation/TargetDefinitions/Decompositions/Utils.qs index d2808323a0d..32c31472a42 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/Utils.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/Utils.qs @@ -2,9 +2,7 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; - @EnableTestingViaName("Test.TargetDefinitions.SpreadZ") internal operation SpreadZ (from : Qubit, to : Qubit[]) : Unit is Adj { if (Length(to) > 0) { CNOT(to[0], from); @@ -16,7 +14,6 @@ namespace Microsoft.Quantum.Intrinsic { } } - @EnableTestingViaName("Test.TargetDefinitions.ApplyGlobalPhase") internal operation ApplyGlobalPhase (theta : Double) : Unit is Ctl + Adj { body (...) {} controlled (controls, (...)) { @@ -30,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { } } - @EnableTestingViaName("Test.TargetDefinitions.ApplyGlobalPhaseFracWithR1Frac") internal operation ApplyGlobalPhaseFracWithR1Frac (numerator : Int, power : Int) : Unit is Adj + Ctl { body (...) {} controlled (ctrls, ...) { @@ -43,7 +39,6 @@ namespace Microsoft.Quantum.Intrinsic { } } - @EnableTestingViaName("Test.TargetDefinitions.MapPauli") internal operation MapPauli (qubit : Qubit, from : Pauli, to : Pauli) : Unit is Adj { if (from == to) { } @@ -73,13 +68,12 @@ namespace Microsoft.Quantum.Intrinsic { /// Given a multiply-controlled operation that requires k controls /// applies it using ceiling(k/2) controls and using floor(k/2) temporary qubits - @EnableTestingViaName("Test.TargetDefinitions.ApplyWithLessControlsA") internal operation ApplyWithLessControlsA<'T> (op : ((Qubit[],'T) => Unit is Adj), (controls : Qubit[], arg : 'T)) : Unit is Adj { let numControls = Length(controls); let numControlPairs = numControls / 2; - using (temps = Qubit[numControlPairs]) { + use temps = Qubit[numControlPairs] { within { - for (numPair in 0 .. numControlPairs - 1) { // constant depth + for numPair in 0 .. numControlPairs - 1 { // constant depth PhaseCCX(controls[2*numPair], controls[2*numPair + 1], temps[numPair]); } } @@ -90,7 +84,6 @@ namespace Microsoft.Quantum.Intrinsic { } } - @EnableTestingViaName("Test.TargetDefinitions.PhaseCCX") internal operation PhaseCCX (control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj { // https://arxiv.org/pdf/1210.0974.pdf#page=2 H(target); @@ -106,7 +99,6 @@ namespace Microsoft.Quantum.Intrinsic { H(target); } - @EnableTestingViaName("Test.TargetDefinitions.ReducedDyadicFraction") internal function ReducedDyadicFraction (numerator : Int, denominatorPowerOfTwo : Int) : (Int, Int) { if (numerator == 0) { return (0,0); } mutable num = numerator; @@ -118,7 +110,6 @@ namespace Microsoft.Quantum.Intrinsic { return (num,denPow); } - @EnableTestingViaName("Test.TargetDefinitions.ReducedDyadicFractionPeriodic") internal function ReducedDyadicFractionPeriodic (numerator : Int, denominatorPowerOfTwo : Int) : (Int, Int) { let (k,n) = ReducedDyadicFraction(numerator,denominatorPowerOfTwo); // k is odd, or (k,n) are both 0 let period = 2*2^n; // \pi k / 2^n is 2\pi periodic, therefore k is 2 * 2^n periodic @@ -129,30 +120,28 @@ namespace Microsoft.Quantum.Intrinsic { // TODO(swernli): Consider removing this in favor of pulling Microsoft.Quantum.Arrays.Subarray // into the runtime. - @EnableTestingViaName("Test.TargetDefinitions.Subarray") internal function Subarray<'T> (indices : Int[], array : 'T[]) : 'T[] { let nSliced = Length(indices); mutable sliced = new 'T[nSliced]; - for (idx in 0 .. nSliced - 1) { + for idx in 0 .. nSliced - 1 { set sliced w/= idx <- array[indices[idx]]; } return sliced; } - @EnableTestingViaName("Test.TargetDefinitions.IndicesOfNonIdentity") internal function IndicesOfNonIdentity (paulies : Pauli[]) : Int[] { mutable nonIdPauliCount = 0; - for (i in 0 .. Length(paulies) - 1) { + for i in 0 .. Length(paulies) - 1 { if (paulies[i] != PauliI) { set nonIdPauliCount += 1; } } mutable indices = new Int[nonIdPauliCount]; mutable index = 0; - for (i in 0 .. Length(paulies) - 1) { + for i in 0 .. Length(paulies) - 1 { if (paulies[i] != PauliI) { set indices w/= index <- i; set index = index + 1; @@ -162,7 +151,6 @@ namespace Microsoft.Quantum.Intrinsic { return indices; } - @EnableTestingViaName("Test.TargetDefinitions.RemovePauliI") internal function RemovePauliI (paulis : Pauli[], qubits : Qubit[]) : (Pauli[], Qubit[]) { let indices = IndicesOfNonIdentity(paulis); let newPaulis = Subarray(indices, paulis); diff --git a/src/Simulation/TargetDefinitions/Decompositions/XFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/XFromSinglyControlled.qs index e33e1c88263..1441748ff54 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/XFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/XFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $X$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.X") operation X (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledX(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/YFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/YFromSinglyControlled.qs index 7636e127f22..71499ff03ac 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/YFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/YFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Y$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.Y") operation Y (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledY(qubit); diff --git a/src/Simulation/TargetDefinitions/Decompositions/ZFromSinglyControlled.qs b/src/Simulation/TargetDefinitions/Decompositions/ZFromSinglyControlled.qs index 146bfc5da6d..7072a4f17c9 100644 --- a/src/Simulation/TargetDefinitions/Decompositions/ZFromSinglyControlled.qs +++ b/src/Simulation/TargetDefinitions/Decompositions/ZFromSinglyControlled.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Z$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.Z") operation Z (qubit : Qubit) : Unit is Adj + Ctl { body (...) { ApplyUncontrolledZ(qubit); diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledX.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledX.cs index 180c37afce2..ff92c2b126a 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledX.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledX.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledZ.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledZ.cs index f1277c03508..82e30238f70 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledZ.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyControlledZ.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledH.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledH.cs index 6c3a3853527..9f731e3dec9 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledH.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledH.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRx.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRx.cs index df14696b85f..8812bda52bb 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRx.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRx.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRy.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRy.cs index c817abd4cd9..bc78be1cd1f 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRy.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRy.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRz.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRz.cs index 97bab6ea276..b4bc21b06ed 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRz.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledRz.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledS.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledS.cs index 2ffe2a2e9af..87c09f35a93 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledS.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledS.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledSWAP.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledSWAP.cs index e3e07a58db3..f39033606bd 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledSWAP.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledSWAP.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledT.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledT.cs index e06d80675a6..dd46b16a0e0 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledT.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledT.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledX.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledX.cs index 1f7163e9af1..829d2a860ba 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledX.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledX.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledY.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledY.cs index a280bbc4d5c..ad963c880c5 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledY.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledY.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledZ.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledZ.cs index ce04925ca51..a147edd306a 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledZ.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_ApplyUncontrolledZ.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Exp.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Exp.cs index f02267efb24..2161395ce4f 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Exp.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Exp.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_H.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_H.cs index a1cce04429e..94fa8055444 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_H.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_H.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingXX.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingXX.cs index 364d078bd31..57ad1f6e534 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingXX.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingXX.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingYY.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingYY.cs index 606161eafda..b6b44c917bc 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingYY.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingYY.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingZZ.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingZZ.cs index e53f81f828d..3d8121676e8 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingZZ.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_IsingZZ.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_M.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_M.cs index 6cce4c7c6a5..2b3dcef9785 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_M.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_M.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Measure.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Measure.cs index 09caaa5ac47..f463a2f4152 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Measure.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Measure.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_R.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_R.cs index d7853d09844..f9a1edb0286 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_R.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_R.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Reset.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Reset.cs index 7d9111327ad..9d173078257 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Reset.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Reset.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Rx.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Rx.cs index cad8505a864..8dc38c529eb 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Rx.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Rx.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Ry.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Ry.cs index c8cee96909b..151f2ab9f1a 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Ry.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Ry.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Rz.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Rz.cs index 716e68c6dec..3b4a950a765 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Rz.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Rz.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_S.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_S.cs index f26c0923d2a..e6b15312f36 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_S.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_S.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_T.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_T.cs index 1e665fc087f..76030a713e3 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_T.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_T.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_X.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_X.cs index 17d5aee37e3..8b2337e9baa 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_X.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_X.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Y.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Y.cs index 87fbef8300e..f77737c3816 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Y.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Y.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Interfaces/IGate_Z.cs b/src/Simulation/TargetDefinitions/Interfaces/IGate_Z.cs index 1264e6cd20a..d312415eb64 100644 --- a/src/Simulation/TargetDefinitions/Interfaces/IGate_Z.cs +++ b/src/Simulation/TargetDefinitions/Interfaces/IGate_Z.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Intrinsic.Interfaces diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledX.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledX.qs index 0c5417ada18..1fcc9b663f9 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledX.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledX.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the controlled-X (or CNOT) gate to a pair of qubits. Does not support @@ -32,7 +31,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// CNOT(control, target); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyControlledX") internal operation ApplyControlledX (control : Qubit, target : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledZ.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledZ.qs index c91154afdab..de997a2bd74 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledZ.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledZ.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the controlled-Z (CZ) gate to a pair of qubits. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Controlled Z([control], target); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyControlledZ") internal operation ApplyControlledZ (control : Qubit, target : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledH.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledH.qs index 8b0f82af9c2..dc282b001e3 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledH.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledH.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Hadamard transformation to a single qubit. Note that the Controlled @@ -21,7 +20,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledH") internal operation ApplyUncontrolledH (qubit : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRx.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRx.qs index af0e8fcac43..67ec399dc17 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRx.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRx.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $x$-axis by a given angle. Note that the Controlled @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliX, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRx") internal operation ApplyUncontrolledRx (theta : Double, qubit : Qubit) : Unit is Adj { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRy.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRy.qs index 4c63a72fffe..b01e95321d8 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRy.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRy.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $y$-axis by a given angle. Note that the Controlled @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliY, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRy") internal operation ApplyUncontrolledRy (theta : Double, qubit : Qubit) : Unit is Adj { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRz.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRz.qs index ffeb44ab440..4ae8e69c84c 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRz.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRz.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $z$-axis by a given angle. Note that the Controlled @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliZ, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledRz") internal operation ApplyUncontrolledRz (theta : Double, qubit : Qubit) : Unit is Adj { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledS.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledS.qs index f8fe46dd430..4314b1be9aa 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledS.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledS.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the π/4 phase gate to a single qubit. Note that the Controlled functor @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledS") internal operation ApplyUncontrolledS (qubit : Qubit) : Unit is Adj { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledSWAP.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledSWAP.qs index 0bce09f38d6..5131366d57f 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledSWAP.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledSWAP.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the SWAP gate to a pair of qubits. Note that the Controlled functor @@ -34,7 +33,6 @@ namespace Microsoft.Quantum.Intrinsic { /// CNOT(qubit2, qubit1); /// CNOT(qubit1, qubit2); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledSWAP") operation ApplyUncontrolledSWAP (qubit1 : Qubit, qubit2 : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledT.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledT.qs index 2fd4b11d41d..2a51a407196 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledT.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledT.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the π/8 gate to a single qubit. Note that the Controlled functor is @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledT") internal operation ApplyUncontrolledT (qubit : Qubit) : Unit is Adj { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledX.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledX.qs index 45a27d9a5f6..3ef07a1052b 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledX.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledX.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $X$ gate. Note that the Controlled functor is not supported. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledX") internal operation ApplyUncontrolledX (qubit : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledY.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledY.qs index 8e9a2fe20bb..4209b2d3b42 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledY.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledY.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Y$ gate. Note that the Controlled functor is not supported. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledY") internal operation ApplyUncontrolledY (qubit : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledZ.qs b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledZ.qs index 302252cf68e..eedc7a4b7ff 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledZ.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledZ.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Z$ gate. Note that the Controlled functor is not supported. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.ApplyUncontrolledZ") internal operation ApplyUncontrolledZ (qubit : Qubit) : Unit is Adj { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Exp.qs b/src/Simulation/TargetDefinitions/Intrinsic/Exp.qs index df58c4a3f3c..5283d126c34 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Exp.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Exp.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the exponential of a multi-qubit Pauli operator. @@ -23,7 +22,6 @@ namespace Microsoft.Quantum.Intrinsic { /// target register is to be rotated. /// ## qubits /// Register to apply the given rotation to. - @EnableTestingViaName("Test.TargetDefinitions.Exp") operation Exp (paulis : Pauli[], theta : Double, qubits : Qubit[]) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/H.qs b/src/Simulation/TargetDefinitions/Intrinsic/H.qs index 740796ddd0b..041926d8920 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/H.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/H.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Hadamard transformation to a single qubit. @@ -20,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.H") operation H (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/IsingXX.qs b/src/Simulation/TargetDefinitions/Intrinsic/IsingXX.qs index c20f4c56731..100481f9fcf 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/IsingXX.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/IsingXX.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the two qubit Ising $XX$ rotation gate. @@ -25,7 +24,6 @@ namespace Microsoft.Quantum.Intrinsic { /// The first qubit input to the gate. /// ## qubit1 /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingXX") internal operation IsingXX (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/IsingYY.qs b/src/Simulation/TargetDefinitions/Intrinsic/IsingYY.qs index 39fe3a24ff5..ad2afb19265 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/IsingYY.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/IsingYY.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the two qubit Ising $YY$ rotation gate. @@ -25,7 +24,6 @@ namespace Microsoft.Quantum.Intrinsic { /// The first qubit input to the gate. /// ## qubit1 /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingYY") internal operation IsingYY (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/IsingZZ.qs b/src/Simulation/TargetDefinitions/Intrinsic/IsingZZ.qs index c800c2b92f2..0453ad04a2a 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/IsingZZ.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/IsingZZ.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the two qubit Ising $ZZ$ rotation gate. @@ -25,7 +24,6 @@ namespace Microsoft.Quantum.Intrinsic { /// The first qubit input to the gate. /// ## qubit1 /// The second qubit input to the gate. - @EnableTestingViaName("Test.TargetDefinitions.IsingZZ") internal operation IsingZZ (theta : Double, qubit0 : Qubit, qubit1 : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/M.qs b/src/Simulation/TargetDefinitions/Intrinsic/M.qs index 7c44f88a5d1..c02cbd2ef67 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/M.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/M.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs a measurement of a single qubit in the @@ -29,7 +28,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// Measure([PauliZ], [qubit]); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.M") operation M (qubit : Qubit) : Result { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Measure.qs b/src/Simulation/TargetDefinitions/Intrinsic/Measure.qs index ada792ca5f4..c43d54d59fc 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Measure.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Measure.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Performs a joint measurement of one or more qubits in the @@ -39,7 +38,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Remarks /// If the basis array and qubit array are different lengths, then the /// operation will fail. - @EnableTestingViaName("Test.TargetDefinitions.Measure") operation Measure (bases : Pauli[], qubits : Qubit[]) : Result { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/R.qs b/src/Simulation/TargetDefinitions/Intrinsic/R.qs index 8deee174ebb..7ea77eaba43 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/R.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/R.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the given Pauli axis. @@ -26,7 +25,6 @@ namespace Microsoft.Quantum.Intrinsic { /// When called with `pauli = PauliI`, this operation applies /// a *global phase*. This phase can be significant /// when used with the `Controlled` functor. - @EnableTestingViaName("Test.TargetDefinitions.R") operation R (pauli : Pauli, theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Reset.qs b/src/Simulation/TargetDefinitions/Intrinsic/Reset.qs index a8b16345b5e..86a78b96f00 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Reset.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Reset.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Given a single qubit, measures it and ensures it is in the |0⟩ state @@ -11,7 +10,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// The qubit whose state is to be reset to $\ket{0}$. - @EnableTestingViaName("Test.TargetDefinitions.Reset") operation Reset (qubit : Qubit) : Unit { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Rx.qs b/src/Simulation/TargetDefinitions/Intrinsic/Rx.qs index 20aa42633b7..62aa42f07b4 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Rx.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Rx.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $x$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliX, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rx") operation Rx (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Ry.qs b/src/Simulation/TargetDefinitions/Intrinsic/Ry.qs index e8df5d1fe88..3308cd281db 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Ry.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Ry.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $y$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliY, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Ry") operation Ry (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Rz.qs b/src/Simulation/TargetDefinitions/Intrinsic/Rz.qs index ca7c2d4d74c..1d645c3aa44 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Rz.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Rz.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies a rotation about the $z$-axis by a given angle. @@ -28,7 +27,6 @@ namespace Microsoft.Quantum.Intrinsic { /// ```qsharp /// R(PauliZ, theta, qubit); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.Rz") operation Rz (theta : Double, qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/S.qs b/src/Simulation/TargetDefinitions/Intrinsic/S.qs index 816c8771b31..f934bf73ef5 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/S.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/S.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the π/4 phase gate to a single qubit. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.S") operation S (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/SWAP.qs b/src/Simulation/TargetDefinitions/Intrinsic/SWAP.qs index 9b9c80138ed..fc5ecff69f3 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/SWAP.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/SWAP.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the SWAP gate to a pair of qubits. @@ -33,7 +32,6 @@ namespace Microsoft.Quantum.Intrinsic { /// CNOT(qubit2, qubit1); /// CNOT(qubit1, qubit2); /// ``` - @EnableTestingViaName("Test.TargetDefinitions.SWAP") operation SWAP (qubit1 : Qubit, qubit2 : Qubit) : Unit is Adj + Ctl { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/T.qs b/src/Simulation/TargetDefinitions/Intrinsic/T.qs index dc3affe449a..0f3dac1d95e 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/T.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/T.qs @@ -19,7 +19,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.T") operation T (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/TargetDefinitions/Intrinsic/X.qs b/src/Simulation/TargetDefinitions/Intrinsic/X.qs index 8b5f8feb62b..5a046afb5eb 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/X.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/X.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $X$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.X") operation X (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Y.qs b/src/Simulation/TargetDefinitions/Intrinsic/Y.qs index 92b28478843..722391a6f45 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Y.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Y.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Y$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.Y") operation Y (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/Intrinsic/Z.qs b/src/Simulation/TargetDefinitions/Intrinsic/Z.qs index a05f34c60c8..2d2bd99df61 100644 --- a/src/Simulation/TargetDefinitions/Intrinsic/Z.qs +++ b/src/Simulation/TargetDefinitions/Intrinsic/Z.qs @@ -2,7 +2,6 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Intrinsic { - open Microsoft.Quantum.Diagnostics; /// # Summary /// Applies the Pauli $Z$ gate. @@ -19,7 +18,6 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - @EnableTestingViaName("Test.TargetDefinitions.Z") operation Z (qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; adjoint self; diff --git a/src/Simulation/TargetDefinitions/TargetPackages/Type3.Package.props b/src/Simulation/TargetDefinitions/TargetPackages/Type3.Package.props index ef68d7d949b..8babd91d65c 100644 --- a/src/Simulation/TargetDefinitions/TargetPackages/Type3.Package.props +++ b/src/Simulation/TargetDefinitions/TargetPackages/Type3.Package.props @@ -30,9 +30,6 @@ - - - diff --git a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj index fb0d25c2e8e..37e8013917b 100644 --- a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj +++ b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj @@ -1,4 +1,4 @@ - +