Skip to content

Commit b840178

Browse files
authored
Add metadata into single sweep (#6869)
1 parent 83a8e0e commit b840178

File tree

3 files changed

+78
-19
lines changed

3 files changed

+78
-19
lines changed

cirq-google/cirq_google/api/v2/run_context.proto

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ message DeviceParameter {
126126
// by the sweep values themselves.
127127
}
128128

129+
message Metadata {
130+
// Optional arguments for if this is a device parameter.
131+
// Note one single_sweep may be associated with multiple device parameters.
132+
repeated DeviceParameter device_parameters = 1;
133+
134+
// If specified, use this label instead of parameter_key as the independent
135+
// column name in returned dataset.
136+
optional string label = 2;
137+
138+
// If true, store this sweep as parameters instead of the independent axes.
139+
optional bool as_parameter = 3;
140+
}
141+
129142
// A bundle of multiple DeviceParameters and their values.
130143
// The main use case is to set those parameters with the
131144
// values from this bundle before executing a circuit sweep.
@@ -203,6 +216,9 @@ message SingleSweep {
203216
// Optional arguments for if this is a device parameter.
204217
// (as opposed to a circuit symbol)
205218
DeviceParameter parameter = 4;
219+
220+
// Optional arguments for storing extra metadata information.
221+
Metadata metadata = 6;
206222
}
207223

208224

cirq-google/cirq_google/api/v2/run_context_pb2.py

Lines changed: 19 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cirq-google/cirq_google/api/v2/run_context_pb2.pyi

Lines changed: 43 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)