Skip to content

Qiskit Circuit Library deprecations #231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
woodsp-ibm opened this issue May 27, 2025 · 0 comments
Open

Qiskit Circuit Library deprecations #231

woodsp-ibm opened this issue May 27, 2025 · 0 comments

Comments

@woodsp-ibm
Copy link
Member

woodsp-ibm commented May 27, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant