microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
sccarda/BlochLearning

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

library/chemistry/src/JordanWigner/Data.qs

38lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4export JWOptimizedHTerms;
5export JWInputState;
6export JWEncodingData;
7
8import Std.Math.*;
9
10import Generators.EvolutionGenerator;
11
12/// # Summary
13/// Format for a four term Jordan-Wigner optimized Hamiltonian.
14/// The meaning of the data represented is determined by the algorithm that receives it.
15struct JWOptimizedHTerms {
16 HTerm0 : (Int[], Double[])[],
17 HTerm1 : (Int[], Double[])[],
18 HTerm2 : (Int[], Double[])[],
19 HTerm3 : (Int[], Double[])[],
20}
21
22/// # Summary
23/// Represents preparation of the initial state
24/// The meaning of the data represented is determined by the algorithm that receives it.
25struct JWInputState {
26 Amplitude : Complex,
27 FermionIndices : Int[],
28}
29
30/// # Summary
31/// Format of data to represent all information for Hamiltonian simulation.
32/// The meaning of the data represented is determined by the algorithm that receives it.
33struct JWEncodingData {
34 NumQubits : Int,
35 Terms : JWOptimizedHTerms,
36 InputState : (Int, JWInputState[]),
37 EnergyOffset : Double,
38}
39