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

Add Serialization and Deserialization Support of FSimViaModelTag. #6539

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix the lint
  • Loading branch information
BichengYing committed Apr 1, 2024
commit 0974ee57b1bee83cadec3dca606eef32fc6fe16d
2 changes: 1 addition & 1 deletion cirq-google/cirq_google/api/v2/program.proto
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ message FSimGate {
FloatArg phi = 2;

// If true, this is equivalent to:
// cirq.FSimGate(...).with_tags(cirq.google.FSimViaModelTag).
// cirq.FSimGate(...).with_tags(cirq_google.FSimViaModelTag()).
// This field controls how we translate the gate implementation.
bool translate_via_model = 3;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ def circuit_proto(json: Dict, qubits: List[str]):
cirq.FSimGate(theta=2, phi=1)(Q0, Q1).with_tags(cg.FSimViaModelTag()),
op_proto(
{
'fsimgate': {'theta': {'float_value': 2.0}, 'phi': {'float_value': 1.0},
'translate_via_model': True},
'fsimgate': {
'theta': {'float_value': 2.0},
'phi': {'float_value': 1.0},
'translate_via_model': True,
},
'qubit_constant_index': [0, 1],
}
),
Expand Down
Loading