Release Notes

spec/v3.1.0-24

New Features

  • The types bool and (scalar) bit are now explicitly described as being completely interchangeable in expression (r-value) positions, and that bit and bit[1] are distinct types. The difference between the types bool and bit is only in their intended storage mechanisms; bit is the scalar of the register-type bit[n], which is explicitly a bit-packed type, so cannot be used as the base type of an array, while bool is a byte-aligned single-bit integer-like type. bit[1] is a register (sequence) type that happens to be of length one.

  • Adds a recommendation that pragmas and annotations start with a namespaced identifier to avoid naming collisions between pragmas and annotations specified by different implementations. To support namespaced annotations, the annotations keyword may now include a dotted (‘.’) list of identifiers.

Upgrade Notes

  • It has been clarified that arrays and registers of size zero are allowed; however, integers and angles must have size greater than zero.

  • The qubit type is no longer a valid base type for an array, and it is no longer stated that the register type qubit[n] is equivalent to an array; there is no need for these semantics, and they clashed with the classical considerations and alignment concerns of arrays in general.

Bug Fixes

  • Some minor mathematical errors in the descriptions of the explicit gate actions in sdg, rx, ry, rz, crx and cry were corrected. The gates have not changed their intended meanings.