A bugfix by @byeongjee enable scientific notation with an exponent of more than two digits.
- Fixed a bug in the lexer that prevented the interpreter from parsing scientific notation numbers where exponents had more than two digits (@byeongjee)
This version adds support for running the WASM version of the simulator inside a web worker.
- The WASM version of the simulator can now be run inside a web worker. This allows to run the simulator in a separate thread, and avoid blocking the main thread.
This version adds documenting comments to OpenQASM 2.0. The specification mentions the comment before a gate definition may document the gate. The sepecification does not mention if it is just one comment or all the comments that precede the gate definition. This implementation considers all the comments immediately before the line of the gate definition as documentation.
// This comment is not documentation.
// This is also
// not documentation either.
// This comment, and the next one,
// are the documentation of the following gate.
gate id q { }
- The command line tool has now the
--info
option to extract the gate documentation from the source code. - The crate has a new function, [
get_gate_info
] to extract the signature of a gate, and its documentation. - The WASM version has a new function,
getGateInfo
, to extract the signature of a gate, and its documentation.
This version makes qasmsim
dual license: APACHE and MIT as recommended in
the Rust API guidelines.
RuntimeError
andSemanticError
now implements error-related traitsstd::error::Error
andstd::fmt::Display
.
Most of the features of OPENQASM are implemented. Main features missing are
including arbitrary files with the include
directive, and using the comment
closest to a function as its documentation.
The grammar
module is unstable and can introduce backward-compatibility
breaking-changes from release to release. Use at your own risk.