From cf7fcc4abee8b23354f7b601b9de3c54a71c050b Mon Sep 17 00:00:00 2001 From: Mariia Mykhailova Date: Wed, 16 Feb 2022 14:21:22 -0800 Subject: [PATCH 1/2] Clarify API docs for Fact and Contradiction (#941) This closes https://github.com/microsoft/QuantumLibraries/issues/226. --- .../QSharpFoundation/Diagnostics/Facts.qs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Simulation/QSharpFoundation/Diagnostics/Facts.qs b/src/Simulation/QSharpFoundation/Diagnostics/Facts.qs index e2c9ddca222..15adc86250a 100644 --- a/src/Simulation/QSharpFoundation/Diagnostics/Facts.qs +++ b/src/Simulation/QSharpFoundation/Diagnostics/Facts.qs @@ -5,20 +5,20 @@ namespace Microsoft.Quantum.Diagnostics { open Microsoft.Quantum.Math; /// # Summary - /// Declares that a classical condition is true. + /// Checks whether a classical condition is true, and throws an exception if it is not. /// /// # Input /// ## actual - /// The condition to be declared. + /// The condition to be checked. /// ## message - /// Failure message string to be printed in the case that the classical + /// Failure message string to be used as an error message if the classical /// condition is false. /// /// # See Also /// - Microsoft.Quantum.Diagnostics.Contradiction /// /// # Example - /// The following Q# snippet will fail: + /// The following Q# snippet will throw an exception: /// ```qsharp /// Fact(false, "Expected true."); /// ``` @@ -27,13 +27,13 @@ namespace Microsoft.Quantum.Diagnostics { } /// # Summary - /// Declares that a classical condition is false. + /// Checks whether a classical condition is false, and throws an exception if it is not. /// /// # Input /// ## actual - /// The condition to be declared. + /// The condition to be checked. /// ## message - /// Failure message string to be printed in the case that the classical + /// Failure message string to be used as an error message if the classical /// condition is true. /// /// # See Also @@ -50,18 +50,18 @@ namespace Microsoft.Quantum.Diagnostics { } /// # Summary - /// Declares that a given floating-point value represents a finite - /// number, failing when this is not the case. + /// Checks whether a given floating-point value represents a finite + /// number, and throws an exception if this is not the case. /// /// # Input /// ## d /// The floating-point value that is to be checked. /// ## message - /// Failure message to be printed in the case that `d` is either + /// Failure message to be used as an error message if `d` is either /// not finite, or not a number. /// /// # Example - /// The following Q# code will fail when run: + /// The following Q# code will throw an exception: /// ```qsharp /// FiniteFact(NaN(), "NaN is not a finite number."); /// ``` From d2178565b9d95573544285144ac74becdf05833a Mon Sep 17 00:00:00 2001 From: Scott Carda <55811729+ScottCarda-MS@users.noreply.github.com> Date: Wed, 16 Feb 2022 14:51:08 -0800 Subject: [PATCH 2/2] Updated LocalVariableDeclaraion to use Two Type Arguments (#934) --- global.json | 2 +- src/Qir/Tools/EntryPointOperationLoader.cs | 2 +- src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj | 2 +- .../Microsoft.Quantum.AutoSubstitution.csproj | 6 +++--- .../Tests.Microsoft.Quantum.EntryPointDriver.fsproj | 2 +- src/Xunit/Microsoft.Quantum.Xunit.nuspec | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/global.json b/global.json index 7d399e77f0d..e0159cc7c61 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "Microsoft.Quantum.Sdk": "0.22.190994-beta" + "Microsoft.Quantum.Sdk": "0.22.192799-alpha" } } diff --git a/src/Qir/Tools/EntryPointOperationLoader.cs b/src/Qir/Tools/EntryPointOperationLoader.cs index 941a3f87105..eb4e37e1dca 100644 --- a/src/Qir/Tools/EntryPointOperationLoader.cs +++ b/src/Qir/Tools/EntryPointOperationLoader.cs @@ -56,7 +56,7 @@ private static List GetParams(QsCallable callable) .ToList(); } - private static Parameter MakeParameter(LocalVariableDeclaration parameter) + private static Parameter MakeParameter(LocalVariableDeclaration parameter) { var type = MapResolvedTypeToDataType(parameter.Type); var arrayType = parameter.Type.Resolution is QsTypeKind.ArrayType innerType diff --git a/src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj b/src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj index 07109431fe0..da648478d84 100644 --- a/src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj +++ b/src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj @@ -36,7 +36,7 @@ - + diff --git a/src/Simulation/AutoSubstitution/Microsoft.Quantum.AutoSubstitution.csproj b/src/Simulation/AutoSubstitution/Microsoft.Quantum.AutoSubstitution.csproj index 2c34e2dcff4..d41d382af8d 100644 --- a/src/Simulation/AutoSubstitution/Microsoft.Quantum.AutoSubstitution.csproj +++ b/src/Simulation/AutoSubstitution/Microsoft.Quantum.AutoSubstitution.csproj @@ -15,11 +15,11 @@ false false true - false + false - + - + diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj index a78ede1882c..7d4203f4979 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj +++ b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj @@ -23,7 +23,7 @@ - + diff --git a/src/Xunit/Microsoft.Quantum.Xunit.nuspec b/src/Xunit/Microsoft.Quantum.Xunit.nuspec index 0c8d8116fce..30d7ff01748 100644 --- a/src/Xunit/Microsoft.Quantum.Xunit.nuspec +++ b/src/Xunit/Microsoft.Quantum.Xunit.nuspec @@ -22,7 +22,7 @@ - +