Release notes¶
v0.5.0-3¶
Prelude¶
qiskit-qasm3-import version 0.5.1 increases the supported versions of the underlying openqasm3 parser package to reflect the semantic-versioned stability guarantees following its 1.0 release.
v0.5.0¶
Prelude¶
The 0.5.0 release makes the default importing mode less strict about mixing floating-point and angle types in gate bodies. This is to support Qiskit’s export, which is unfortunately inconsistent with the letter of the specification due to technical limitiations in Qiskit’s internal representation.
New Features¶
Gate-parameter contexts now permit
float
andangle
types to interact via multiplication and division. Strictly this is against the OpenQASM 3 specification, but in practice, Qiskit often outputs this kind of expression during its OpenQASM 3 exports, because of problems in how symbolic parameters are represented in Qiskit. This parser will now accept such statements to work around the technically invalid OpenQASM 3 output by Qiskit, ifstrict=False
.
Upgrade Notes¶
OpenQASM 3 inputs that include
input float
parameters that are not used by the program will now parse to circuits that have a global phase that appears parametrised in terms of the otherwise-unused parameter. The numerical value of the global phase will not be affected, and the global phase will be independent of the parameters. You can discard the parameter by usingQuantumCircuit.assign_parameters
to assign any numeric value to the parameter.
Bug Fixes¶
The internal-only method of handling circuits that define a parameter that they do not use (such as a program that defines
input float a;
but doesn’t usea
) has changed to avoid using private Qiskit methods. This makes it more resilient to changing versions of Qiskit.
v0.4.2¶
Prelude¶
The 0.4.2 release fixes a bug in handling circuits defined on hardware qubits. This release also adds an Apache-2.0 licence header to the source files in the distribution; the project has always been Apache-2.0 licensed, and the full licence file has always been distributed with it, but the additional standard Qiskit per-file notice was accidentally absent.
Bug Fixes¶
Importing a circuit with physical qubits (for example
$4
) will now create aQuantumCircuit
that has as many qubits as implied by the maximum physical-qubit index encountered. For example, if the largest physical qubit encountered is$4
, the output circuit will have five qubits.Previously, the circuit would only have as many qubit objects as were explicitly used and the
TranspileLayout
of the circuit would attempt to indicate the mapping, but this was at odds with how Qiskit typically represents physical circuits, and the returned layout was in a non-standard form.
v0.4.1¶
Prelude¶
The 0.4.1 release relaxes the upper bound on the Qiskit dependency, since this package is developed in conjunction with Qiskit itself and is tested in its CI, while Qiskit continues to use this. There are no expected changes in Qiskit 1.0 that will stop this package working, though Qiskit is expected to change its default supplier of OpenQASM 3 parsing.
v0.4.0¶
Prelude¶
This is a small release that updates the core dependency to qiskit
from qiskit-terra
. This is the now-preferred way to depend on Qiskit, and for installations updated in the last four months, will have no meaningful effect on the actual packaging.
Upgrade Notes¶
This package now depends on qiskit>=0.37,<1.0 instead of qiskit-terra>=0.21. This reflects how the Qiskit package is now structured, with the lower bound referring to the same version of Terra. This package is due to cease being the preferred OpenQASM 3 importer for Qiskit around the 1.0, but the upper bound is more specifically because the package is not yet guaranteeing that it will support all the changes.
v0.3.0¶
Prelude¶
This is a small release that primarily updates the dependency on the external OpenQASM 3 parser used, including a couple of bugfixes and expanding the range of ANTLR versions supported.
New Features¶
Boolean negation using the
!
operator on scalarbit
types is now supported.
v0.2.0¶
Prelude¶
qiskit-qasm3-import version 0.2.0 contains some new support for working with physical qubits. You most likely want to access these features using qiskit.qasm3.load()
and loads()
, after updating this package.
New Features¶
Added the ability to handle references to physical qubits. A layout is included in the output circuit that maps a quantum register to the non-negative integers identifying the physical qubits in the order that they are encountered in the OpenQASM 3 code.
Currently mixing references to physical qubits with declarations of virtual qubits in an OpenQASM 3 program is not allowed and raises an error.
Bug Fixes¶
Fixed binary operations between integer types and floating-point values. These were previously forbidden, but should have caused implicit promotion of the integer values to floats.