-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add units to device parameter (#6140)
* Add units to device parameter - Add the ability to add unit type for a device parameter. - This will be important for server-side deserialization, where the server will need to know what units the float values are in. - This will allow us to do sweeps of parameters that have units, such as nanoseconds, or GigaHertz.
- Loading branch information
1 parent
c5dbb11
commit d236276
Showing
4 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
"key" | ||
], | ||
"idx": 4, | ||
"value": 7.5 | ||
"value": 7.5, | ||
"units": "GHz" | ||
} |
2 changes: 1 addition & 1 deletion
2
cirq-google/cirq_google/json_test_data/cirq.google.DeviceParameter.repr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
cirq_google.study.device_parameter.DeviceParameter(path=['test', 'subdir', 'key'], idx=4, value=7.5) | ||
cirq_google.study.device_parameter.DeviceParameter(path=['test', 'subdir', 'key'], idx=4, value=7.5, units='GHz') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters