Skip to content

Commit 1568136

Browse files
committed
Add registry sweep documentation to cirq_google
- Add some simple documentation on how to use registry sweeps to cirq_google's device page (currently public but not linked to from table of contents)
1 parent f715527 commit 1568136

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/google/devices.md

+29
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,35 @@ of the time. To minimize the duration of the circuit, it is best to align
7070
gates of the same duration together when possible. See the
7171
[best practices](./best_practices.ipynb) for more details.
7272

73+
## Device Parameter Sweeps
74+
75+
Certain device parameters can be changed for the duration of
76+
a circuit in order to support hardware parameter sweeps. For instance,
77+
frequencies, amplitudes, and various other parameters can be modified
78+
in order to find optimal values or explore the parameter space.
79+
80+
These parameter names are generally not public, so you will need to
81+
work with a Google sponsor or resident in order to access the proper
82+
key names. These parameters are specified as lists of strings representing
83+
a path from the device config's folder (or the "sample folder").`
84+
85+
These keys can be swept like any other symbol using the
86+
`cirq_google.study.DeviceParameter` variable. For instance, the
87+
following code will sweep qubit (4,8)'s pi amplitude from 0.0 to 1.0
88+
in 0.02 increments.
89+
90+
91+
```
92+
descriptor = cirq_google.study.DeviceParameter( ["q4_8", "piAmp"])
93+
sweep = cirq.Linspace("q4_8.piAmp", 0,1,51, metadata = descriptor)
94+
```
95+
96+
Any `DeviceParameter` keys that are set to a single value using a `cirq.Points`
97+
object will change that value for all circuits run.
98+
99+
If units are required, they should be specified as a string (such as 'MHz')
100+
using the `units` argument of the `DeviceParameter`.
101+
73102
## Gates supported
74103

75104
The following lists the gates supported by Google devices.

0 commit comments

Comments
 (0)