Releases: CQCL/guppylang
Releases · CQCL/guppylang
v0.14.0
0.14.0 (2024-12-19)
⚠ BREAKING CHANGES
- Lists in
py(...)
expressions are now turned into Guppy arrays instead of lists. dirty_qubit
function removed- measure_return renamed to
project_z
Features
- add
maybe_qubit
stdlib function (#705) (a49f70e), closes #627 - add measure_array and discard_array quantum function (#710) (3ad49ff)
- Add method to load pytket circuit without function stub (#712) (ee1e3de)
- Add Option type to standard library (#696) (45ea6b7)
- Allow generic nat args in statically sized ranges (#706) (f441bb8), closes #663
- Array comprehension (#613) (fdc0526), closes #614 #616 #612
- Implicit coercion of numeric types (#702) (df4745b), closes #701
- Load
pytket
circuit as a function definition (#672) (b21b7e1) - Make arrays iterable (#632) (07b9871)
- qsystem std functions with updated primitives (#679) (b0f041f)
- remove dirty_qubit (#698) (78e366b)
- Turn py expression lists into arrays (#697) (d52a00a)
- Unpacking assignment of iterable types with static size (#688) (602e243)
- update to hugr 0.10 and tket2 0.6 (#725) (63ea7a7)
Bug Fixes
- Accept non-negative int literals and py expressions as nats (#708) (a93d4fe), closes #704
- Allow borrowing inside comprehensions (#723) (02b6ab0), closes #719
- Detect unsupported default arguments (#659) (94ac7e3), closes #658
- docs build command (#729) (471b74c)
- Ensure
int
s can be treated as booleans (#709) (6ef6d60), closes #681 - Fix array execution bugs (#731) (0f6ceaa)
- Fix implicit modules in IPython shells (#662) (4ecb5f2), closes #661
- Properly report error for unsupported constants (#724) (d0c2da4), closes #721
- Properly report errors for unsupported expressions (#692) (7f24264), closes #691
- remove use of deprecated Ellipsis (#699) (b819a84)
Documentation
v0.13.1
v0.13.0
0.13.0 (2024-11-12)
⚠ BREAKING CHANGES
prelude
module renamed tostd
Features
- add
qubit
discard/measure methods (#580) (242fa44) - Add
SizedIter
wrapper type (#611) (2e9da6b) - conventional results post processing (#593) (db96224)
- Improve compiler diagnostics (#547) (90d465d), closes #551 #553 #586 #588 #587 #590 #600 #601 #606
- restrict result tag sizes to 256 bytes (#596) (4e8e00f), closes #595
Bug Fixes
Documentation
Miscellaneous Chores
Code Refactoring
v0.12.2
v0.12.1
v0.12.0
0.12.0 (2024-09-18)
⚠ BREAKING CHANGES
- Pytket circuits loaded via a
py
expression no longer take ownership of the passed qubits. - Lists and function tensors are no longer available by default.
guppylang.enable_experimental_features()
must be called before compilation to enable them. - The
GuppyModule
argument is now optional for all decorators and no longer the first positional argument. Removed the explicit module objectsbuiltins
,quantum
, andangle
. quantum_functional
is now its own Guppy module and no longer implicitly comes withquantum
.- Linear function arguments are now borrowed by default; removed the now redundant
@inout
annotation
Features
- Add functions to quantum module and make quantum_functional independent (#494) (0b0b1af)
- Hide lists and function tensors behind experimental flag (#501) (c867f48)
- Make linear types @inout by default; add @owned annotation (#486) (e900c96)
- Only lower definitions to Hugr if they are used (#496) (cc2c8a4)
- Support implicit modules for all decorators and turn builtins into implicit module (#476) (cc8a424)
- Use inout for pytket circuits (#500) (a980ec2)
Bug Fixes
v0.11.0
0.11.0 (2024-09-11)
⚠ BREAKING CHANGES
guppy.take_module
renamed toguppy.get_module
and no longer removes the module from the state.- Quantum operations
rx
,rz
,phased_x
, andzz_max
use theangle
type instead of floats.
Features
- Add implicit importing of modules (#461) (1b73032)
- Use angle type in quantum operations (#467) (ce0f746)
Bug Fixes
v0.10.0
0.10.0 (2024-09-11)
⚠ BREAKING CHANGES
- Bumped the
hugr
dependency to0.8.0
GuppyModule.load
no longer loads the content of modules but instead just brings the name of the module into scope. UseGuppyModule.load_all
to get the old behaviour.- Removed
guppylang.hugr_builder.hugr.Hugr
, compiling a module returns ahugr.Package
instead.
Features
- Add
__version__
field to guppylang (#473) (b996c62) - Add angle type (#449) (12e41e0)
- Add array literals (#446) (a255c02)
- Add equality test for booleans (#394) (dd702ce), closes #363
- Add pi constant (#451) (9d35a78)
- Add qualified imports and make them the default (#443) (553ec51)
- Allow calling of methods (#440) (5a59da3)
- Allow imports of function definitions and aliased imports (#432) (e23b666)
- Array indexing (#415) (2199b48), closes #421 #422 #447
- Inout arguments (#311) (060649b), closes #315 #316 #349 #344 #321 #331 #350 #340 #351
- range() with single-argument (#452) (d05f369)
- Skip checking of redefined functions (#457) (7f9ad32)
- Support
nat
/int
↔bool
cast operations (#459) (3b778c3) - Use
hugr-cli
for validation (#455) (1d0667b) - Use cell name instead of file for notebook errors (#382) (d542601)
- Use the hugr builder (536abf9)
Bug Fixes
- Fix and update demo notebook (#376) (23b2a15)
- Fix linearity checking bug (#441) (0b8ea21)
- Fix struct definitions in notebooks (#374) (b009465)