This sample describes how Hamiltonians may be represented using library functions. The Ising model is decomposed into single-site and two-site terms which are added. A simple extension to the Heisenberg model is also illustrated.
Open the QsharpSamples.sln
solution in Visual Studio and set the .csproj file in the manifest as the startup project.
Press Start in Visual Studio to run the sample.
- IsingGenerators.qs: Q# code implementing quantum operations for this sample.
- Program.cs: C# code to interact with and print out results of the Q# operations for this sample.
- IsingGeneratorsSample.csproj: Main C# project for the sample.