iitis / PyQBench

Apache License 2.0
4 stars 3 forks source link

Define models needed for command line script #24

Open dexter2206 opened 2 years ago

dexter2206 commented 2 years ago

We agreed that the command line script will accept YAML files as inputs and produce a YAML string as output. The validation of inputs and outputs, as well as serialization/deserialization, will be handled by pydantic.

We need to define the following models:

The examples below demonstrate suggested valid instances of the models written in YAML format, although the precise details of models may be changed at the discretion of the implementer.

Experiment

type: fourier_discrimination,
qubits: 
- target: 0
  ancilla: 1
- target: 5
  ancilla: 2
angle: 
  start: 0.1
  stop: 0.2 
  number_of_steps: 2
method: postselection
number_of_shots: 5

Device description

arn: arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy
disable_qubit_rewiring: true
gateset: lucy

Results

experiment:
  type: fourier_discrimination,
  qubits: 
  - target: 0
    ancilla: 1
  - target: 5
    ancilla: 2
  angle: 
    start: 0.1
    stop: 0.2
    number_of_steps: 2
  method: postselection
  number_of_shots: 5
device:
  arn: arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy
  disable_qubit_rewiring: true
  gateset: lucy
results:
- target: 0
  ancilla: 1
  measurement_counts:
  - phi: 0.1
    counts:
      "11": 2
      "00": 3
  - phi: 0.2
    counts:
      "11": 1
      "10": 4
- target: 5
  ancilla: 2
  measurement_counts:
  - phi: 0.1
    counts:
      "00": 5
  - phi: 0.2
    counts:
      "01": 1
      "10": 4