Qiskit SDK 1.4 release notes
1.4.5
Prelude
Qiskit v1.4.5 is the last bugfix release in the 1.4 series and marks the end-of-life of the series. Support for security fixes in the 1.4 series will be continued until March 31st, 2026.
Bug Fixes
-
Fixed the handling of anonymous bits in circuit visualization. Previously, bits that were not associated to a register would be displayed with the default Python representation, whereas now they show the index in a readable fashion. Fixed #14031.
-
Fixed an issue in the
Optimize1qGatesDecompositionwhen the pass was initialized with aTargetthat contains 1q gates with fixed angle parameters. Previously, the pass would potentially output gates outside the target as it wasn’t checking that the gate in the target supported arbitrary parameter values. Fixed #14743. -
Fixed incorrect behavior in the
BasisTranslatorpass where a multi-qubit gate within aControlFlowOpblock would track the supported operation with its local qubit indices instead of using the absolute indices of the outer circuit. Fixed #13728. -
Fixed a bug in
HighLevelSynthesis, where custom gate calibrations were not recognized if the gate appeared nested inside other instruction objects. Partially fixed #13728. -
Fixed a failure in the circuit text drawer, which could occur when circuit blocks inside control flow operations were defined on different registers than the outer circuit. This situation could for example happen when appending
ControlFlowOpoperations directly, or for circuits after transpilation.
1.4.4
Prelude
Qiskit v1.4.4 is a minor bugfix release for the v1.4.x release series.
Bug Fixes
-
ApplyLayoutwill now correctly handle the case of applying a zero-qubitLayout. Previously, it would claim that no layout had been set, even if the"layout"field of thePropertySetwas equal toLayout(). -
Fixed a bug in method
QuantumCircuit.assign_parameters()that resulted in an error with string inputs and argumentstrict=False. Refer to #13933 for more details. -
Fixed the
nameattribute of theOrGateclass so that it now is set to"or"to uniquely identify this gate. It was previously incorrectly set to"and"which made it impossible to distinguish it fromAndGateor have synthesis plugins to synthesize anOrGate. Fixed #14434 -
Fixed a bug in the
ElidePermutationstranspiler pass, where the qubit mapping was not updated correctly in the presence ofPermutationGates, leading to incorrect circuits and updates to the pass manager’s property set. -
Fixed a bug in the
PauliEvolutionSynthesisDefaultandPauliEvolutionSynthesisRustiqplugins that modified the.synthesisattribute of the original circuit when settingpreserve_order=False. The behavior of the plugins has been restored and the original circuit is now preserved throughout the transpilation pipeline. -
Fixed a correctness bug when exporting circuits with delay instructions using
'ps'units to QASM3. -
Fixed a compatibility issue with the minimum supported version of rustworkx, 0.15. With certain inputs the
VF2LayoutandVF2PostLayoutwere previously using a rustworkx method that was added in rustworkx 0.16.0 which would cause an error when using an older rustworkx release which is listed as supported. -
SabreLayoutandSabreSwapwill no longer panic when applying the routing result to a circuit that usesexpr.Varobjects in a nested control-flow scope. -
The circuit library function
quantum_volume()was updated to handle anumpy.random.Generatoras input for itsseedargument. Previously, such a generator argument would result in aTypeError. -
Fixed a bug in circuit library functions
evolved_operator_ansatz(),qaoa_ansatz()andhamiltonian_variational_ansatz(), where the parameters had a zero complex component. This mostly was no issue, unless translated to SymPy using theParameterExpression.sympify()method, which would then raise an error.
1.4.3
Prelude
Qiskit v1.4.3 is a minor bugfix release for the v1.4.x release series.
Bug Fixes
-
Fixed a bug in
DAGCircuitthat would cause outputVarnodes to become input nodes duringdeepcopyand pickling. -
Fixed a problem in
BasisTranslatortranspiler pass, where the global phase of the DAG was not updated correctly. Fixed #14074. -
Fixed a bug in QPY (
qiskit.qpy) where circuits containing gates of classMCMTGatewould fail to serialize. See #13965. -
SabreLayoutwill now correctly propagate a circuit’snameandmetadatafields when performing as a joint layout and routing pass. -
Fixed a problem in the
SolovayKitaevSynthesisunitary synthesis plugin, where repeatedly running the plugin with different basis gates incorrectly reused the basis gates from the first run only. The problem was due to ignoring the basis gates when caching basic approximations, and is now fixed. -
Fixed a problem in the
SolovayKitaevtranspiler pass where the pass could crash due to encountering a 180 degree rotation in the internal recursion, which was not handled correctly. -
Fixed a problem in the
SolovayKitaevtranspiler pass where the generated approximation could have a phase that differs by from the correct value. This resulted due to the internal representation, which requires additional handling to obtain the correct sign of the qubit gate matrix. Fixed #9552 -
The fallback error heuristic in
VF2LayoutandVF2PostLayout, used when there were no reported error rates, could previously assign errors greater than one, and have unpredictable effects on the resulting layout scores.
1.4.2
Prelude
Qiskit 1.4.2 is a patch release that fixes bugs found in the 1.4 release series.
New Features
- Added a new flag
trust_payload, to theqpy.load()function. This is used to force the function to load a payload that is potentially insecure. If the payload containsScheduleBlockobjects (either standalone or as part ofQuantumCircuit.calibrations) and the symbolic encoding in the QPY file is set tosympythen the payload is potentially insecure and loading it could allow for arbitrary code execution. Since this flag is for controlling the deserialization ofScheduleBlockinstances which do not exist in Qiskit >= 2.0.0 this flag will only exist in Qiskit 1.4.x and will not exist in Qiskit >=2.0.0.
Upgrade Notes
- By default,
qpy.loadwill now raise aQpyErrorwhen called with a QPY payload that contains aScheduleBlockobject (either standalone or as part ofQuantumCircuit.calibrations) which is usingsympyfor encoding symbolic expressions. This is because the payload is potentially vulnerable and should only be loaded if you trust the contents. If you are certain that the payload is not malicious, you can set the newtrust_payloadargument ofqpy.loadtoTrue, and this will enable loading the payload.
Security Issues
- Fixed a security vulnerability in
qpy.load()when loading payloads that usesympyto serializeParameterExpressionobjects and other symbolic expressions. This potentially includes any QPY payload using QPY version < 10, and optionally 10, 11, and 12 depending on the symbolic encoding used in the serialization step (qpy.dump()).
Bug Fixes
- Fixed a bug in the basis approximation generation for
SolovayKitaev. Previously, generating discrete basis approximations usinggenerate_basis_approximationsfor a basis containing"sx"or"sxdg"gates would fail. This has now been fixed.
1.4.1
Prelude
Qiskit 1.4.1 is a small patch release, fixing some bugs found in the 1.4 extended support series.
Bug Fixes
-
Circuits compiled using a preset passmanager constructed by
generate_preset_pass_manager()will now correctly retain theirnameattribute, as they do withtranspile(). -
Fixed an issue with QPY 13 when serializing or deserializing a
ParameterExpressionobject that was defined by callingParameterExpression.subs()to substitute aParameterwith aParameterExpression. For example:from qiskit.circuit import Parameter a = Parameter("A") b = Parameter("B") expr = a + b c = Parameter("C") new_expr = c ** 3.14 final_expr.subs({b: new_expr})In previous releases if you went to serialize a
QuantumCircuitthat contained an expression like this withqpy.dump()it would have raised anAttributeErrorwith an error message ‘ParameterExpression’ object has no attribute ‘name’ when using QPY 13 (the default). This has been fixed so that the exception is no longer raised and you can serialize and deserialize a payload containing these nestedParameterExpressionobjects. See #13879.
1.4.0
Prelude
The Qiskit v1.4 release is the final minor version release for the v1.x series. This release contains minimal features, and primarily adds new deprecation warnings for API changes coming in the future major version release v2.0. It is fully compatible with the Qiskit v1.3.x releases. It is strongly recommended that you upgrade from v1.3.x to v1.4 so that you’re able to see the warnings about which interfaces will change with Qiskit v2.0. The v1.4.x release series will continue to be supported and receive bugfixes for 6 months and security fixes for 1 year after this release. The fixes will take place via patch releases. For more details on the release schedule and support cycle see: qiskit-sdk-version-strategy which documents the release schedule in more detail.
Circuits Features
- Added a new method,
QuantumCircuit.estimate_duration(), to compute the estimated duration of a scheduled circuit output from thetranspiler. This should be used if you need an estimate of the full circuit duration instead of the deprecatedQuantumCircuit.durationattribute.
Circuits Deprecations
-
Subclassing
RegisterorBit, or any subclass of them (for example,QuantumRegisterorQubit) is deprecated as of Qiskit v1.4. Subclassing these types was never explicitly supported by Qiskit, and its meaning was never defined. In Qiskit v2.0, the subclassing may become impossible due to technical limitations, and will certainly not be stored in a circuit. This is due to the move of the data model to the Rust space to improve performance. -
The
dagoptional parameter in the constructor ofDAGNodesubclasses (namelyDAGOpNode), which has been unused and ignored since Qiskit v1.2, is now deprecated as of Qiskit v1.4 and will be removed in Qiskit v2.0. -
The Multiple-Control-Multiple-Target (MCMT) class in
MCMTis now deprecated and replaced byMCMTGate, which is a properGatesubclass. Using a gate instead of a circuit allows the compiler to reason about the object at a higher level of abstraction and unlocks the use of multiple synthesis plugins. -
The
qiskit.circuit.classicalfunctionmodule, and with it theClassicalFunctionclass and its relatedclassical_function()andBooleanExpressionutilities, have been deprecated as of Qiskit v1.4 and will be removed in Qiskit v2.0.This change is performed to avoid a dependency on the external library
tweedledum, which is no longer compatible with all of Qiskit’s supported platforms and Python versions. For a similar functionality please use thePhaseOraclewhich is going to have an implementation that doesn’t usetweedledum, and theBitFlipOraclewhich will be added in Qiskit v2.0.Until
BitFlipOracleis added, a phase-flip oracle can be converted to a bit-flip oracle by conditioning it on the result qubit, and applying Hadamard gates before and after the application of the oracle, as in the following example (where the oracle is onqr_xand the result is onqr_y):from qiskit import QuantumRegister, QuantumCircuit from qiskit.circuit.library.phase_oracle import PhaseOracle bool_expr = "(x0 & x1 | ~x2) & x4" qr_x = QuantumRegister(4, "x") qr_y = QuantumRegister(1, "y") bit_flip_oracle = QuantumCircuit(qr_x, qr_y) phase_flip_oracle = PhaseOracle(bool_expr) controlled_phase_flip_oracle = phase_flip_oracle.control(1) bit_flip_oracle.h(qr_y) bit_flip_oracle.compose(controlled_phase_flip_oracle, qubits=[*qr_y, *qr_x], inplace=True) bit_flip_oracle.h(qr_y) print(bit_flip_oracle)Which results in
┌───────────────┐ x_0: ─────┤0 ├───── │ │ x_1: ─────┤1 ├───── │ Phase Oracle │ x_2: ─────┤2 ├───── │ │ x_3: ─────┤3 ├───── ┌───┐└───────┬───────┘┌───┐ y: ┤ H ├────────■────────┤ H ├ └───┘ └───┘
Primitives Deprecations
- Providing inputs of type
BackendV1to thebackendargument ofBackendSamplerV2andBackendEstimatorV2is deprecated as of Qiskit 1.4 and will be removed in Qiskit 2.0. Use an instance ofBackendV2instead.
Providers Deprecations
-
The
BackendV2Converterclass andconvert_to_target()functions have been deprecated in Qiskit v1.4 following the deprecation ofBackendV1. Theconvert_to_target()function is used to build aTargetinstance from a series of objects from the deprecatedBackendV1workflow:BackendConfiguration,BackendPropertiesandPulseDefaults.BackendV2Converteris used for convertingBackendV1toBackendV2, and cannot be maintained onceBackendV1is removed. -
The
BasicSimulator.run_experiment()method has been deprecated and will be removed in Qiskit v2.0. The method takes aQasmQobjExperimentas input argument, which has been deprecated together with theQobjclass and other related functionality. You can callBasicSimulator.run()with aQuantumCircuitinput instead. -
The error types
BackendPropertyErrorandBackendConfigurationErrorhave been deprecated in Qiskit 1.4 and will be removed in Qiskit 2.0. These errors are only used when retrieving items from the deprecatedBackendPropertiesandBackendConfigurationobjects. -
The classes
GateProperties,BackendStatus, andqiskit.providers.models.JobStatus, which are part of the legacyBackendV1workflow, are now deprecated. These should have been deprecated in Qiskit 1.2 together with the related elements inqiskit.providers.models.
Synthesis Deprecations
-
The signature of the argument
atomic_evolutionin the constructor of the classesLieTrotter,ProductFormula, andSuzukiTrotterwas modified in Qiskit v1.2 to improve the visualization of the output circuit. The older signature has now been deprecated in favor of the new alternative. From Qiskit v2.0, only the new alternative will be valid.To migrate, please modify the callable from
Callable[[Pauli | SparsePauliOp, float], QuantumCircuit]toCallable[[QuantumCircuit, Pauli | SparsePauliOp, float], None].
Transpiler Deprecations
-
The
DAGOpNode.sort_key,DAGOutNode.sort_key, andDAGInNode.sort_keyattributes have been deprecated and will be removed in the Qiskit v2.0 release. These attributes were originally used as a lexicographical key for topological sorting nodes in aDAGCircuit. However, the key is no longer used for this as the sorting is done internally in Rust code now. If you’re using this attribute, you can recreate the key from the other attributes of a node. For example, you can use a function like:def get_sort_key(node: DAGNode): if isinstance(node, (DAGInNode, DAGOutNode)): return str(node.wire) return ",".join( f"{dag.find_bit(q).index:04d}" for q in itertools.chain(node.qargs, node.cargs) )which will generate a string like the sort key does.
-
The following uses of the
BackendPropertiesobject in the transpilation pipeline have been deprecated as of Qiskit v1.4 and will be removed in Qiskit v2.0:backend_propinput argument inDenseLayoutpropertiesinput argument inVF2Layoutpropertiesandcoupling_mapinput arguments inVF2PostLayout. Note thatcoupling_mapwas only used in the presence ofproperties.backend_propsinput argument inUnitarySynthesisbackend_propertiesinput argument inPassManagerConfigbackend_propertiesinTarget.from_configuration()backend_propertiesingenerate_routing_passmanager()backend_propertiesingenerate_translation_passmanager()
The
BackendPropertiesclass has been deprecated since Qiskit v1.2, together with other elements from theBackendV1workflow, and will be removed in Qiskit v2.0. The alternative path for communicating hardware information to the transpilation argument is theTargetclass, which can be set using thetargetinput argument. Specific instruction properties such as gate errors or durations can be added to aTargetupon construction through theTarget.add_instruction()method.In the case of
generate_routing_passmanager()andgenerate_translation_passmanager(), thebackend_propertiesargument is optional and is superseded when the requiredtargetargument is populated. Usage of the argument can safely be removed in 1.x as long as you were passing in a target, which was the recommended use. -
The Pulse deprecation in Qiskit v1.3, included calibration builder passes such as
RXCalibrationBuilder. TheNormalizeRXAnglepass is a requirement ofRXCalibrationBuilder; hence, it is being deprecated in Qiskit v1.4. Therzx_templates()function in the calibration module is also being deprecated as it is not used in our codebase.
Visualization Deprecations
-
The parameters
show_idleandshow_barrierin the timeline drawers are deprecated as of Qiskit v1.4. The alternatives are, respectively, theidle_wiresandplot_barriersparameters, introduced in Qiskit v1.1, which are fully equivalent. The legacy parameter names will be removed in Qiskit v2.0. -
In Qiskit v1.4, the timeline drawer
timeline_drawer()function will issue a deprecation warning if atargetis not specified to get the duration of instructions. From Qiskit v2.0 on,targetwill be required andtimeline_drawer()will fail if it is not specified. -
Providing inputs of type
BackendV1to thebackendargument ofplot_gate_map(),plot_circuit_layout(), andplot_error_map()are deprecated as of Qiskit 1.4 and will be removed in Qiskit 2.0. Use an instance ofBackendV2instead.
Misc. Deprecations
- The use of positional arguments in the constructor of
Resultis deprecated as of Qiskit 1.4, and will be disabled in Qiskit 2.0. Please set all arguments using kwarg syntax, i.e:Result(backend_name="name", ....). In addition to this, theqobj_idargument is deprecated and will no longer be used in Qiskit 2.0. It will, however, still be possible to setqobj_idas a generic kwarg, which will land in the metadata field with the other generic kwargs.
Bug Fixes
- Fixed an issue in
Target.has_calibration()andTarget.get_calibration()where passing a parameterized Gate didn’t work as expected. Refer to qiskit/#11657 and qiskit/#11658 for more information.
Other Notes
-
Passing
property_setas an arbitrary keyword argument to therun()method of a subclass ofBasePassManagerwill change behavior in Qiskit v2.0. It is currently forwarded to the internal representation converting functions of the pass manager, as is any arbitrary keyword argument to that method. Starting from Qiskit v2.0, the option will instead be used to set the seed of thePropertySetfor the pipeline run, and the argument will not be passed to the conversion functions.This note only concerns implementers of subclasses of
BasePassManagerwho have chosen their_passmanager_frontendand_passmanager_backendimplementations to accept a keyword argument calledproperty_set.