Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add metadata to sweeps - Adds optional metadata attribute to Linspace and Points. - This will be used to adjust device parameters via sweep. See https://tinyurl.com/cirq-sweep-metadata-public for RFC. Co-authored-by: Matthew Neeley <mneeley@gmail.com>
- Loading branch information
1 parent
0066a53
commit 683286b
Showing
6 changed files
with
98 additions
and
23 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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
{ | ||
"cirq_type": "Linspace", | ||
"key": "a", | ||
"start": 0, | ||
"stop": 1, | ||
"length": 4 | ||
} | ||
[ | ||
{ | ||
"cirq_type": "Linspace", | ||
"key": "a", | ||
"start": 0, | ||
"stop": 1, | ||
"length": 4 | ||
}, | ||
{ | ||
"cirq_type": "Linspace", | ||
"key": "b", | ||
"start": 1, | ||
"stop": 2, | ||
"length": 3, | ||
"metadata": { | ||
"cirq_type": "NamedQubit", | ||
"name": "b" | ||
} | ||
} | ||
] |
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,4 @@ | ||
cirq.Linspace("a", start=0, stop=1, length=4) | ||
[ | ||
cirq.Linspace("a", start=0, stop=1, length=4), | ||
cirq.Linspace("b", start=1, stop=2, length=3, metadata=cirq.NamedQubit("b")) | ||
] |
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,8 +1,19 @@ | ||
{ | ||
"cirq_type": "Points", | ||
"key": "a", | ||
"points": [ | ||
0, | ||
0.4 | ||
] | ||
} | ||
[ | ||
{ | ||
"cirq_type": "Points", | ||
"key": "a", | ||
"points": [ | ||
0, | ||
0.4 | ||
] | ||
}, | ||
{ | ||
"cirq_type": "Points", | ||
"key": "amp", | ||
"points": [ | ||
0, | ||
1 | ||
], | ||
"metadata": "used to turn amp on or off" | ||
} | ||
] |
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,4 @@ | ||
cirq.Points('a', [0, 0.4]) | ||
[ | ||
cirq.Points('a', [0, 0.4]), | ||
cirq.Points('amp', [0, 1], metadata='used to turn amp on or off'), | ||
] |
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