Releases: qir-alliance/pyqir
v0.8.0
v0.8.0a1
Notable changes from 0.7 to 0.8.0a1
- LLVM 14 is now the default target.
- QIR evaluation has been removed. Simulation of QIR is now available via the
qir-runner
sparse simulator.BasicQisBuilder
is now written in Python.- All QIS instructions are available in the
pyqir.qis
submodule
barrier
,ccx
,cx
,cz
,h
,if_result
,mz
,reset
,rx
,ry
,rz
,s
,s_adj
,swap
,t
,t_adj
,x
,y
,z
- Of these,
barrier
,ccx
, andswap
are new.- PyQIR can generate QIR compatible with the QIR base profile preliminary spec
- Module flags can now be generated
- Attributes on functions can now be added and queried.
- RT instructions are available in the
pyqir.rt
submodule
- Output recording functions are now built-in:
array_record_output
,result_record_output
, andtuple_record_output
- Execution environment call,
initialize
, is now built-inEntryPoint
attribute is nowentry_point
requiredQubits
attribute is nownum_required_qubits
requiredResults
attribute is nownum_required_results
__quantum__qis__mz__body
signature has been updated. Its result parameter is now markedwriteonly
and the function call now has theirreversible
attribute:
before:
declare void @__quantum__qis__mz__body(%Qubit*, %Result*) #1
after:
declare void @__quantum__qis__mz__body(%Qubit*, %Result* writeonly) #1
attributes #1 = { "irreversible" }
Technical Changes
- Inkwell has been removed as a dependency. Qirlib now uses LLVM-SYS and a custom wrapper around the LLVM C++ APIs.
What's Changed
- Bump version to 0.8.0a1 by @SamarSha in #213
- Fix warning in anltr example installation by @idavis in #214
- Remove Inkwell by @SamarSha in #216
- Fix Module.bitcode() use-after-free by @SamarSha in #219
- Fix typechecking with mypy>=0.990 by @SamarSha in #218
- Removing evaluator by @idavis in #220
- Changing build to target LLVM 14 by @idavis in #222
- Adding QIS and RT functions by @idavis in #221
- Adding param, module, and function metadata by @idavis in #223
Full Changelog: v0.7.0...v0.8.0a1
v0.7.0
This release features the unification of pyqir-generator and pyqir-parser. We've made significant changes to the API including many breaking changes. For more information, please read the upgrade guide.
What's Changed
- Update PyO3 and Maturin and require Python 3.7 by @SamarSha in #169
- Replace SemanticModel with Inkwell in PyQIR Generator by @SamarSha in #157
- Unify Generator and Evaluator by @SamarSha in #174
- Add Inkwell-based parsing by @SamarSha in #170
- Set upper bound on mypy version by @SamarSha in #191
- Replace unittest tests with pytest by @SamarSha in #183
- Update to Rust edition 2021 by @SamarSha in #185
- Removing PowerShell 7.3 alias for exec during build by @idavis in #192
- Remove spellcheck CI by @SamarSha in #187
- Move static qubit and result constructors out of Builder by @SamarSha in #181
- Remove pyqir-parser by @SamarSha in #189
- Delete release issue template by @SamarSha in #186
- Support global string constants and constant getelementptr by @SamarSha in #190
- Clean up docs and fail if there are warnings by @SamarSha in #184
- Update packages by @SamarSha in #182
- Remove qirlib Builder wrapper by @SamarSha in #193
- Support generating multiple entry points by @SamarSha in #180
- Adding better native support for mac by @idavis in #197
- Remove TypeFactory by @SamarSha in #199
- Add null constants,
br
instruction, and clean up API by @SamarSha in #201 - Automatic GEP for global strings and support for non-simple Module by @SamarSha in #202
- Remove basic passes by @SamarSha in #205
- Keep the module alive by @SamarSha in #204
- Remove dev container by @SamarSha in #207
- Add upgrade guide for v0.7 by @SamarSha in #206
- Simplify Sphinx docs structure, update theme, and fix docstring bugs by @SamarSha in #208
- Rewrite SimpleModule in pure Python by @SamarSha in #209
- Add docstrings to stub file by @SamarSha in #210
- Generalize API for attributes by @SamarSha in #211
- Bump version to 0.7.0 by @SamarSha in #212
Full Changelog: v0.6.2...v0.7.0
v0.6.2
v0.6.1
v0.6.0
Generator now supports LLVM instructions for integer arithmetic and branching. Built-in support for dynamic qubit and result allocation has been removed, but the functionality is still possible using the external functions feature (see the dynamic allocation example).
What's Changed
- Python subset to QIR by @LaurentAjdnik in #110
- Update CI runners to macOS 11 by @SamarSha in #141
- Bumping version to 0.6.0. by @idavis in #144
- Support functions with return values by @SamarSha in #138
- Support LLVM intrinsic operators for integers by @SamarSha in #140
- Support branching on boolean conditions by @SamarSha in #145
- Make the build script faster by @SamarSha in #148
- Install Maturin with pip to avoid build breakage by @SamarSha in #149
- Remove dynamic allocation for qubits and results by @SamarSha in #147
- Move
if_
andif_result
to respective builders by @SamarSha in #150 - Remove musl Linux builds by @SamarSha in #153
- Improve Mypy checking in CI by @SamarSha in #152
- Update branching example in readme by @SamarSha in #154
- Improve Sphinx documentation for PyQIR Generator by @SamarSha in #155
- Format Python files with Black by @SamarSha in #156
- Bump version to v0.6.0 and delete changelog by @SamarSha in #158
Full Changelog: v0.5.0a1...v0.6.0
v0.5.0a1
What's Changed
LLVM 13 is now the default target.
- Added mypy github action to check type annotations and mypy stub files by @WingCode in #127
- Evaluator: Raise if bitcode contains unknown external functions. by @georgios-ts in #128
- Regenerate mock parser using ANTLR-4.10 by @georgios-ts in #129
- Set LLVM 13 as the default by @idavis in #131
- Fix type hinting errors by @LaurentAjdnik in #133
- Create CODEOWNERS by @SamarSha in #134
- Parser should throw appropriate exception when loading invalid bitcode by @idavis in #137
New Contributors
- @WingCode made their first contribution in #127
- @georgios-ts made their first contribution in #129
Full Changelog: v0.4.2a1...v0.5.0a1
v0.4.2a1
What's Changed
- Adding ability to do musl builds by @idavis in #111
- Adds support for
select
instructions to pyqir-parser by @swernli in #118 - Allowing multiple LLVM versions to be used by @nilslice and @idavis in #119
- Support for parsing global byte array constants by @swernli in #120
- Add
zext
support to parser by @swernli in #124 - Release 0.4.2a1 by @idavis in #126
New Contributors
Full Changelog: v0.4.1a1...v0.4.2a1
v0.4.1a1
What's Changed
- Adding pyqir-evaluator example with result stream usage. by @idavis in #97
- Support for "ret void" in the parser by @LaurentAjdnik in #113
- Add bitcode/qir conversion functions to generator by @idavis in #115
- Release 0.4.1a1 prep by @idavis in #117
Full Changelog: v0.4.0a1...v0.4.1a1
v0.4.0a1
What's Changed
- Enable qirlib to exist on its own by @idavis in #73
- Adding static result allocation. by @idavis in #103
- Bumping version to 0.4.0 and updating changelog by @idavis in #105
- Changing default value of use_static_result_alloc to
True
by @idavis in #106 - Release 0.4.0a1 by @idavis in #109
Breaking Changes
PR #106 changes the default way Result
s are emitted in emitted QIR.
The previous approach used call %Result* @__quantum__qis__m__body(%Qubit* null)
for measurement saving to a Result
variable. Along with this, branching used __quantum__rt__result_equal(%Result*, %Result*)
along with __quantum__rt__result_get_zero
and __quantum__rt__result_get_one
to perform branching.
The new default usage in 0.4.0a1
uses static Result
identifiers instead of dynamic Result
values. With that, measurement now uses "call void @__quantum__qis__mz__body(%Qubit*, %Result*)
which accepts the static Result
identifier. As a result, the pyqir-evaluator
can now see which Result
is being written to. Branching has also changed to use call i1 @__quantum__qir__read_result(%Result*)
which returns the boolean value of the Result
.
For the pyqir-generator
, the use of static and dynamic Qubit
and Result
can now be
configured via two new methods on the SimpleModule
class:
use_static_qubit_alloc(bool)
use_static_result_alloc(bool)
Full Changelog: v0.3.2a1...v0.4.0a1