-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forbid the declaration of zero-length classical vectors
If zero-length vectors are allowed, qvm crashes in `allocate-memory-for-model` with the error: The value of QVM::SIZE is 0, which is not The SIZE wasn't a multiple of 8.. [Condition of type SIMPLE-TYPE-ERROR]
- Loading branch information
1 parent
3448732
commit 5d8af80
Showing
2 changed files
with
11 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# zero-length vector | ||
|
||
DECLARE r BIT[0] | ||
|
||
I 0 | ||
|
||
MEASURE 0 r[0] |