Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@cesarzc
Copy link
Contributor

@cesarzc cesarzc commented Apr 13, 2021

This change implements the interface to submit a Q# program for execution in Azure Quantum using a QIR executable.

@cesarzc cesarzc changed the base branch from main to feature/azure-quantum-simulator-client April 13, 2021 03:11
@cesarzc cesarzc requested a review from bamarsha April 13, 2021 03:11
@cesarzc
Copy link
Contributor Author

cesarzc commented Apr 13, 2021

@SamarSha this is the idea for the interface that the QIR machine class would implement. It is very similar to IQuantumMachine.

The assumption that I am making is that we would extend the EntryPointInfo class to contain data about the names of the arguments.

One idea to extend the EntryPointInfo class would be to add a new property called InData which is of type Tuple<Type, ITuple<string>?>. The Type portion of the tuple is the same as the InType property while the ITuple<string>? portion has the same structure as the Type portion but the values represent the names of each argument. Note that it is nullable in case it is a QVoid operation. Does it make sense?

@bamarsha
Copy link
Contributor

To clarify, the client needs three pieces of information for each entry point argument, right?

  1. Name
  2. Type
  3. Value

Would an encoding like this be sufficient? (Using F# for brevity, but we can convert it to C#.)

type ArgumentValue =
    | Bool of bool
    | Integer of int64
    | Double of float
    | Pauli of Pauli
    | Range of Range
    | Result of Result
    | String of string
    | Array of ArgumentValue[]

type Argument = { Name: string; Value: ArgumentValue }

val SubmitAsync:
    args: Argument list
    * qir: byte[]
    * configureJob: ConfigureJob
    -> IQuantumMachineJob Task

@cesarzc
Copy link
Contributor Author

cesarzc commented Apr 13, 2021

Yes, an encoding like that would be sufficient.

@bamarsha bamarsha merged commit 22d1b23 into feature/azure-quantum-simulator-client Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants