Qiskit Terra 0.20.2 is a bugfix release, addressing some minor issues identified since the last patch release.
Fixed an issue with
BackendV2-based fake backend classes from the
qiskit.providers.fake_providermodule such as
FakeMontrealV2, where the values for the
dtattributes and the associated attribute
Target.dtwould not be properly converted to seconds. This would cause issues when using these fake backends with scheduling. See #8018(opens in a new tab).
marginal_counts()will now succeed when asked to marginalize memory with an
indicesparameter containing non-zero elements. Previously, shots whose hexadecimal result representation was sufficiently small could raise a
ValueError. See #8044(opens in a new tab).
The OpenQASM 3 exporter (
qiskit.qasm3) will now output
outputdeclarations before gate declarations. This is more consistent with the current reference ANTLR grammar from the OpenQASM 3 team. See #7964(opens in a new tab).
Fixed a bug in the
RZXCalibrationBuildertranspiler pass where the scaled cross-resonance pulse amplitude could appear to be parametrized even after assignment. This could cause the pulse visualization tools to use the parametrized format instead of the expected numeric one. See #8031(opens in a new tab).
Fixed an issue with the
transpile()function when run with a
BackendV2-based backend and setting the
scheduling_methodkeyword argument. Previously, the function would not correctly process the default durations of the instructions supported by the backend which would lead to an error.
SabreSwaptranspiler pass, used in
routing_method="sabre"is set, will no longer sporadically drop classically conditioned gates and their successors from circuits during the routing phase of transpilation. See #8040(opens in a new tab).
Statevectorwill now allow direct iteration through its values (such as
for coefficient in statevector) and correctly report its length under
len. Previously it would try and and access out-of-bounds data and raise a
QiskitError. See #8039(opens in a new tab).
This is a bugfix release that primarily fixes a packaging issue that was causing the
docs/ directory, which contains the source files used to build the qiskit-ignis documentation, to get included in the Python package.
Qiskit Terra 0.20.1 is a bugfix release resolving issues identified in release 0.20.0.
QPY deserialization with the
qpy.load()function of a directly instantiated
UCPauliRotGateobject in a circuit will fail because the rotation axis argument to the class isn’t stored in a standard place. To workaround this you can instead use the subclasses:
UCRZGate(based on whether you’re using a rotation axis of
"Z"respectively) which embeds the rotation axis in the class constructor and will work correctly in QPY.
Since its original introduction in Qiskit Terra 0.20,
XXPlusYYGatehas used a negative angle convention compared to all other rotation gates. In Qiskit Terra 0.21, this will be corrected to be consistent with the other rotation gates. This does not affect any other rotation gates, nor
Fixed an issue where the
eval_observables()function would raise an error if its
quantum_stateargument was of type
eval_observablesnow correctly supports all input types denoted by its type hints.
Fixed an issue with the visualization function
DAGCircuit.draw()where previously the drawer would fail when attempting to generate a visualization for a
DAGCircuitobject that contained a
Clbitwhich wasn’t part of a
ClassicalRegister. Fixed #7915(opens in a new tab).
Fixed parameter validation for class
Drag. Previously, it was not sensitive to large beta values with negative signs, which may have resulted in waveform samples with a maximum value exceeding the amplitude limit of 1.0.
QuantumInstanceclass used by many algorithms (like
VQE) was hard-coding the value for a sleep while it looped waiting for the job status to be updated. It now respects the configured sleep value as set per the
waitattribute in the initializer of
Fixed an issue with the
plot_error_mapvisualization function which prevented it from working when run with a backend that had readout error defined in the provided backend’s
BackendPropertiesor when running with a
BackendV2backend. Fixed #7879(opens in a new tab).
Fixed a bug that could result in exponential runtime and nontermination when a
Pauliinstance is given to method
SabreSwap, and by extension
optimization_level=3, occasionally re-ordering measurements invalidly. Previously, if two measurements wrote to the same classical bit,
SabreSwapcould (depending on the coupling map) re-order them to produce a non-equivalent circuit. This behaviour was stochastic, so may not have appeared reliably. Fixed #7950(opens in a new tab)
SabreSwaptranspiler pass, and by extension
optimization_level=3, now has an escape mechanism to guarantee that it can never get stuck in an infinite loop. Certain inputs previously could, with a great amount of bad luck, get stuck in a stable local minimum of the search space and the pass would never make further progress. It will now force a series of swaps that allow the routing to continue if it detects it has not made progress recently. Fixed #7707(opens in a new tab).
Fixed an issue with QPY deserialization via the
qpy.load()function of the
UCRZGateclasses. Previously, a QPY file that contained any of these gates would error when trying to load the file. Fixed #7847(opens in a new tab).
- PR #1129(opens in a new tab) updates
least_busy()method to no longer support BaseBackend as a valid input or output type since it has been long deprecated in qiskit-terra and has recently been removed.
- Qiskit Aer is no longer compiled with unsafe floating-point optimisations. While most of the effects should have been localised to Qiskit Aer, some aspects of subnormal handling may previously have been leaked into user code by the library incorrectly setting the “flush to zero” mode. This will not happen any more.
Fix cache blocking transpiler to recognize superop to be cache blocked. This is fix for issue 1479 <https://github.com/Qiskit/qiskit-aer/issues/1479(opens in a new tab)> now density_matrix with noise models can be parallelized. New test, test_noise.TestNoise.test_kraus_gate_noise_on_QFT_cache_blocking is added to verify this issue. Also this fix include fix for issue 1483 <https://github.com/Qiskit/qiskit-aer/issues/1483(opens in a new tab)> discovered by adding new test case. This fixes measure over chunks for statevector.
Fixes a bug in
NoiseModel.from_backend()that raised an error when T2 value greater than 2 * T1 was supplied by the backend. After this fix, it becomes to truncate T2 value up to 2 * T1 and issue a user warning if truncates. The bug was introduced at #1391 and, before that,
NoiseModel.from_backend()had truncated the T2 value up to 2 * T1 silently.
See Issue 1464(opens in a new tab) for details.
device=Thrust was very slow for small number of qubits because OpenMP threading was always applied. This fix applies OpenMP threads as same as device=CPU by using statevector_parallel_threshold.
Qiskit Aer will no longer set the floating-point mode to “flush to zero” when loaded. Downstream users may previously have seen warnings from Numpy such as:
The value of the smallest subnormal for <class ‘numpy.float64’> type is zero.
These will now no longer be emitted, and the floating-point handling will be correct.
Fixed a potential issue with running simulations on circuits that have the
QuantumCircuit.metadataattribute set. The
metadataattribute can be any python dictionary and previously qiskit-aer would attempt to JSON serialize the contents of the attribute to process it with the rest of the rest of the circuit input, even if the contents were not JSON serializable. This no longer occurs as the
QuantumCircuit.metadataattribute is not used to run the simulation so now the contents are no serialized and instead are directly attached to the
qiskit.result.Resultobject without attempting to JSON serialize the contents. Fixed #1435(opens in a new tab)
- The qiskit-ibmq-provider package now supports IBM Quantum LiveData features. These features allow users to observe the real-time behavior of IBM Quantum backends while executing jobs. Specifically, the provider now includes a new tab in the backend Jupyter-related widget and supports the execution of jobs (via
qiskit.providers.ibmq.IBMQBackend.run()method) with the live_data_enabled=True parameter in allowed IBM Quantum backends.
- You can now specify a different logging level in the
optionskeyword when submitting a Qiskit Runtime job with the
- Python 3.6 support has been dropped since it has reached end of life in Dec 2021.
- qiskit.providers.ibmq.random, the random number service which was used to access the CQC randomness extractor is no longer supported and has been removed.
imagekeyword in the
qiskit.providers.ibmq.runtime.IBMRuntimeService.run()method is deprecated. You should instead specify the image to use in the
- Fixes issue #190(opens in a new tab). Now
qiskit.providers.ibmq.runtime.RuntimeDecoderhave been updated to handle instances of the Instruction class.
- Fixes issue #74(opens in a new tab) where numpy ndarrays with object types could not be serialized.
qiskit.providers.ibmq.runtime.RuntimeDecoderhave been updated to handle these ndarrays.