Merge branch 'master' into ageller/comments
This commit is contained in:
Коммит
28812709e9
Двоичные данные
Canon/README.md
Двоичные данные
Canon/README.md
Двоичный файл не отображается.
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
open Microsoft.Quantum.Extensions.Math;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Types and supporting functions for representing unsigned integers in arrays of qubits //
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
namespace Microsoft.Quantum.Canon
|
||||
{
|
||||
|
||||
|
@ -178,6 +177,58 @@ namespace Microsoft.Quantum.Canon
|
|||
return arr;
|
||||
}
|
||||
|
||||
/// # Summary
|
||||
/// Calls a function with a given input.
|
||||
///
|
||||
/// # Description
|
||||
/// Given a function and an input to that function, calls the function
|
||||
/// and returns its output.
|
||||
///
|
||||
/// # Input
|
||||
/// ## fn
|
||||
/// A function to be called.
|
||||
/// ## input
|
||||
/// The input to be passed to the function.
|
||||
///
|
||||
/// # Output
|
||||
/// The result of calling `fn`.
|
||||
///
|
||||
/// # Remarks
|
||||
/// This operation is mainly useful for forcing a function to be called
|
||||
/// at a specific place within an operation, or for calling a function
|
||||
/// where an operation is expected.
|
||||
operation Call<'Input, 'Output>(fn : ('Input -> 'Output), input : 'Input) : 'Output {
|
||||
return fn(input);
|
||||
}
|
||||
|
||||
/// # Summary
|
||||
/// Converts functions to operations.
|
||||
///
|
||||
/// # Description
|
||||
/// Given a function, returns an operation which calls that function,
|
||||
/// and which does nothing else.
|
||||
///
|
||||
/// # Input
|
||||
/// ## fn
|
||||
/// A function to be converted to an operation.
|
||||
///
|
||||
/// # Output
|
||||
/// An operation `op` such that `op(input)` is identical to `fn(input)`
|
||||
/// for all `input`.
|
||||
///
|
||||
/// # Type Parameters
|
||||
/// ## 'Input
|
||||
/// Input type of the function to be converted.
|
||||
/// ## 'Output
|
||||
/// Output type of the function to be converted.
|
||||
///
|
||||
/// # Remarks
|
||||
/// This is mainly useful for passing functions to functions or operations
|
||||
/// which expect an operation as input.
|
||||
function ToOperation<'Input, 'Output>(fn : ('Input -> 'Output)) : ('Input => 'Output) {
|
||||
return Call(fn, _);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Microsoft.Quantum.Tests {
|
|||
// BlockEncoding.qs tests
|
||||
|
||||
// The returned operations encode the Hamiltonian (cos^2(angle) I+sin^2(angle) X)/2.
|
||||
function LCUTestHelper() : (Double[], Double, Double, (Qubit[] => () : Adjoint, Controlled), ((Qubit[], Qubit[]) => Unit : Adjoint, Controlled)){
|
||||
function LCUTestHelper() : (Double[], Double, Double, (Qubit[] => Unit : Adjoint, Controlled), ((Qubit[], Qubit[]) => Unit : Adjoint, Controlled)){
|
||||
let angle = 1.789;
|
||||
let eigenvalues = [0.5, 0.5 * Cos(angle * 2.0)];
|
||||
let prob = PowD(Cos(angle),4.0)+PowD(Sin(angle),4.0);
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
namespace Microsoft.Quantum.Tests {
|
||||
open Microsoft.Quantum.Primitive;
|
||||
open Microsoft.Quantum.Canon;
|
||||
|
||||
function Square(x : Int) : Int {
|
||||
return x * x;
|
||||
}
|
||||
|
||||
operation ApplyOp<'T, 'U>(op : ('T => 'U), input : 'T) : 'U {
|
||||
return op(input);
|
||||
}
|
||||
|
||||
operation CallTest() : Unit {
|
||||
AssertIntEqual(Call(Square, 4), 16, "Call failed with Square.");
|
||||
}
|
||||
|
||||
operation ToOperationTest() : Unit {
|
||||
let op = ToOperation(Square);
|
||||
AssertIntEqual(ApplyOp(op, 3), 9, "ToOperation failed with Square.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,50 +1,21 @@
|
|||
# Microsoft Quantum Chemistry Library.
|
||||
# Microsoft Quantum Chemistry Library #
|
||||
|
||||
C# and Q# sources used to implement the Microsoft Quantum Chemistry library. Samples and tests included.
|
||||
This folder contains the C# and Q# sources used to implement the [Microsoft Quantum Chemistry library](https://docs.microsoft.com/en-us/quantum/libraries/chemistry/).
|
||||
Samples of how to use the library can be found in the Chemistry folder of the [Microsoft/Quantum repository](https://github.com/Microsoft/Quantum/tree/master/Chemistry).
|
||||
|
||||
## Outline of features
|
||||
- Load a chemistry Hamiltonian from file. Supported format are:
|
||||
- LiQui|> schema
|
||||
- YAML schema
|
||||
- Pass loaded Hamiltonian to a variety of simulation algorithm.
|
||||
- Trotter simulation
|
||||
- Optimized Trotter simulation
|
||||
- Qubitization with minimal qubit overhead
|
||||
- Qubitization with minimal T-gate overhead
|
||||
- Samples for learning how to use the library, and also for performing quantum simulations of ground state energy estimation and obtaining resource estimates of simulation algorithms.
|
||||
## Building and testing ##
|
||||
|
||||
## Verify Installation
|
||||
- If using Microsoft Visual Studio:
|
||||
1. Open 'Microsoft.Quantum.Chemistry.sln'.
|
||||
2. Select Samples/1 - MolecularHydrogen/MolecularHydrogenGUI as the StartUp project.
|
||||
3. Press F5 to run the molecular Hydrogen quantum phase estimation demo.
|
||||
The quantum chemistry library consists of two cross-platform project built using [.NET Core](https://docs.microsoft.com/en-us/dotnet/core/):
|
||||
|
||||
- If using Windows command line:
|
||||
1. Go to [RunSimulation](../Samples/Chemistry/MolecularHydrogenGUI).
|
||||
2. Enter 'dotnet run' to run molecular Hydrogen quantum phase estimation demo.
|
||||
- [**DataModel.csproj**](https://github.com/Microsoft/QuantumLibraries/tree/master/Chemistry/src/DataModel/DataModel.csproj): C# sources used to load, parse, and pre-compute Hamiltonians loaded from LIQ𝑈𝑖|〉 or Broombridge files.
|
||||
- [**Runtime.csproj**](https://github.com/Microsoft/QuantumLibraries/tree/master/Chemistry/src/Runtime/Runtime.csproj): Q# sources used to implement quantum chemistry simulation algorithms, given representations produced by the DataModel.
|
||||
|
||||
Once .NET Core is installed, you may build and run its tests by executing the following from a command line:
|
||||
|
||||
## Structure of the Library
|
||||
```bash
|
||||
dotnet test tests
|
||||
```
|
||||
|
||||
- **[DataModel](src/DataModel/)**:
|
||||
This is a C# library that handles loading a chemistry Hamiltonian from file into a standard format. This library also handles classical preprocessing & optimization of the standard format to a format specialized for consumption by various Q# simulation algorithms.
|
||||
|
||||
- **[Chemistry](src/Chemistry/)**:
|
||||
This Q# library contains methods specific to simulating chemistry Hamiltonians that are output by the DataModel library.
|
||||
|
||||
- **[CanonAdditions](src/CanonAdditions/)**:
|
||||
This Q# library contains methods that will be eventually merged with the Microsoft.Quantum.Canon library.
|
||||
|
||||
## Structure of the tests
|
||||
|
||||
- **[DataModelTests](tests/DataModelTests/)**:
|
||||
Contains tests for the C# component of handling the chemistry Hamiltonian and loading them from files.
|
||||
|
||||
- **[ChemistryTests](tests/ChemistryTests/)**:
|
||||
Contains tests for isolated Q# component of simulating chemistry Hamiltonians.
|
||||
|
||||
- **[SystemTests](tests/SystemTests/)**:
|
||||
Contains tests for simulating chemistry Hamiltonians that are output by the DataModel library.
|
||||
|
||||
## Structure of the samples
|
||||
See the README in [Chemistry library samples](../Samples/Chemistry).
|
||||
For more details about creating and running tests in Q#,
|
||||
see the [Testing and debugging](https://docs.microsoft.com/quantum/quantum-techniques-testinganddebugging)
|
||||
section of the [developer's guide](https://docs.microsoft.com/quantum).
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
using System;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
|
||||
using Microsoft.Quantum.Simulation.Core;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.JordanWigner {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.Tests {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace Microsoft.Quantum.Chemistry.Tests {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Quantum.Simulation.XUnit;
|
||||
using Microsoft.Quantum.Simulation.Simulators;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Xunit;
|
||||
using Microsoft.Quantum.Chemistry;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Xunit;
|
||||
using Microsoft.Quantum.Chemistry;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Xunit;
|
||||
using Microsoft.Quantum.Chemistry;
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
# Quantum Chemistry Library Tests #
|
||||
|
||||
Unit tests for the Microsoft Quantum Chemistry library. All files in this library are intended to eventually be open-sourced under the MIT license, like the other components of github.com/microsoft/quantum.
|
||||
Unit tests for the [Microsoft Quantum Chemistry library](https://docs.microsoft.com/en-us/quantum/libraries/chemistry/).
|
||||
|
||||
## Structure of the tests
|
||||
## Structure of the tests ##
|
||||
|
||||
- **[DataModelTests](DataModelTests/)**:
|
||||
Contains tests for the C# component of handling the chemistry Hamiltonian and loading them from files.
|
||||
Contains tests for the C# component of handling the chemistry Hamiltonian and loading them from files.
|
||||
|
||||
- **[ChemistryTests](ChemistryTests/)**:
|
||||
Contains tests for isolated Q# component of simulating chemistry Hamiltonians.
|
||||
|
||||
- **[SystemTests](SystemTests/)**:
|
||||
Contains tests for simulating chemistry Hamiltonians that are output by the DataModel library.
|
||||
|
||||
- **[CanonAdditionsTests](CanonAdditionsTests/)**:
|
||||
These tests of the Q# canon additions focus currently mainly on LCU techniques, in particular on qubitization.
|
||||
|
||||
Contains tests for simulating chemistry Hamiltonians that are output by the DataModel library.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
|
||||
using System;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace SystemTests {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace SystemTestsBlockEncoding {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the
|
||||
// Microsoft Software License Terms for Microsoft Quantum Simulation Library (Preview).
|
||||
// See LICENSE.md in the project root for license information.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
namespace SystemTestsOptimizedBlockEncoding {
|
||||
|
||||
open Microsoft.Quantum.Primitive;
|
||||
|
|
20
README.md
20
README.md
|
@ -1,29 +1,32 @@
|
|||
# Microsoft Quantum Development Kit Samples and Libraries #
|
||||
# Microsoft Quantum Development Kit Libraries #
|
||||
|
||||
Welcome to the Microsoft Quantum Development Kit!
|
||||
|
||||
This repository contains open-source libraries for the [Quantum Development Kit](https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview):
|
||||
|
||||
- **[Docs/](./Docs)**: Additional documentation for developing on the libraries and samples. Please see [QDK online documentation](https://docs.microsoft.com/quantum/) for online documentation.
|
||||
- **[Docs/](./Docs)**: Additional documentation for developing on the libraries. Please see [QDK online documentation](https://docs.microsoft.com/quantum/) for online documentation.
|
||||
- **[Canon/](./Canon)**: Q# sources used to implement [the canon](https://docs.microsoft.com/quantum/libraries/intro) portion of the Q# standard library.
|
||||
- **[LICENSE](./LICENSE.txt)**: Terms of use and license details for the Quantum Development Kit libraries and samples.
|
||||
- **[Chemistry/](./Chemistry)**: Q# and C# sources used to implement a library for [quantum chemistry](https://docs.microsoft.com/quantum/libraries/chemistry) and Hamiltonian simulation.
|
||||
- **[LICENSE](./LICENSE.txt)**: Terms of use and license details for the Quantum Development Kit libraries.
|
||||
|
||||
## New to Quantum? ##
|
||||
|
||||
See [introduction to quantum computing](https://docs.microsoft.com/quantum/quantum-concepts-1-intro) provided with the Quantum Development Kit.
|
||||
See the [introduction to quantum computing](https://docs.microsoft.com/quantum/quantum-concepts-1-intro) provided with the Quantum Development Kit.
|
||||
|
||||
## Getting Started ##
|
||||
|
||||
The libraries provided in this repository are built using [.Net Core](https://docs.microsoft.com/en-us/dotnet/core/) and the
|
||||
The libraries provided in this repository are built using [.NET Core](https://docs.microsoft.com/en-us/dotnet/core/) and the
|
||||
[Quantum Development Kit](https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview).
|
||||
Please see the [installation guide](https://docs.microsoft.com/quantum/quantum-installconfig) for how to get up and running.
|
||||
|
||||
You may also visit our [Quantum](https://github.com/Microsoft/Quantum) repository, which offers a wide variety
|
||||
of samples on how to use these libraries to write quantum based programs.
|
||||
|
||||
## Build Status ##
|
||||
|
||||
| branch | status |
|
||||
|--------|-----------|
|
||||
| master | [![Build Status](https://travis-ci.org/Microsoft/Quantum.svg?branch=master)](https://travis-ci.org/Microsoft/Quantum) |
|
||||
|
||||
| master | [![Build Status](https://quarcsw.visualstudio.com/Libraries/_apis/build/status/Github/Libraries%20(GitHub))](https://quarcsw.visualstudio.com/Libraries/_build/latest?definitionId=62) |
|
||||
|
||||
## Feedback ##
|
||||
|
||||
|
@ -31,7 +34,6 @@ We are collecting feedback for the entire Microsoft Quantum Development Kit
|
|||
at [user voice](https://quantum.uservoice.com/). Please leave your suggestions,
|
||||
requests and bugs (or praises!) there.
|
||||
|
||||
|
||||
## Contributing ##
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
|
@ -44,4 +46,4 @@ provided by the bot. You will only need to do this once across all repos using o
|
|||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
|
|
@ -19,7 +19,6 @@ jobs:
|
|||
steps:
|
||||
- template: Build/step-build-libs.yml
|
||||
- template: Build/step-build-python.yml
|
||||
- template: Build/step-wrap-up.yml
|
||||
- job: macOS
|
||||
pool: 'Hosted macOS'
|
||||
steps:
|
||||
|
|
Загрузка…
Ссылка в новой задаче