-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: Make
qubit
type lower case (#165)
Addresses #142 --- Also: update 27 test cases from ```python from guppylang.hugr.tys import Qubit ``` to ```python from guppylang.prelude.quantum import qubit ``` and some whitespace trimming
- Loading branch information
Showing
72 changed files
with
216 additions
and
216 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:13 | ||
|
||
11: @guppy(module) | ||
12: def foo(xs: list[int], q: Qubit) -> linst[Qubit]: | ||
12: def foo(xs: list[int], q: qubit) -> linst[qubit]: | ||
13: return [q for x in xs] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` would be used multiple times when evaluating this comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` would be used multiple times when evaluating this comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:18 | ||
|
||
16: @guppy(module) | ||
17: def foo(xs: list[int], q: Qubit) -> list[int]: | ||
17: def foo(xs: list[int], q: qubit) -> list[int]: | ||
18: return [x for x in xs if bar(q)] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` would be used multiple times when evaluating this comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` would be used multiple times when evaluating this comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:13 | ||
|
||
11: @guppy(module) | ||
12: def foo(qs: linst[tuple[bool, Qubit]]) -> linst[Qubit]: | ||
12: def foo(qs: linst[tuple[bool, qubit]]) -> linst[qubit]: | ||
13: return [q for b, q in qs if b] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` is not used on all control-flow paths of the list comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` is not used on all control-flow paths of the list comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:18 | ||
|
||
16: @guppy(module) | ||
17: def foo(qs: linst[tuple[bool, Qubit]]) -> list[int]: | ||
17: def foo(qs: linst[tuple[bool, qubit]]) -> list[int]: | ||
18: return [42 for b, q in qs if b if q] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` is not used on all control-flow paths of the list comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` is not used on all control-flow paths of the list comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:13 | ||
|
||
11: @guppy(module) | ||
12: def foo(qs: linst[Qubit], xs: list[int]) -> linst[Qubit]: | ||
12: def foo(qs: linst[qubit], xs: list[int]) -> linst[qubit]: | ||
13: return [q for q in qs for x in xs] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` would be used multiple times when evaluating this comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` would be used multiple times when evaluating this comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:13 | ||
|
||
11: @guppy(module) | ||
12: def foo(qs: linst[Qubit], xs: list[int]) -> linst[Qubit]: | ||
12: def foo(qs: linst[qubit], xs: list[int]) -> linst[qubit]: | ||
13: return [q for x in xs for q in qs] | ||
^^ | ||
GuppyTypeError: Variable `qs` with linear type `linst[Qubit]` would be used multiple times when evaluating this comprehension | ||
GuppyTypeError: Variable `qs` with linear type `linst[qubit]` would be used multiple times when evaluating this comprehension |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Guppy compilation failed. Error in file $FILE:18 | ||
|
||
16: @guppy(module) | ||
17: def foo(qs: linst[Qubit], xs: list[int]) -> list[int]: | ||
17: def foo(qs: linst[qubit], xs: list[int]) -> list[int]: | ||
18: return [x for q in qs for x in xs if bar(q)] | ||
^ | ||
GuppyTypeError: Variable `q` with linear type `Qubit` would be used multiple times when evaluating this comprehension | ||
GuppyTypeError: Variable `q` with linear type `qubit` would be used multiple times when evaluating this comprehension |
Oops, something went wrong.