-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(barrier): add support for barrier meta instruction (#56)
* chore(deps): update pydantic * feat(barrier): add support for barrier meta instruction * fix: include barriers under OpType * fix: allow blocks inside the branches of conditionals
- Loading branch information
Showing
8 changed files
with
180 additions
and
13 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
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 @@ | ||
{ | ||
"format": "PHIR/JSON", | ||
"version": "0.1.0", | ||
"metadata": { "strict_parallelism": "true" }, | ||
"ops": [ | ||
{ | ||
"data": "qvar_define", | ||
"data_type": "qubits", | ||
"variable": "q", | ||
"size": 2 | ||
}, | ||
{ "data": "cvar_define", "data_type": "u32", "variable": "m", "size": 2 }, | ||
{ | ||
"block": "sequence", | ||
"ops": [ | ||
{ | ||
"block": "if", | ||
"condition": { "cop": "==", "args": ["m", 0] }, | ||
"true_branch": [ | ||
{ | ||
"meta": "barrier", | ||
"args": [ | ||
["q", 0], | ||
["q", 1] | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"block": "if", | ||
"condition": { "cop": "==", "args": ["m", 1] }, | ||
"true_branch": [ | ||
{ | ||
"block": "qparallel", | ||
"ops": [ | ||
{ "qop": "SZdg", "args": [["q", 0]] }, | ||
{ "qop": "SZ", "args": [["q", 1]] } | ||
] | ||
} | ||
], | ||
"false_branch": [ | ||
{ | ||
"block": "qparallel", | ||
"ops": [ | ||
{ "qop": "SZdg", "args": [["q", 0]] }, | ||
{ "qop": "SZ", "args": [["q", 1]] } | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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