Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions cirq-google/cirq_google/api/v2/program.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ message Program {
// List to store global constants, such as strings used in many places.
// constants are referred to their index in this list, starting at zero.
repeated Constant constants = 4;

// A batch of circuits organized by a set of parameters. These
// parameters should also be specified in the sweep as well.
// This field can be used for efficient packing of circuit functions
// that change based on parameters, or for batch sending of circuits.
repeated KeyedCircuit keyed_circuits = 5;
}

// Constants, such as long strings, that are used throughout the circuit.
Expand All @@ -54,6 +60,29 @@ message Constant {
}
}


// A batch of circuits organized by a set of parameters. These
// parameters should also be specified in the sweep as well.
// This field can be used for efficient packing of circuit functions
// that change based on parameters, or for batch sending of circuits.
message KeyedCircuit {

// Arguments for a cirq circuit which comes from run_context.
// The key will be the name of the argument, and the value
// will be the value passed into the function.
// e.g. Arguments for a circuit function such as:
// def circuit_fn(freq_GHz: float, num_cycles: int) -> Circuit
// would have the two entries: "freq_GHz" and "num_cycles"
map<string, Arg> args = 1;

// The cirq circuit corresponding to the arguments args.
Circuit circuit = 2;

// Optional key for program.
// If provided, will be used as a key in a Mapping from string to Circuit.
string key = 3;
}

// The quantum circuit, specified as a series of moments (abstract
// slices of times with gates acting on disjoint sets of qubits).
message Circuit {
Expand Down
298 changes: 152 additions & 146 deletions cirq-google/cirq_google/api/v2/program_pb2.py

Large diffs are not rendered by default.

73 changes: 72 additions & 1 deletion cirq-google/cirq_google/api/v2/program_pb2.pyi

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

Loading