Skip to content
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

Support serialization of cirq-google.CouplerPulse gate #6472

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -208,6 +208,7 @@ message Operation {
MeasurementGate measurementgate = 15;
WaitGate waitgate = 16;
InternalGate internalgate = 17;
CouplerPulseGate couplerpulsegate = 18;
}

// Map from the argument name to the Argument needed to fully specify
Expand Down Expand Up @@ -424,4 +425,13 @@ message InternalGate{
string module = 2; // Gate module.
int32 num_qubits = 3; // Number of qubits. Required during deserialization.
map<string, Arg> gate_args = 4; // Gate args.
}

message CouplerPulseGate{
optional FloatArg hold_time_ps = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add line comments. ps=pico seconds? Do we foresee a need for sub-nanosecond timing?

Copy link
Collaborator Author

@NoureldinYosri NoureldinYosri Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added. initially I was using ns, but when I wrote a test that used ps I got precision error. the test input was cirq.Duration(picos=1) and when the object got translated it had cirq.Duration(nanos=1.0000000..1e-3). so I'm using ps to avoid that.

optional FloatArg rise_time_ps = 2;
optional FloatArg padding_time_ps = 3;
optional FloatArg coupling_mhz = 4;
optional FloatArg q0_detune_mhz = 5;
optional FloatArg q1_detune_mhz = 6;
}
Loading
Loading