diff --git a/src/Simulation/Core/IAzureMachine.cs b/src/Simulation/Core/IAzureMachine.cs new file mode 100644 index 00000000000..c92f18290e4 --- /dev/null +++ b/src/Simulation/Core/IAzureMachine.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Runtime +{ + public interface IAzureMachine + { + /// + /// Function that configures a job object before submission. + /// + public delegate void ConfigureJob(object job); + + /// + /// Gets the ID of the quantum machine provider. + /// + string ProviderId { get; } + + /// + /// Gets the name of the target quantum machine. + /// A provider may expose multiple targets that can be used to execute programs. + /// Users may select which target they would like to be used for execution. + /// + string Target { get; } + } +} diff --git a/src/Simulation/Core/IQirMachine.cs b/src/Simulation/Core/IQirMachine.cs new file mode 100644 index 00000000000..0a633dd5435 --- /dev/null +++ b/src/Simulation/Core/IQirMachine.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Runtime +{ + public interface IQirMachine : IAzureMachine + { + /// + /// Submits a job to execute a Q# program. + /// Does not wait for execution to be completed. + /// + /// Information about the Q# program. + /// Input for the Q# program. + /// Input for the Q# program. + /// Type of input the quantum program receives. + /// Type of output the quantum program returns. + /// An object that implements the IQuantumMachineJob interface through which data about the job can be obtained. + Task SubmitAsync( + EntryPointInfo info, + TInput input, + byte[] qir) => SubmitAsync(info, input, qir, null); + + /// + /// Submits a job to execute a Q# program. + /// Does not wait for execution to be completed. + /// + /// Information about the Q# program. + /// Input for the Q# program. + /// Input for the Q# program. + /// Function that configures a job object before submission. + /// Type of input the quantum program receives. + /// Type of output the quantum program returns. + /// An object that implements the IQuantumMachineJob interface through which data about the job can be obtained. + Task SubmitAsync( + EntryPointInfo info, + TInput input, + byte[] qir, + ConfigureJob configureJobCallback); + } +}