Skip to content

Streamline proto serialization of circuits with duplicate operations #6991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
10 changes: 10 additions & 0 deletions cirq-google/cirq_google/api/v2/program.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ message Constant {

// Moments used multiple times in a circuit
Moment moment_value = 4;

// Operations used multiple times in a circuit
Operation operation_value = 5;
}
}

Expand Down Expand Up @@ -87,6 +90,13 @@ message Moment {
// All of the circuit operations in the moment. Each operation and circuit
// operation must act on different qubits.
repeated CircuitOperation circuit_operations = 2;

// All of the operations in the moment that are stored in the constants
// table. Each operation should be stored in either `operations`
// or `operation_indices`. Putting operations into the symbol
// table should be preferred for circuits with repeated operations
// for improved serialization size.
repeated int32 operation_indices = 4;
}

// The quantum circuit, specified as a series of operations at specific
Expand Down
Loading