From 3c8a52dbf1e5dda3f31c9dafbfcbfdc6e756cb7b Mon Sep 17 00:00:00 2001 From: Mariia Mykhailova Date: Tue, 1 Mar 2022 15:26:50 -0800 Subject: [PATCH 1/2] Fix formulas in PurifiedMixedState(WithData) This fixes #485. --- Standard/src/Preparation/QuantumROM.qs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Standard/src/Preparation/QuantumROM.qs b/Standard/src/Preparation/QuantumROM.qs index 8b91dab73aa..562fad35f72 100644 --- a/Standard/src/Preparation/QuantumROM.qs +++ b/Standard/src/Preparation/QuantumROM.qs @@ -32,7 +32,7 @@ namespace Microsoft.Quantum.Preparation { /// of the mixed state /// $$ /// \begin{align} - /// \rho = \sum_{j = 0}^{N-1} \frac{|alpha_j|}{\sum_k |\alpha_k|} \ket{j}\bra{j}, + /// \rho = \sum_{j = 0}^{N-1} \frac{|\alpha_j|}{\sum_k |\alpha_k|} \ket{j}\bra{j}, /// \end{align} /// $$ /// where each $p_j$ is an approximation to the given coefficient $\alpha_j$ @@ -73,7 +73,7 @@ namespace Microsoft.Quantum.Preparation { /// /// # Example /// The following code snippet prepares an purification of the $3$-qubit state - /// $\rho=\sum_{j=0}^{4}\frac{|alpha_j|}{\sum_k |\alpha_k|}\ket{j}\bra{j}$, where + /// $\rho=\sum_{j=0}^{4}\frac{|\alpha_j|}{\sum_k |\alpha_k|}\ket{j}\bra{j}$, where /// $\vec\alpha=(1.0, 2.0, 3.0, 4.0, 5.0)$, and the target error is /// $10^{-3}$: /// ```qsharp @@ -127,24 +127,30 @@ namespace Microsoft.Quantum.Preparation { /// bitstring $\vec{x}_j$ associated with each coefficient, this /// function returns an operation that uses the Quantum ROM technique to /// prepare an approximation + /// /// $$ /// \begin{align} /// \tilde\rho = \sum_{j = 0}^{N - 1} p_j \ket{j}\bra{j} \otimes \ket{\vec{x}_j}\bra{\vec{x}_j} /// \end{align} /// $$ + /// /// of the mixed state + /// /// $$ /// \begin{align} - /// \rho = \sum_{j = 0}^{N-1}\ frac{|alpha_j|}{\sum_k |\alpha_k|} \ket{j}\bra{j} \otimes \ket{\vec{x}_j}\bra{\vec{x}_j}, + /// \rho = \sum_{j = 0}^{N-1} \frac{|\alpha_j|}{\sum_k |\alpha_k|} \ket{j}\bra{j} \otimes \ket{\vec{x}_j}\bra{\vec{x}_j}, /// \end{align} /// $$ + /// /// where each $p_j$ is an approximation to the given coefficient $\alpha_j$ /// such that + /// /// $$ /// \begin{align} /// \left| p_j - \frac{ |\alpha_j| }{ \sum_k |\alpha_k| } \right| \le \frac{\epsilon}{N} /// \end{align} /// $$ + /// /// for each $j$. /// /// When passed an index register and a register of garbage qubits, From 1dc18e96f2f1a29754f3a0322afda38e7671dc7d Mon Sep 17 00:00:00 2001 From: Mathias Soeken Date: Thu, 3 Mar 2022 08:54:11 +0100 Subject: [PATCH 2/2] Update NuGet version. --- Chemistry/src/Runtime/Runtime.csproj | 4 ++-- .../tests/ChemistryTests/QSharpTests.csproj | 2 +- .../tests/SystemTests/SystemTests.csproj | 2 +- MachineLearning/src/MachineLearning.csproj | 2 +- .../tests/MachineLearningTests.csproj | 2 +- NOTICE.txt | 20 +++++++++---------- Numerics/src/Numerics.csproj | 4 ++-- Numerics/tests/NumericsTests.csproj | 2 +- Standard/src/Standard.csproj | 6 +++--- Standard/tests/Standard.Tests.csproj | 2 +- Visualization/src/Visualization.csproj | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Chemistry/src/Runtime/Runtime.csproj b/Chemistry/src/Runtime/Runtime.csproj index 4822fafd9e7..d4f0c7da347 100644 --- a/Chemistry/src/Runtime/Runtime.csproj +++ b/Chemistry/src/Runtime/Runtime.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 @@ -40,7 +40,7 @@ - + diff --git a/Chemistry/tests/ChemistryTests/QSharpTests.csproj b/Chemistry/tests/ChemistryTests/QSharpTests.csproj index 6d2636c9795..4d7d9bc011f 100644 --- a/Chemistry/tests/ChemistryTests/QSharpTests.csproj +++ b/Chemistry/tests/ChemistryTests/QSharpTests.csproj @@ -1,4 +1,4 @@ - + diff --git a/Chemistry/tests/SystemTests/SystemTests.csproj b/Chemistry/tests/SystemTests/SystemTests.csproj index d4bfa3ccba9..5a12cf93568 100644 --- a/Chemistry/tests/SystemTests/SystemTests.csproj +++ b/Chemistry/tests/SystemTests/SystemTests.csproj @@ -1,4 +1,4 @@ - + diff --git a/MachineLearning/src/MachineLearning.csproj b/MachineLearning/src/MachineLearning.csproj index adcb5683acd..10547bfa5fc 100644 --- a/MachineLearning/src/MachineLearning.csproj +++ b/MachineLearning/src/MachineLearning.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 Microsoft.Quantum.MachineLearning diff --git a/MachineLearning/tests/MachineLearningTests.csproj b/MachineLearning/tests/MachineLearningTests.csproj index 45c3aa884e3..45343fbe972 100644 --- a/MachineLearning/tests/MachineLearningTests.csproj +++ b/MachineLearning/tests/MachineLearningTests.csproj @@ -1,4 +1,4 @@ - + diff --git a/NOTICE.txt b/NOTICE.txt index 26a8ab826b0..dfc2ff2482e 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -5293,7 +5293,7 @@ Copyright (c) Microsoft Corporation. --------------------------------------------------------- -Microsoft.Quantum.Compiler 0.22.191200-beta - MIT +Microsoft.Quantum.Compiler 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5313,7 +5313,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.CSharpGeneration 0.22.191200-beta - MIT +Microsoft.Quantum.CSharpGeneration 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5333,7 +5333,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.DocumentationGenerator 0.22.191200-beta - MIT +Microsoft.Quantum.DocumentationGenerator 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5353,7 +5353,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.IQSharp.Core 0.22.191200-beta - MIT +Microsoft.Quantum.IQSharp.Core 0.23.195645-beta - MIT (c) by W3C @@ -5760,7 +5760,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.IQSharp.Jupyter 0.22.191200-beta - MIT +Microsoft.Quantum.IQSharp.Jupyter 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5780,7 +5780,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.QSharp.Core 0.22.191200-beta - MIT +Microsoft.Quantum.QSharp.Core 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5800,7 +5800,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.QSharp.Foundation 0.22.191200-beta - MIT +Microsoft.Quantum.QSharp.Foundation 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5820,7 +5820,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.Runtime.Core 0.22.191200-beta - MIT +Microsoft.Quantum.Runtime.Core 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5840,7 +5840,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.Simulators 0.22.191200-beta - MIT +Microsoft.Quantum.Simulators 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. @@ -5860,7 +5860,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.Quantum.Targets.Interfaces 0.22.191200-beta - MIT +Microsoft.Quantum.Targets.Interfaces 0.23.195645-beta - MIT (c) 2008 VeriSign, Inc. diff --git a/Numerics/src/Numerics.csproj b/Numerics/src/Numerics.csproj index e7930e6df17..b13933eebac 100644 --- a/Numerics/src/Numerics.csproj +++ b/Numerics/src/Numerics.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 @@ -41,7 +41,7 @@ - + diff --git a/Numerics/tests/NumericsTests.csproj b/Numerics/tests/NumericsTests.csproj index c62cc6449c5..a533ac818ad 100644 --- a/Numerics/tests/NumericsTests.csproj +++ b/Numerics/tests/NumericsTests.csproj @@ -1,4 +1,4 @@ - + diff --git a/Standard/src/Standard.csproj b/Standard/src/Standard.csproj index aacaf4ebbeb..67ce64edc74 100644 --- a/Standard/src/Standard.csproj +++ b/Standard/src/Standard.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 @@ -38,8 +38,8 @@ - - + + diff --git a/Standard/tests/Standard.Tests.csproj b/Standard/tests/Standard.Tests.csproj index 9d47d421b39..7adfe497eb2 100644 --- a/Standard/tests/Standard.Tests.csproj +++ b/Standard/tests/Standard.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/Visualization/src/Visualization.csproj b/Visualization/src/Visualization.csproj index b386823d3a7..b713d9984fd 100644 --- a/Visualization/src/Visualization.csproj +++ b/Visualization/src/Visualization.csproj @@ -32,9 +32,9 @@ - + - +