-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make chip-contiguous-subschedule-from-last-instructions non-recursive #693
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,3 +100,26 @@ | |
(quil::chip-contiguous-subschedule-from-last-instructions | ||
sched (quil::make-qubit-resource 0 2)) | ||
expected-subschedule)))))) | ||
|
||
(deftest test-fidelity-addresser-subschedule-on-deep-circuit () | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we gotta work on your emacs theme at some point There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All I really care about is ENORMOUS FONT. Otherwise, I'm open. |
||
(let* ((chip (quil::build-nq-fully-connected-chip 3)) | ||
(sched (quil::make-chip-schedule chip)) | ||
(h0 (build-gate "H" nil 0)) | ||
(circuit-depth 25000)) | ||
(loop :for i :from 1 :to circuit-depth :do | ||
(progn | ||
;; these gates will exercise depth in the outer dfs, ie in | ||
;; chip-contiguous-subschedule-from-last-instructions. | ||
(quil::chip-schedule-append sched (build-gate "H" nil 0)) | ||
;; these gates will exercise depth in the inner dfs, ie in | ||
;; mark-predecessors-seen. | ||
(quil::chip-schedule-append sched (build-gate "H" nil 1)))) | ||
(flet ((is-h0 (gate) | ||
(and (string= (quil::application-operator-root-name gate) | ||
(quil::application-operator-root-name h0)) | ||
(equalp (quil::application-parameters gate) | ||
(quil::application-parameters h0))))) | ||
(let ((result (quil::chip-contiguous-subschedule-from-last-instructions sched (quil::make-qubit-resource 0)))) | ||
(is (= (length result) circuit-depth)) | ||
(is (every #'is-h0 result)))))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was nice while it lasted 🍻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍻