Skip to content

Qiskit Circuit Library deprecations #231

@woodsp-ibm

Description

@woodsp-ibm

There are circuit library classes from qiskit used in algorithms, which were based on a BlueprintCircuit base class that provided more a template capability where for instance number of qubits could be changed. These classes are now deprecated (since 1.3) and are replaced by functions that build out the circuit but where the circuit is now fixed at construction time.

E.g for circuit library RealAmplitudes anstaz

    @deprecate_func(
        since="1.3",
        additional_msg="Use the function qiskit.circuit.library.real_amplitudes instead.",
        pending=True,
    )

As such code that attempts to set the number of qubits (Such as VQE and VQD try to do for the anzsatz) would not have the possibility now to work with such circuits. The attempt to change/check should stay but we should add deprecation message saying this adjustment is deprecated, should it succeed, as circuits based on BlueprintCircuit that can do this are themselves deprecated and in the future, when such circuits are removed from Qiskit it will not be possible to set num_qubits at all any more.

This affects main code, unit tests and tutorials where uses of these classes should be replaced by the new function equivalent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions