-
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.
Adds standalone DeviceMetaData class. First step in #4743 .
- Loading branch information
1 parent
89f88b0
commit 3a6ad87
Showing
8 changed files
with
164 additions
and
8 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
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
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
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
54 changes: 54 additions & 0 deletions
54
cirq-core/cirq/protocols/json_test_data/DeviceMetadata.json
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"cirq_type": "DeviceMetadata", | ||
"qubits": [ | ||
{ | ||
"cirq_type": "LineQubit", | ||
"x": 0 | ||
}, | ||
{ | ||
"cirq_type": "LineQubit", | ||
"x": 1 | ||
}, | ||
{ | ||
"cirq_type": "LineQubit", | ||
"x": 2 | ||
}, | ||
{ | ||
"cirq_type": "LineQubit", | ||
"x": 3 | ||
} | ||
], | ||
"nx_graph": { | ||
"directed": false, | ||
"multigraph": false, | ||
"graph": {}, | ||
"nodes": [ | ||
{ | ||
"id": 0 | ||
}, | ||
{ | ||
"id": 1 | ||
}, | ||
{ | ||
"id": 2 | ||
}, | ||
{ | ||
"id": 3 | ||
} | ||
], | ||
"links": [ | ||
{ | ||
"source": 0, | ||
"target": 1 | ||
}, | ||
{ | ||
"source": 0, | ||
"target": 2 | ||
}, | ||
{ | ||
"source": 0, | ||
"target": 3 | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
cirq.DeviceMetadata(cirq.LineQubit.range(4), nx.star_graph(3)) |