Skip to content

Commit

Permalink
Add metadata into single sweep (quantumlib#6869)
Browse files Browse the repository at this point in the history
  • Loading branch information
BichengYing authored Jan 6, 2025
1 parent 83a8e0e commit b840178
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 19 deletions.
16 changes: 16 additions & 0 deletions cirq-google/cirq_google/api/v2/run_context.proto
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ message DeviceParameter {
// by the sweep values themselves.
}

message Metadata {
// Optional arguments for if this is a device parameter.
// Note one single_sweep may be associated with multiple device parameters.
repeated DeviceParameter device_parameters = 1;

// If specified, use this label instead of parameter_key as the independent
// column name in returned dataset.
optional string label = 2;

// If true, store this sweep as parameters instead of the independent axes.
optional bool as_parameter = 3;
}

// A bundle of multiple DeviceParameters and their values.
// The main use case is to set those parameters with the
// values from this bundle before executing a circuit sweep.
Expand Down Expand Up @@ -203,6 +216,9 @@ message SingleSweep {
// Optional arguments for if this is a device parameter.
// (as opposed to a circuit symbol)
DeviceParameter parameter = 4;

// Optional arguments for storing extra metadata information.
Metadata metadata = 6;
}


Expand Down
36 changes: 19 additions & 17 deletions cirq-google/cirq_google/api/v2/run_context_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 43 additions & 2 deletions cirq-google/cirq_google/api/v2/run_context_pb2.pyi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b840178

Please sign in to comment.