Skip to content

Commit

Permalink
Fix release notes order (#587)
Browse files Browse the repository at this point in the history
This PR changes the release notes to have a chronological descending
order.

#### How to regenerate the release notes

To regenerate the release notes and fix the order of each version, I
used the API generation script with some changes. We need to modify the
writeSeparateReleaseNotes function from `releaseNotes.ts` and the
`updateApiDocs.ts` script.

The first step is to comment the `extractMarkdownReleaseNotesPatches`
call in line 245, given that we don't want to write the latest release
notes file. Also, we need to substitute the two arrays returned by that
call for the release notes we want to regenerate and an empty
dictionary. I did the regeneration in batches of 6 files:

```ts
//const [minorVersionsFound, markdownByPatchVersion] =
//  extractMarkdownReleaseNotesPatches(releaseNoteMarkdown);

const markdownByPatchVersion: {
  [id: string]: string;
} = {};

const minorVersionsFound = ['0.10', '0.15', '0.14', '0.13', '0.12', '0.11'];
```

The following step is to add some logic to read all the files and store
each patch version we find in each file. With that information, we will
re-write each release notes file at the end of the function with the
correct order. That piece of code was extracted from the first version
of the script which can be found in this commit
7aa586f.
It was copied in the same place it appear in the commit.

```ts
const [_, markdownByPatchOldVersion] =
extractMarkdownReleaseNotesPatches(currentMarkdown);

for (let [versionPatch, markdownPatch] of Object.entries(
  markdownByPatchOldVersion,
)) {
  // We keep the release notes for a patch if it hasn't been modified for the current release notes.
  // Otherwise, we use the modified version.
  if (!markdownByPatchVersion.hasOwnProperty(versionPatch)) {
    markdownByPatchVersion[versionPatch] = markdownPatch;
  }
}
```

Finally, to speed up the process, I commented the files we regenerate in
the `updateApiDocs.ts` script. This step is optional, and if used we
have to make sure we restore all the docs before creating the PR.

```ts
async function convertHtmlToMarkdown(
  htmlPath: string,
  markdownPath: string,
  baseSourceUrl: string,
  pkg: Pkg,
) {
  const files = await globby(
    [
      //"apidocs/**.html",
      //"apidoc/**.html",
      //"stubs/**.html",
      "release_notes.html",
    ],
    {
      cwd: htmlPath,
    },
  );
```
Closes #538
  • Loading branch information
arnaucasau authored and github-actions committed Jan 9, 2024
1 parent e024259 commit b270d49
Show file tree
Hide file tree
Showing 20 changed files with 4,215 additions and 4,195 deletions.
73 changes: 37 additions & 36 deletions docs/api/qiskit/release-notes/0.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,42 @@ description: New features and bug fixes

# Qiskit 0.11 release notes

## 0.11.1

We have bumped up Qiskit micro version to 0.11.1 because IBM Q Provider has bumped its micro version as well.

<span id="terra-0-8" />

### Terra 0.8

No Change

<span id="aer-0-2" />

### Aer 0.2

No change

<span id="ignis-0-1" />

### Ignis 0.1

No Change

<span id="aqua-0-5" />

### Aqua 0.5

`qiskit-aqua` has been updated to `0.5.3` to fix code related to changes in how gates inverses are done.

<span id="id569" />

### IBM Q Provider 0.3

The `IBMQProvider` has been updated to version `0.3.1` to fix backward compatibility issues and work with the default 10 job limit in single calls to the IBM Q API v2.

<span id="qiskit-0-11" />

## 0.11

We have bumped up Qiskit minor version to 0.11 because IBM Q Provider has bumped up its minor version too. On Aer, we have jumped from 0.2.1 to 0.2.3 because there was an issue detected right after releasing 0.2.2 and before Qiskit 0.11 went online.
Expand Down Expand Up @@ -103,39 +139,4 @@ backend_2 = provider_2.get_backend('ibmq_qasm_simulator')

You can find more information and details in the [IBM Q Provider documentation](https://github.com/Qiskit/qiskit-ibmq-provider).

<span id="qiskit-0-10" />
## 0.11.1

We have bumped up Qiskit micro version to 0.11.1 because IBM Q Provider has bumped its micro version as well.

<span id="terra-0-8" />

### Terra 0.8

No Change

<span id="aer-0-2" />

### Aer 0.2

No change

<span id="ignis-0-1" />

### Ignis 0.1

No Change

<span id="aqua-0-5" />

### Aqua 0.5

`qiskit-aqua` has been updated to `0.5.3` to fix code related to changes in how gates inverses are done.

<span id="id569" />

### IBM Q Provider 0.3

The `IBMQProvider` has been updated to version `0.3.1` to fix backward compatibility issues and work with the default 10 job limit in single calls to the IBM Q API v2.

<span id="qiskit-0-11" />
<span id="qiskit-0-10" />
131 changes: 66 additions & 65 deletions docs/api/qiskit/release-notes/0.18.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,71 @@ description: New features and bug fixes

# Qiskit 0.18 release notes

## 0.18.3

<span id="terra-0-13-0" />

### Terra 0.13.0

No Change

<span id="id488" />

### Aer 0.5.1

<span id="release-notes-0-5-1-upgrade-notes" />

<span id="id489" />

#### Upgrade Notes

* Changes how transpilation passes are handled in the C++ Controller classes so that each pass must be explicitly called. This allows for greater customization on when each pass should be called, and with what parameters. In particular this enables setting different parameters for the gate fusion optimization pass depending on the QasmController simulation method.
* Add `gate_length_units` kwarg to `qiskit.providers.aer.noise.NoiseModel.from_device()` for specifying custom `gate_lengths` in the device noise model function to handle unit conversions for internal code.
* Add Controlled-Y (“cy”) gate to the Stabilizer simulator methods supported gateset.
* For Aer’s backend the jsonschema validation of input qobj objects from terra is now opt-in instead of being enabled by default. If you want to enable jsonschema validation of qobj set the `validate` kwarg on the `qiskit.providers.aer.QasmSimualtor.run()` method for the backend object to `True`.

<span id="release-notes-0-5-1-bug-fixes" />

<span id="id490" />

#### Bug Fixes

* Remove “extended\_stabilizer” from the automatically selected simulation methods. This is needed as the extended stabilizer method is not exact and may give incorrect results for certain circuits unless the user knows how to optimize its configuration parameters.

The automatic method now only selects from “stabilizer”, “density\_matrix”, and “statevector” methods. If a non-Clifford circuit that is too large for the statevector method is executed an exception will be raised suggesting you could try explicitly using the “extended\_stabilizer” or “matrix\_product\_state” methods instead.

* Fixes Controller classes so that the ReduceBarrier transpilation pass is applied first. This prevents barrier instructions from preventing truncation of unused qubits if the only instruction defined on them was a barrier.

* Disables gate fusion for the matrix product state simulation method as this was causing issues with incorrect results being returned in some cases.

* Fix error in gate time unit conversion for device noise model with thermal relaxation errors and gate errors. The error probability the depolarizing error was being calculated with gate time in microseconds, while for thermal relaxation it was being calculated in nanoseconds. This resulted in no depolarizing error being applied as the incorrect units would make the device seem to be coherence limited.

* Fix bug in incorrect composition of QuantumErrors when the qubits of composed instructions differ.

* Fix issue where the “diagonal” gate is checked to be unitary with too high a tolerance. This was causing diagonals generated from Numpy functions to often fail the test.

* Fix remove-barrier circuit optimization pass to be applied before qubit trucation. This fixes an issue where barriers inserted by the Terra transpiler across otherwise inactive qubits would prevent them from being truncated.

<span id="id491" />

### Ignis 0.3.0

No Change

<span id="aqua-0-6-6" />

### Aqua 0.6.6

No Change

<span id="ibm-q-provider-0-6-1" />

### IBM Q Provider 0.6.1

No Change

<span id="qiskit-0-18-0" />

## 0.18.0

<span id="release-notes-0-13-0" />
Expand Down Expand Up @@ -984,68 +1049,4 @@ No Change

No Change

<span id="qiskit-0-17-0" />
## 0.18.3

<span id="terra-0-13-0" />

### Terra 0.13.0

No Change

<span id="id488" />

### Aer 0.5.1

<span id="release-notes-0-5-1-upgrade-notes" />

<span id="id489" />

#### Upgrade Notes

* Changes how transpilation passes are handled in the C++ Controller classes so that each pass must be explicitly called. This allows for greater customization on when each pass should be called, and with what parameters. In particular this enables setting different parameters for the gate fusion optimization pass depending on the QasmController simulation method.
* Add `gate_length_units` kwarg to `qiskit.providers.aer.noise.NoiseModel.from_device()` for specifying custom `gate_lengths` in the device noise model function to handle unit conversions for internal code.
* Add Controlled-Y (“cy”) gate to the Stabilizer simulator methods supported gateset.
* For Aer’s backend the jsonschema validation of input qobj objects from terra is now opt-in instead of being enabled by default. If you want to enable jsonschema validation of qobj set the `validate` kwarg on the `qiskit.providers.aer.QasmSimualtor.run()` method for the backend object to `True`.

<span id="release-notes-0-5-1-bug-fixes" />

<span id="id490" />

#### Bug Fixes

* Remove “extended\_stabilizer” from the automatically selected simulation methods. This is needed as the extended stabilizer method is not exact and may give incorrect results for certain circuits unless the user knows how to optimize its configuration parameters.

The automatic method now only selects from “stabilizer”, “density\_matrix”, and “statevector” methods. If a non-Clifford circuit that is too large for the statevector method is executed an exception will be raised suggesting you could try explicitly using the “extended\_stabilizer” or “matrix\_product\_state” methods instead.

* Fixes Controller classes so that the ReduceBarrier transpilation pass is applied first. This prevents barrier instructions from preventing truncation of unused qubits if the only instruction defined on them was a barrier.

* Disables gate fusion for the matrix product state simulation method as this was causing issues with incorrect results being returned in some cases.

* Fix error in gate time unit conversion for device noise model with thermal relaxation errors and gate errors. The error probability the depolarizing error was being calculated with gate time in microseconds, while for thermal relaxation it was being calculated in nanoseconds. This resulted in no depolarizing error being applied as the incorrect units would make the device seem to be coherence limited.

* Fix bug in incorrect composition of QuantumErrors when the qubits of composed instructions differ.

* Fix issue where the “diagonal” gate is checked to be unitary with too high a tolerance. This was causing diagonals generated from Numpy functions to often fail the test.

* Fix remove-barrier circuit optimization pass to be applied before qubit trucation. This fixes an issue where barriers inserted by the Terra transpiler across otherwise inactive qubits would prevent them from being truncated.

<span id="id491" />

### Ignis 0.3.0

No Change

<span id="aqua-0-6-6" />

### Aqua 0.6.6

No Change

<span id="ibm-q-provider-0-6-1" />

### IBM Q Provider 0.6.1

No Change

<span id="qiskit-0-18-0" />
<span id="qiskit-0-17-0" />
Loading

0 comments on commit b270d49

Please sign in to comment.