page_type | author | description | ms.author | ms.date | languages | products | |||
---|---|---|---|---|---|---|---|---|---|
sample |
cgranade |
Simulate evolution under the Ising model with the Trotter–Suzuki decomposition, using the Azure Quantum service |
01/25/2021 |
|
|
This sample demonstrates how to use Q# and the Azure Quantum service together to simulate evolution under the transverse Ising model by using the Trotter–Suzuki decomposition.
This sample is implemented as a standalone executable, such that no C# or Python host is needed.
dotnet run -- --simulator QuantumSimulator --n-sites=5 --time=5.0 --dt=0.1
Make sure that you have created and selected a quantum workspace, and then run the following at the command line, substituting TARGET
with the target that you would like to run against (e.g.: ionq.qpu
or quantinuum.qpu.h1
):
az quantum execute --target-id TARGET -- --n-sites=5 --time=5.0 --dt=0.1
For a full list of available quantum computing targets, run:
az quantum target list --output table
⚠️ This sample makes use of paid services on Azure Quantum. The cost of running this sample with the provided parameters on IonQ in a Pay-As-You-Go subscription is approximately $53 USD (or the equivalent amount in your local currency). This quantity is only an approximate estimate and should not be used as a binding reference. The cost of the service might vary depending on your region, demand and other factors.
- IsingModel.csproj: Main Q# project file for this sample.
- IsingModel.qs: Main Q# program for this sample.