From 618770367f7a5a3a22fd43ea9fcfb7f17393eb6a Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 13 Oct 2022 14:31:51 -0400 Subject: [PATCH] Prepare 0.22.0 release (#8868) * Prepare 0.22.0 release This commit prepares the 0.22.0 release, this involves 2 steps first changing all the version numbers to 0.22.0 from 0.22.0rc1 and secondly migrating the release notes to a standalone directory for 0.22.0 (this was already done on main as part of #8850 but not on the stable branch). * Start updating release note * Finish first pass over feature release notes * Fix typo * Update upgrade and deprecation notes * Remove release notes for already release bug fixes * Update bugfix release notes * Fix typo * Apply suggestions from code review Co-authored-by: Julien Gacon * Move and update new release notes * Fix up typos in release notes Co-authored-by: Julien Gacon Co-authored-by: Jake Lishman --- qiskit/VERSION.txt | 2 +- qiskit/circuit/__init__.py | 1 + qiskit/circuit/library/__init__.py | 3 + qiskit/pulse/channels.py | 5 ++ qiskit/transpiler/passes/__init__.py | 9 +++ ...parsepauliop-methods-00a7e6cc7055e1d0.yaml | 15 ----- .../fix-marginal_counts-on-pulse-backend.yaml | 10 ---- ...-hard-time-limit-vf2-be83830ecc71f72c.yaml | 25 -------- .../adapt-vqe-0f71234cb6ec92f8.yaml | 8 +-- ...ackend-custom-passes-cddfd05c8704a4b1.yaml | 8 ++- .../add-barrier-label-8e677979cb37461e.yaml | 19 ++++++ ...cz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml | 6 ++ ...vers-with-primitives-8b3a9f55f5fd285f.yaml | 27 +++++---- ...interface-primitives-dc543d079ecaa8dd.yaml | 12 ++-- ...ents-with-primitives-561cf9cf75a7ccb8.yaml | 34 +++++++++++ ...dd-grover-primitives-10f81efdba93703d.yaml | 24 ++++++++ ...-pulse-drawer-option-936b6d943de9a270.yaml | 20 +++++++ ...-simplification-pass-82377d80dd0081fd.yaml | 25 ++++++++ ...-entanglement-nlocal-38581e4ffb7a7c68.yaml | 17 ++++++ ...-sampler-error-check-38426fb186db44d4.yaml | 5 ++ ...-reference-mechanism-8a7811e17b4fead3.yaml | 5 +- ...parsepauliop-methods-00a7e6cc7055e1d0.yaml | 16 +++++ ...ire-order-to-drawers-657cb54e365c621a.yaml | 21 +++++++ ...l_class_cs_ccz_gates-6bd567daf3a467bd.yaml | 17 ++++++ ...lgorithms-primitives-497bae1b2b04f877.yaml | 19 ++++++ .../backend-converter-05360f12f9042829.yaml | 3 +- .../base-operators-sums-d331e78a9fa4b5d8.yaml | 6 ++ ...n-tweedledum-removal-25bb68fc72804f00.yaml | 2 +- ...to-if_else-converter-2d48046de31814a8.yaml | 2 +- ...prepare-single-qubit-e25dacc8f873bc01.yaml | 0 ...inverse-cancellation-a10e72d8e42ac74b.yaml | 15 ++--- ...compose-meas-no-meas-492ce91167d54154.yaml | 6 +- ...dition-in-while-loop-d6be0d6d6a1429da.yaml | 0 ...trol-flow-depth-size-b598a4eb9d8888eb.yaml | 15 ++--- ...g_dependency_speedup-f6298348cb3d8746.yaml | 0 ...nselayout-loose-bits-3e66011432bc6232.yaml | 0 ...-solvers-factorizers-bbf5302484cb6831.yaml | 0 ...ate-stabilizer-table-9efd08c7de1a5b4d.yaml | 15 +++++ ...ted-pulse-deprecator-394ec75079441cda.yaml | 0 .../0.22/edge-coloring-e55700fcf8902c79.yaml | 7 +++ ...framework-primitives-c86779b5d0dffd25.yaml | 19 ++++++ .../notes/0.22/fake_auckland-deadbeef.yaml | 14 +++++ ...om_circuit-transpile-5c056968ee40025e.yaml | 0 .../fix-decomp-1q-1c-84f369f9a897a5b7.yaml | 0 ...ring-pauli-list-init-4d978fb0eaf1bc70.yaml | 2 +- ...fix-flipping-cz-gate-fd08305ca12d9a79.yaml | 6 ++ ...fix-gradient-wrapper-2f9ab45941739044.yaml | 6 ++ ...x-idle-wires-display-de0ecc60d4000ca0.yaml | 4 +- ...tex-split-filesystem-0c38a1ade2f36e85.yaml | 8 +++ ...ted-flow-controllers-a2a5f03eed482fa2.yaml | 0 ...nistic-dagcircuit-eq-7caa9041093c6e4c.yaml | 0 ...-identity-as-unitary-aa2feeb05707a597.yaml | 0 ...-flow-representation-09520e2838f0657e.yaml | 14 +++-- ...t-drawer-compression-a80a5636957e8eec.yaml | 0 ...ary-synth-1q-circuit-756ad4ed209a313f.yaml | 0 .../notes/0.22/fix_8438-159e67ecb6765d08.yaml | 7 +++ ...ate-direction-target-a9f0acd0cf30ed66.yaml | 0 ...ts_two_step_tapering-f481a8cac3990cd5.yaml | 10 ++++ ...auli-evolve-clifford-d714b2eee475334b.yaml | 7 +++ ...obfit-missing-bounds-748943a87e682d82.yaml | 9 +++ ...classical-io-channel-0a616e6ca75b7687.yaml | 22 +++++++ ...e-of-callback-in-vqd-99e3c85f03181298.yaml | 8 +++ ...arallel-rusty-sabres-32bc93f79ae48a1f.yaml | 0 ...ng_with_reverse_bits-b47cb1e357201593.yaml | 0 ...able-eval-primitives-e1fd989e15c7760c.yaml | 14 +++++ ...-abstract-base-class-c5efe020aa9caf46.yaml | 25 +++----- .../operator-parameters-c81b7c05bffb740b.yaml | 9 +-- .../plot-hist-797bfaeea2156c53.yaml | 17 ++++-- ...high-level-synthesis-3af9976b22e012d9.yaml | 0 .../0.22/prepare-0.22-118e15de86d36072.yaml | 59 +++++++++++++++++++ .../0.22/primitive-run-5d1afab3655330a6.yaml | 46 +++++++++++++++ ...imitive-shots-option-ed320872d048483e.yaml | 0 ...imitives-run_options-eb4a360c3f1e197d.yaml | 7 +++ ...-dynamics-primitives-6003336d0866ca19.yaml | 9 +-- ...ditional-measurement-2d938cad74a9024a.yaml | 0 .../qiskit-nature-797-8f1b0975309b8756.yaml | 7 +++ ...qiskit.pulse.builder-ddefe88dca5765b9.yaml | 0 ...spsa-primitification-29a9dcae055bf2b4.yaml | 14 +++++ ...lgorithms-primitives-3605bdfa5ab1bfef.yaml | 26 ++++---- .../rabre-rwap-ae51631bec7450df.yaml | 3 +- .../register-add-fix-e29fa2ee47aa6d05.yaml | 0 ...ted-methods-in-pauli-c874d463ba1f7a0e.yaml | 12 ++++ ...e-pulse-defs-old-20q-4ed46085b4a15678.yaml | 0 ...lic-pulse-subclasses-77314a1654521852.yaml | 9 +-- ...ove_QiskitIndexError-098fa04f0afe440b.yaml | 0 ...ers_L_BFGS_B_epsilon-03f997aff50c394c.yaml | 9 +++ ...1_state_to_latex_fix-e36e47cbdb25033e.yaml | 0 .../sabres-for-everyone-3148ccf2064ccb0d.yaml | 6 +- .../0.22/sampled_expval-85e300e0fb5fa5ea.yaml | 9 +++ ...ampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml | 2 + ...rse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml | 5 ++ ...age-plugin-interface-47daae40f7d0ad3c.yaml | 0 ...te_to_latex_for_none-da834de3811640ce.yaml | 0 ...steppable-optimizers-9d9b48ba78bd58bb.yaml | 24 +++----- ...ed-to-StandardScaler-43d24a7918e96c14.yaml | 0 ...nsored-subset-fitter-bd28e6e6ec5bdaae.yaml | 0 ...nspiler-control-flow-708896bfdb51961d.yaml | 0 ...tter-qrte-primitives-8b3e495738b57fc3.yaml | 9 +++ ...rn-off-approx-degree-df3d39eb69f7f09f.yaml | 2 +- ...titute_node_with_dag-3a44d16b1a82df41.yaml | 0 ...pdate-bfgs-optimizer-29b4ffa6724fbf38.yaml | 0 .../update-prob-quasi-2044285a46219d14.yaml | 4 +- ...ilder_skip_direct_cx-d0beff9b2b86ab8d.yaml | 17 ++++++ ...ation-reorganisation-9e302239705c7842.yaml | 0 ...-estimator-primitive-7cbcc462ad4dc593.yaml | 1 + .../add-backend-sampler-dcee9d4db17d5956.yaml | 18 ------ .../add-barrier-label-8e677979cb37461e.yaml | 18 ------ ...cz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml | 5 -- ...ents-with-primitives-561cf9cf75a7ccb8.yaml | 16 ----- ...dd-grover-primitives-10f81efdba93703d.yaml | 27 --------- ...-pulse-drawer-option-936b6d943de9a270.yaml | 18 ------ ...-simplification-pass-82377d80dd0081fd.yaml | 10 ---- ...-entanglement-nlocal-38581e4ffb7a7c68.yaml | 9 --- ...-sampler-error-check-38426fb186db44d4.yaml | 6 -- ...ire-order-to-drawers-657cb54e365c621a.yaml | 20 ------- ...l_class_cs_ccz_gates-6bd567daf3a467bd.yaml | 6 -- ...lgorithms-primitives-497bae1b2b04f877.yaml | 18 ------ .../backend_name_fix-175e12b5cf902f99.yaml | 7 --- .../base-operators-sums-d331e78a9fa4b5d8.yaml | 5 -- ...inverse-global_phase-c9655c13c22e5cf4.yaml | 9 --- .../notes/decompose-fix-993f7242eaa69407.yaml | 4 -- ...ate-stabilizer-table-9efd08c7de1a5b4d.yaml | 13 ---- .../notes/edge-coloring-e55700fcf8902c79.yaml | 6 -- ...framework-primitives-c86779b5d0dffd25.yaml | 15 ----- .../notes/fake_auckland-deadbeef.yaml | 5 -- .../notes/fake_oslo-7bba98d7269f959b.yaml | 4 -- ...-control-flow-scopes-a8aad3b87efbe77c.yaml | 7 --- ...vedop-to-instruction-c90c4f1aa6b4232a.yaml | 18 ------ ...fix-flipping-cz-gate-fd08305ca12d9a79.yaml | 5 -- ...fix-gradient-wrapper-2f9ab45941739044.yaml | 7 --- ...tex-split-filesystem-0c38a1ade2f36e85.yaml | 7 --- ...ndices-marginal-dist-45889e49ba337d84.yaml | 7 --- ...vector-to-circuit-fn-02cb3424269fa733.yaml | 21 ------- ...x-optimizer-settings-881585bfa8130cb7.yaml | 15 ----- ...fix-paramexpr-isreal-8d20348b4ce6cbe7.yaml | 14 ----- ...ulse-limit_amplitude-72b8b501710fe3aa.yaml | 7 --- ...ledgate-open-control-35c8ccb4c7466f4c.yaml | 6 -- .../fix-zzmap-pairwise-5653395849fec454.yaml | 24 -------- .../notes/fix_8438-159e67ecb6765d08.yaml | 7 --- .../global-phase-ucgate-cd61355e314a3e64.yaml | 4 -- .../notes/ibm_geneva-34b848b0a49278dc.yaml | 4 -- .../notes/ibm_perth-5b1e9308dc302e2e.yaml | 5 -- ...ts_two_step_tapering-f481a8cac3990cd5.yaml | 5 -- ...auli-evolve-clifford-d714b2eee475334b.yaml | 5 -- ...obfit-missing-bounds-748943a87e682d82.yaml | 4 -- ...classical-io-channel-0a616e6ca75b7687.yaml | 13 ---- ...e-of-callback-in-vqd-99e3c85f03181298.yaml | 9 --- ...able-eval-primitives-e1fd989e15c7760c.yaml | 12 ---- ...recate-eigen-solvers-2a4068cc9f83fba2.yaml | 5 -- ...te-min-eigen-solvers-fa4341e1014e4df0.yaml | 6 -- ...rimitive-base-result-92808b069299c19e.yaml | 9 --- .../notes/primitive-run-5d1afab3655330a6.yaml | 38 ------------ ...imitives-run_options-eb4a360c3f1e197d.yaml | 6 -- .../qiskit-nature-797-8f1b0975309b8756.yaml | 6 -- ...spsa-primitification-29a9dcae055bf2b4.yaml | 16 ----- ...ted-methods-in-pauli-c874d463ba1f7a0e.yaml | 7 --- ...ers_L_BFGS_B_epsilon-03f997aff50c394c.yaml | 7 --- .../sampled_expval-85e300e0fb5fa5ea.yaml | 6 -- ...rse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml | 4 -- ...-in--fake-backend-v2-82f0650006495fbe.yaml | 7 --- .../taper-performance-6da355c04da5b648.yaml | 5 -- ...tter-qrte-primitives-8b3e495738b57fc3.yaml | 12 ---- ...ilder_skip_direct_cx-d0beff9b2b86ab8d.yaml | 22 ------- setup.py | 2 +- 164 files changed, 726 insertions(+), 782 deletions(-) delete mode 100644 releasenotes/notes/0.21/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml delete mode 100644 releasenotes/notes/0.21/fix-marginal_counts-on-pulse-backend.yaml delete mode 100644 releasenotes/notes/0.21/remove-hard-time-limit-vf2-be83830ecc71f72c.yaml rename releasenotes/notes/{ => 0.22}/adapt-vqe-0f71234cb6ec92f8.yaml (71%) rename releasenotes/notes/{ => 0.22}/add-backend-custom-passes-cddfd05c8704a4b1.yaml (72%) create mode 100644 releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml create mode 100644 releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml rename releasenotes/notes/{ => 0.22}/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml (56%) rename releasenotes/notes/{ => 0.22}/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml (58%) create mode 100644 releasenotes/notes/0.22/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml create mode 100644 releasenotes/notes/0.22/add-grover-primitives-10f81efdba93703d.yaml create mode 100644 releasenotes/notes/0.22/add-pulse-drawer-option-936b6d943de9a270.yaml create mode 100644 releasenotes/notes/0.22/add-reset-simplification-pass-82377d80dd0081fd.yaml create mode 100644 releasenotes/notes/0.22/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml create mode 100644 releasenotes/notes/0.22/add-sampler-error-check-38426fb186db44d4.yaml rename releasenotes/notes/{ => 0.22}/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml (89%) create mode 100644 releasenotes/notes/0.22/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml create mode 100644 releasenotes/notes/0.22/add-wire-order-to-drawers-657cb54e365c621a.yaml create mode 100644 releasenotes/notes/0.22/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml create mode 100644 releasenotes/notes/0.22/ae-algorithms-primitives-497bae1b2b04f877.yaml rename releasenotes/notes/{ => 0.22}/backend-converter-05360f12f9042829.yaml (89%) create mode 100644 releasenotes/notes/0.22/base-operators-sums-d331e78a9fa4b5d8.yaml rename releasenotes/notes/{ => 0.22}/begin-tweedledum-removal-25bb68fc72804f00.yaml (93%) rename releasenotes/notes/{ => 0.22}/c_if-to-if_else-converter-2d48046de31814a8.yaml (81%) rename releasenotes/notes/{ => 0.22}/circuit-initialize-and-prepare-single-qubit-e25dacc8f873bc01.yaml (100%) rename releasenotes/notes/{ => 0.22}/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml (83%) rename releasenotes/notes/{ => 0.22}/compose-meas-no-meas-492ce91167d54154.yaml (66%) rename releasenotes/notes/{ => 0.22}/condition-in-while-loop-d6be0d6d6a1429da.yaml (100%) rename releasenotes/notes/{ => 0.22}/control-flow-depth-size-b598a4eb9d8888eb.yaml (59%) rename releasenotes/notes/{ => 0.22}/dag_dependency_speedup-f6298348cb3d8746.yaml (100%) rename releasenotes/notes/{ => 0.22}/denselayout-loose-bits-3e66011432bc6232.yaml (100%) rename releasenotes/notes/{ => 0.22}/deprecate-linear-solvers-factorizers-bbf5302484cb6831.yaml (100%) create mode 100644 releasenotes/notes/0.22/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml rename releasenotes/notes/{ => 0.22}/deprecated-pulse-deprecator-394ec75079441cda.yaml (100%) create mode 100644 releasenotes/notes/0.22/edge-coloring-e55700fcf8902c79.yaml create mode 100644 releasenotes/notes/0.22/evolution-framework-primitives-c86779b5d0dffd25.yaml create mode 100644 releasenotes/notes/0.22/fake_auckland-deadbeef.yaml rename releasenotes/notes/{ => 0.22}/fix-Opertor.from_circuit-transpile-5c056968ee40025e.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-decomp-1q-1c-84f369f9a897a5b7.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml (67%) create mode 100644 releasenotes/notes/0.22/fix-flipping-cz-gate-fd08305ca12d9a79.yaml create mode 100644 releasenotes/notes/0.22/fix-gradient-wrapper-2f9ab45941739044.yaml rename releasenotes/notes/{ => 0.22}/fix-idle-wires-display-de0ecc60d4000ca0.yaml (53%) create mode 100644 releasenotes/notes/0.22/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml rename releasenotes/notes/{ => 0.22}/fix-nested-flow-controllers-a2a5f03eed482fa2.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-nondeterministic-dagcircuit-eq-7caa9041093c6e4c.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-qasm2-identity-as-unitary-aa2feeb05707a597.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-target-control-flow-representation-09520e2838f0657e.yaml (92%) rename releasenotes/notes/{ => 0.22}/fix-text-drawer-compression-a80a5636957e8eec.yaml (100%) rename releasenotes/notes/{ => 0.22}/fix-unitary-synth-1q-circuit-756ad4ed209a313f.yaml (100%) create mode 100644 releasenotes/notes/0.22/fix_8438-159e67ecb6765d08.yaml rename releasenotes/notes/{ => 0.22}/gate-direction-target-a9f0acd0cf30ed66.yaml (100%) create mode 100644 releasenotes/notes/0.22/implements_two_step_tapering-f481a8cac3990cd5.yaml create mode 100644 releasenotes/notes/0.22/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml create mode 100644 releasenotes/notes/0.22/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml create mode 100644 releasenotes/notes/0.22/introduce-classical-io-channel-0a616e6ca75b7687.yaml create mode 100644 releasenotes/notes/0.22/make-use-of-callback-in-vqd-99e3c85f03181298.yaml rename releasenotes/notes/{ => 0.22}/multiple-parallel-rusty-sabres-32bc93f79ae48a1f.yaml (100%) rename releasenotes/notes/{ => 0.22}/no_warning_with_reverse_bits-b47cb1e357201593.yaml (100%) create mode 100644 releasenotes/notes/0.22/observable-eval-primitives-e1fd989e15c7760c.yaml rename releasenotes/notes/{ => 0.22}/operation-abstract-base-class-c5efe020aa9caf46.yaml (78%) rename releasenotes/notes/{ => 0.22}/operator-parameters-c81b7c05bffb740b.yaml (74%) rename releasenotes/notes/{ => 0.22}/plot-hist-797bfaeea2156c53.yaml (84%) rename releasenotes/notes/{ => 0.22}/pluggable-high-level-synthesis-3af9976b22e012d9.yaml (100%) create mode 100644 releasenotes/notes/0.22/prepare-0.22-118e15de86d36072.yaml create mode 100644 releasenotes/notes/0.22/primitive-run-5d1afab3655330a6.yaml rename releasenotes/notes/{ => 0.22}/primitive-shots-option-ed320872d048483e.yaml (100%) create mode 100644 releasenotes/notes/0.22/primitives-run_options-eb4a360c3f1e197d.yaml rename releasenotes/notes/{ => 0.22}/project-dynamics-primitives-6003336d0866ca19.yaml (83%) rename releasenotes/notes/{ => 0.22}/qasm3-fix-conditional-measurement-2d938cad74a9024a.yaml (100%) create mode 100644 releasenotes/notes/0.22/qiskit-nature-797-8f1b0975309b8756.yaml rename releasenotes/notes/{ => 0.22}/qiskit.pulse.builder-ddefe88dca5765b9.yaml (100%) create mode 100644 releasenotes/notes/0.22/qnspsa-primitification-29a9dcae055bf2b4.yaml rename releasenotes/notes/{ => 0.22}/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml (53%) rename releasenotes/notes/{ => 0.22}/rabre-rwap-ae51631bec7450df.yaml (90%) rename releasenotes/notes/{ => 0.22}/register-add-fix-e29fa2ee47aa6d05.yaml (100%) create mode 100644 releasenotes/notes/0.22/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml rename releasenotes/notes/{ => 0.22}/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml (100%) rename releasenotes/notes/{ => 0.22}/remove-symbolic-pulse-subclasses-77314a1654521852.yaml (83%) rename releasenotes/notes/{ => 0.22}/remove_QiskitIndexError-098fa04f0afe440b.yaml (100%) create mode 100644 releasenotes/notes/0.22/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml rename releasenotes/notes/{ => 0.22}/rh1_state_to_latex_fix-e36e47cbdb25033e.yaml (100%) rename releasenotes/notes/{ => 0.22}/sabres-for-everyone-3148ccf2064ccb0d.yaml (85%) create mode 100644 releasenotes/notes/0.22/sampled_expval-85e300e0fb5fa5ea.yaml rename releasenotes/notes/{ => 0.22}/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml (93%) create mode 100644 releasenotes/notes/0.22/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml rename releasenotes/notes/{ => 0.22}/stage-plugin-interface-47daae40f7d0ad3c.yaml (100%) rename releasenotes/notes/{ => 0.22}/state_to_latex_for_none-da834de3811640ce.yaml (100%) rename releasenotes/notes/{ => 0.22}/steppable-optimizers-9d9b48ba78bd58bb.yaml (81%) rename releasenotes/notes/{ => 0.22}/switched-to-StandardScaler-43d24a7918e96c14.yaml (100%) rename releasenotes/notes/{ => 0.22}/tensored-subset-fitter-bd28e6e6ec5bdaae.yaml (100%) rename releasenotes/notes/{ => 0.22}/transpiler-control-flow-708896bfdb51961d.yaml (100%) create mode 100644 releasenotes/notes/0.22/trotter-qrte-primitives-8b3e495738b57fc3.yaml rename releasenotes/notes/{ => 0.22}/turn-off-approx-degree-df3d39eb69f7f09f.yaml (90%) rename releasenotes/notes/{ => 0.22}/update-DAGCircuit.substitute_node_with_dag-3a44d16b1a82df41.yaml (100%) rename releasenotes/notes/{ => 0.22}/update-bfgs-optimizer-29b4ffa6724fbf38.yaml (100%) rename releasenotes/notes/{ => 0.22}/update-prob-quasi-2044285a46219d14.yaml (78%) create mode 100644 releasenotes/notes/0.22/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml rename releasenotes/notes/{ => 0.22}/visualization-reorganisation-9e302239705c7842.yaml (100%) rename releasenotes/notes/{ => 0.22}/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml (96%) delete mode 100644 releasenotes/notes/add-backend-sampler-dcee9d4db17d5956.yaml delete mode 100644 releasenotes/notes/add-barrier-label-8e677979cb37461e.yaml delete mode 100644 releasenotes/notes/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml delete mode 100644 releasenotes/notes/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml delete mode 100644 releasenotes/notes/add-grover-primitives-10f81efdba93703d.yaml delete mode 100644 releasenotes/notes/add-pulse-drawer-option-936b6d943de9a270.yaml delete mode 100644 releasenotes/notes/add-reset-simplification-pass-82377d80dd0081fd.yaml delete mode 100644 releasenotes/notes/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml delete mode 100644 releasenotes/notes/add-sampler-error-check-38426fb186db44d4.yaml delete mode 100644 releasenotes/notes/add-wire-order-to-drawers-657cb54e365c621a.yaml delete mode 100644 releasenotes/notes/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml delete mode 100644 releasenotes/notes/ae-algorithms-primitives-497bae1b2b04f877.yaml delete mode 100644 releasenotes/notes/backend_name_fix-175e12b5cf902f99.yaml delete mode 100644 releasenotes/notes/base-operators-sums-d331e78a9fa4b5d8.yaml delete mode 100644 releasenotes/notes/bugfix-ucgate-inverse-global_phase-c9655c13c22e5cf4.yaml delete mode 100644 releasenotes/notes/decompose-fix-993f7242eaa69407.yaml delete mode 100644 releasenotes/notes/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml delete mode 100644 releasenotes/notes/edge-coloring-e55700fcf8902c79.yaml delete mode 100644 releasenotes/notes/evolution-framework-primitives-c86779b5d0dffd25.yaml delete mode 100644 releasenotes/notes/fake_auckland-deadbeef.yaml delete mode 100644 releasenotes/notes/fake_oslo-7bba98d7269f959b.yaml delete mode 100644 releasenotes/notes/fix-QuantumCircuit.compose-in-control-flow-scopes-a8aad3b87efbe77c.yaml delete mode 100644 releasenotes/notes/fix-evolvedop-to-instruction-c90c4f1aa6b4232a.yaml delete mode 100644 releasenotes/notes/fix-flipping-cz-gate-fd08305ca12d9a79.yaml delete mode 100644 releasenotes/notes/fix-gradient-wrapper-2f9ab45941739044.yaml delete mode 100644 releasenotes/notes/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml delete mode 100644 releasenotes/notes/fix-numpy-indices-marginal-dist-45889e49ba337d84.yaml delete mode 100644 releasenotes/notes/fix-opflow-vector-to-circuit-fn-02cb3424269fa733.yaml delete mode 100644 releasenotes/notes/fix-optimizer-settings-881585bfa8130cb7.yaml delete mode 100644 releasenotes/notes/fix-paramexpr-isreal-8d20348b4ce6cbe7.yaml delete mode 100644 releasenotes/notes/fix-pulse-limit_amplitude-72b8b501710fe3aa.yaml delete mode 100644 releasenotes/notes/fix-qpy-controlledgate-open-control-35c8ccb4c7466f4c.yaml delete mode 100644 releasenotes/notes/fix-zzmap-pairwise-5653395849fec454.yaml delete mode 100644 releasenotes/notes/fix_8438-159e67ecb6765d08.yaml delete mode 100644 releasenotes/notes/global-phase-ucgate-cd61355e314a3e64.yaml delete mode 100644 releasenotes/notes/ibm_geneva-34b848b0a49278dc.yaml delete mode 100644 releasenotes/notes/ibm_perth-5b1e9308dc302e2e.yaml delete mode 100644 releasenotes/notes/implements_two_step_tapering-f481a8cac3990cd5.yaml delete mode 100644 releasenotes/notes/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml delete mode 100644 releasenotes/notes/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml delete mode 100644 releasenotes/notes/introduce-classical-io-channel-0a616e6ca75b7687.yaml delete mode 100644 releasenotes/notes/make-use-of-callback-in-vqd-99e3c85f03181298.yaml delete mode 100644 releasenotes/notes/observable-eval-primitives-e1fd989e15c7760c.yaml delete mode 100644 releasenotes/notes/pending-deprecate-eigen-solvers-2a4068cc9f83fba2.yaml delete mode 100644 releasenotes/notes/pending-deprecate-min-eigen-solvers-fa4341e1014e4df0.yaml delete mode 100644 releasenotes/notes/primitive-base-result-92808b069299c19e.yaml delete mode 100644 releasenotes/notes/primitive-run-5d1afab3655330a6.yaml delete mode 100644 releasenotes/notes/primitives-run_options-eb4a360c3f1e197d.yaml delete mode 100644 releasenotes/notes/qiskit-nature-797-8f1b0975309b8756.yaml delete mode 100644 releasenotes/notes/qnspsa-primitification-29a9dcae055bf2b4.yaml delete mode 100644 releasenotes/notes/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml delete mode 100644 releasenotes/notes/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml delete mode 100644 releasenotes/notes/sampled_expval-85e300e0fb5fa5ea.yaml delete mode 100644 releasenotes/notes/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml delete mode 100644 releasenotes/notes/support-channels-in--fake-backend-v2-82f0650006495fbe.yaml delete mode 100644 releasenotes/notes/taper-performance-6da355c04da5b648.yaml delete mode 100644 releasenotes/notes/trotter-qrte-primitives-8b3e495738b57fc3.yaml delete mode 100644 releasenotes/notes/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml diff --git a/qiskit/VERSION.txt b/qiskit/VERSION.txt index 007d4e97883a..215740905987 100644 --- a/qiskit/VERSION.txt +++ b/qiskit/VERSION.txt @@ -1 +1 @@ -0.22.0rc2 +0.22.0 diff --git a/qiskit/circuit/__init__.py b/qiskit/circuit/__init__.py index dccdcf5b4572..b23c746fee91 100644 --- a/qiskit/circuit/__init__.py +++ b/qiskit/circuit/__init__.py @@ -242,6 +242,7 @@ InstructionSet Operation EquivalenceLibrary + CommutationChecker Control Flow Operations ----------------------- diff --git a/qiskit/circuit/library/__init__.py b/qiskit/circuit/library/__init__.py index bffe75968e1e..a380756aca7f 100644 --- a/qiskit/circuit/library/__init__.py +++ b/qiskit/circuit/library/__init__.py @@ -78,6 +78,7 @@ CXGate CYGate CZGate + CCZGate HGate IGate MSGate @@ -97,6 +98,8 @@ ECRGate SGate SdgGate + CSGate + CSdgGate SwapGate iSwapGate SXGate diff --git a/qiskit/pulse/channels.py b/qiskit/pulse/channels.py index c88fddadd77b..e4b0b793bfc2 100644 --- a/qiskit/pulse/channels.py +++ b/qiskit/pulse/channels.py @@ -48,6 +48,11 @@ All channels are children of the same abstract base class: .. autoclass:: Channel + +And classical IO channels are children of: + +.. autoclass:: ClassicalIOChannel + """ from abc import ABCMeta from typing import Any, Set, Union diff --git a/qiskit/transpiler/passes/__init__.py b/qiskit/transpiler/passes/__init__.py index a85409366edd..026f07075755 100644 --- a/qiskit/transpiler/passes/__init__.py +++ b/qiskit/transpiler/passes/__init__.py @@ -171,6 +171,14 @@ ContainsInstruction GatesInBasis ConvertConditionsToIfOps + +High Level Synthesis Configuration +================================== + +.. autosummary:: + :toctree: ../stubs/ + + HLSConfig """ # layout selection (placement) @@ -243,6 +251,7 @@ from .synthesis import LinearFunctionsSynthesis from .synthesis import LinearFunctionsToPermutations from .synthesis import HighLevelSynthesis +from .synthesis import HLSConfig # calibration from .calibration import PulseGates diff --git a/releasenotes/notes/0.21/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml b/releasenotes/notes/0.21/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml deleted file mode 100644 index b9e6c3daffad..000000000000 --- a/releasenotes/notes/0.21/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml +++ /dev/null @@ -1,15 +0,0 @@ -features: - - | - Added a new method :meth:`.SparsePauliOp.argsort`, which - returns the composition of permutations in the order of sorting - by coefficient and sorting by Pauli. By using the `weight` kwarg - the output can additionally be sorted - by the number of non-identity terms in the Pauli, where the set of - all Pauli's of a given weight are still ordered lexicographically. - - | - Added a new method :meth:`.SparsePauliOp.sort`. - After sorting the coefficients using numpy's argsort, sort by Pauli. - Pauli sort takes precedence. If Pauli is the same, it will be sorted - by coefficient. By using the `weight` kwarg the output can additionally - be sorted by the number of non-identity terms in the Pauli, where the - set ofall Pauli's of a given weight are still ordered lexicographically. \ No newline at end of file diff --git a/releasenotes/notes/0.21/fix-marginal_counts-on-pulse-backend.yaml b/releasenotes/notes/0.21/fix-marginal_counts-on-pulse-backend.yaml deleted file mode 100644 index b3ce3e64b005..000000000000 --- a/releasenotes/notes/0.21/fix-marginal_counts-on-pulse-backend.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -fixes: - - | - The method :meth:`qiskit.result.marginal_counts`, when passed a :class:`.Result` from a - pulse backend, would fail, because it contains an array of - :class:`.ExperimentResult` objects, each of which have an :class:`QobjExperimentHeader`, and those - :class:`ExperimentHeaders` lack `creg_sizes` instance-variables. If the :class:`Result` came - from a simulator backend (e.g. Aer), that instance-variable would be there. - We fix :class:`marginal_counts` so that it skips logic that needs `creg_sizes` if the - field is not present, or non-None. diff --git a/releasenotes/notes/0.21/remove-hard-time-limit-vf2-be83830ecc71f72c.yaml b/releasenotes/notes/0.21/remove-hard-time-limit-vf2-be83830ecc71f72c.yaml deleted file mode 100644 index 4b73a6832fa1..000000000000 --- a/releasenotes/notes/0.21/remove-hard-time-limit-vf2-be83830ecc71f72c.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -upgrade: - - | - The preset pass managers generated by :func:`~.level_1_pass_manager`, - :func:`~.level_2_pass_manager`, and :func:`~.level_3_pass_manager` and used - by the :func:`~.transpile` function's ``optimization_level`` argument at - 1, 2, and 3 respectively no longer set a hard time limit on the - :class:`~.VF2Layout` transpiler pass. This means that the pass will no - longer stop trying to find a better alternative perfect layout up until a - fixed time limit (100ms for level 1, 10 sec for level 2, and 60 sec for - level 3) as doing this limited the reproducibility of compilation when a - perfect layout was available. This means that the output when using the pass - might be different than before, although in all cases it would only change - if a lower noise set of qubits can be found over the previous output. If - you wish to retain the previous behavior you can create a custom - :class:`~.PassManager` that sets the ``time_limit`` argument on the - constructor for the :class:`~VF2Layout` pass. -fixes: - - | - Fixed an issue with reproducibility of the :func:`~.transpile` function - when running with ``optimization_level`` 1, 2, and 3. Previously, under - some conditions when there were multiple perfect layouts (a layout that - doesn't require any SWAP gates) available the selected layout and output - circuit could vary regardless of whether the ``seed_transpiler`` argument - was set. diff --git a/releasenotes/notes/adapt-vqe-0f71234cb6ec92f8.yaml b/releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml similarity index 71% rename from releasenotes/notes/adapt-vqe-0f71234cb6ec92f8.yaml rename to releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml index 011be24501ef..4d685f006b33 100644 --- a/releasenotes/notes/adapt-vqe-0f71234cb6ec92f8.yaml +++ b/releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml @@ -1,11 +1,11 @@ --- features: - | - Implements the :class:`qiskit.algorithms.minimum_eigensolvers.AdaptVQE` - algorithm. This algorithm uses a - :class:`qiskit.algorithms.minimum_eigensolvers.VQE` in combination with a - pool of operators from which to build out an + Added a new algorithm class, :class:`~.AdaptVQE` to :mod:`qiskit.algorithms` + This algorithm uses a :class:`qiskit.algorithms.minimum_eigensolvers.VQE` + in combination with a pool of operators from which to build out an :class:`qiskit.circuit.library.EvolvedOperatorAnsatz` adaptively. + For example: .. code-block:: python diff --git a/releasenotes/notes/add-backend-custom-passes-cddfd05c8704a4b1.yaml b/releasenotes/notes/0.22/add-backend-custom-passes-cddfd05c8704a4b1.yaml similarity index 72% rename from releasenotes/notes/add-backend-custom-passes-cddfd05c8704a4b1.yaml rename to releasenotes/notes/0.22/add-backend-custom-passes-cddfd05c8704a4b1.yaml index b6aca2903192..662e5d7064fe 100644 --- a/releasenotes/notes/add-backend-custom-passes-cddfd05c8704a4b1.yaml +++ b/releasenotes/notes/0.22/add-backend-custom-passes-cddfd05c8704a4b1.yaml @@ -11,8 +11,10 @@ features: backends to run additional custom transpiler passes when targetting that backend by leveraging the transpiler stage :mod:`~qiskit.transpiler.preset_passmanagers.plugin` interface. - For more details on how to use this see :ref:`custom_transpiler_backend`. + For more details on how to use this see: :ref:`custom_transpiler_backend`. - | Added a new keyword argument, ``ignore_backend_supplied_default_methods``, to the - :func:`~.transpile` function can be used to disable a backend's custom - default method if the target backend has one set. + :func:`~.transpile` function which can be used to disable a backend's + custom selection of a default method if the target backend has + ``get_scheduling_stage_plugin()`` or ``get_translation_stage_plugin()`` + defined. diff --git a/releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml b/releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml new file mode 100644 index 000000000000..a58832b5d480 --- /dev/null +++ b/releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + Added a ``label`` parameter to the :class:`.Barrier` class's constructor + and the :meth:`~.QuantumCircuit.barrier` method which allows a user to + assign a label to an instance of the :class:`~.Barrier` directive. For + visualizations generated with :func:`~.circuit_drawer` or + :meth:`.QuantumCircuit.draw` this label will be printed at the top of the + ``barrier``. + + .. jupyter-execute:: + + from qiskit import QuantumCircuit + + circuit = QuantumCircuit(2) + circuit.h(0) + circuit.h(1) + circuit.barrier(label="After H") + circuit.draw('mpl') diff --git a/releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml b/releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml new file mode 100644 index 000000000000..6079842980d6 --- /dev/null +++ b/releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add new gates :class:`.CCZGate`, :class:`.CSGate`, and :class:`.CSdgGate` + to the standard gates in the Circuit Library + (:mod:`qiskit.circuit.library`). diff --git a/releasenotes/notes/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml b/releasenotes/notes/0.22/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml similarity index 56% rename from releasenotes/notes/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml rename to releasenotes/notes/0.22/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml index a0fa6d8fd663..854a54d138af 100644 --- a/releasenotes/notes/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml +++ b/releasenotes/notes/0.22/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml @@ -1,22 +1,30 @@ --- features: - | - Added :class:`qiskit.algorithms.eigensolvers` package to include - interfaces for primitive-enabled algorithms. - :class:`qiskit.algorithms.eigensolvers.VQD` has been - refactored in this implementation to leverage primitives. - - To use the new implementation with a reference primitive, one can do, for example: + Added :mod:`qiskit.algorithms.eigensolvers` package to include + interfaces for primitive-enabled algorithms. This new module + will eventually replace the previous ``qiskit.algorithms.eigen_solvers``. + This new module contains an alternative implementation of the + :class:`~qiskit.algorithms.eigensolvers.VQD` which instead of taking + a backend or :class:`~.QuantumInstance` instead takes an instance of + :class:`~.BaseEstimator`, including :class:`~.Estimator`, + :class:`~.BackendEstimator`, or any provider implementations such as + those as those present in ``qiskit-ibm-runtime`` and ``qiskit-aer``. + + For example, to use the new implementation with an instance of + :class:`~.Estimator` class: .. code-block:: python - from qiskit.algorithms.eigensolvers import VQQ + from qiskit.algorithms.eigensolvers import VQD from qiskit.algorithms.optimizers import SLSQP from qiskit.circuit.library import TwoLocal from qiskit.primitives import Sampler, Estimator from qiskit.algorithms.state_fidelities import ComputeUncompute + from qiskit.opflow import PauliSumOp + from qiskit.quantum_info import SparsePauliOp - h2_op = SparsePauliOp( + h2_op = PauliSumOp(SparsePauliOp( ["II", "IZ", "ZI", "ZZ", "XX"], coeffs=[ -1.052373245772859, @@ -25,7 +33,7 @@ features: -0.01128010425623538, 0.18093119978423156, ], - ) + )) estimator = Estimator() ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz") @@ -40,4 +48,3 @@ features: ``aux_operators_evaluated`` field on the results. This will consist of a list or dict of tuples containing the expectation values for these operators, as we well as the metadata from primitive run. ``aux_operator_eigenvalues`` is no longer a valid field. - diff --git a/releasenotes/notes/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml b/releasenotes/notes/0.22/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml similarity index 58% rename from releasenotes/notes/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml rename to releasenotes/notes/0.22/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml index 90f603342adc..9a68f596d140 100644 --- a/releasenotes/notes/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml +++ b/releasenotes/notes/0.22/add-fidelity-interface-primitives-dc543d079ecaa8dd.yaml @@ -1,11 +1,11 @@ --- features: - | - Add new algorithms to calculate state fidelities/overlaps + Added new algorithms to calculate state fidelities/overlaps for pairs of quantum circuits (that can be parametrized). Apart from - the base class (:class:`qiskit.algorithms.state_fidelities.BaseStateFidelity`), - there is now an implementation of the compute-uncompute method that leverages - the sampler primitive (:class:`qiskit.algorithms.state_fidelities.ComputeUncompute`). + the base class (:class:`~qiskit.algorithms.state_fidelities.BaseStateFidelity`) which defines the interface, + there is an implementation of the compute-uncompute method that leverages + instances of the :class:`~.BaseSampler` primitive: :class:`qiskit.algorithms.state_fidelities.ComputeUncompute`. For example: @@ -14,7 +14,7 @@ features: import numpy as np from qiskit.primitives import Sampler from qiskit.algorithms.state_fidelities import ComputeUncompute - from qiskit. import RealAmplitudes + from qiskit.circuit.library import RealAmplitudes sampler = Sampler(...) fidelity = ComputeUncompute(sampler) @@ -24,5 +24,3 @@ features: job = fidelity.run([circuit], [circuit], [values], [values+shift]) fidelities = job.result().fidelities - - diff --git a/releasenotes/notes/0.22/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml b/releasenotes/notes/0.22/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml new file mode 100644 index 000000000000..acdac2a3eba9 --- /dev/null +++ b/releasenotes/notes/0.22/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml @@ -0,0 +1,34 @@ +--- +features: + - | + Added a new module :mod:`qiskit.algorithms.gradients` that contains + classes which are used to compute gradients using the primitive + interfaces defined in :mod:`qiskit.primitives`. There are 4 types of + gradient classes: Finite Difference, Parameter Shift, Linear + Combination of Unitary, and SPSA with implementations that either use + an instance of the :class:`~.BaseEstimator` interface: + + * :class:`~.ParamShiftEstimatorGradient` + * :class:`~.LinCombEstimatorGradient` + * :class:`~.FiniteDiffEstimatorGradient` + * :class:`~.SPSAEstimatorGradient` + + or an instance of the :class:`~.BaseSampler` interface: + + * :class:`~.ParamShiftSamplerGradient` + * :class:`~.LinCombSamplerGradient` + * :class:`~.FiniteDiffSamplerGradient` + * :class:`~.SPSASamplerGradient` + + The estimator-based gradients compute the gradient of expectation + values, while the sampler-based gradients return gradients of the + measurement outcomes (also referred to as "probability gradients"). + + For example: + + .. code-block:: python + + estimator = Estimator(...) + gradient = ParamShiftEstimatorGradient(estimator) + job = gradient.run(circuits, observables, parameters) + gradients = job.result().gradients diff --git a/releasenotes/notes/0.22/add-grover-primitives-10f81efdba93703d.yaml b/releasenotes/notes/0.22/add-grover-primitives-10f81efdba93703d.yaml new file mode 100644 index 000000000000..15c4c1eecf46 --- /dev/null +++ b/releasenotes/notes/0.22/add-grover-primitives-10f81efdba93703d.yaml @@ -0,0 +1,24 @@ +--- +features: + - | + The :class:`~.Grover` class has a new keyword argument, ``sampler`` which is + used to run the algorithm using an instance of the :class:`~.BaseSampler` + interface to calculate the results. This new argument supersedes the + the ``quantum_instance`` argument and accordingly, ``quantum_instance`` + is pending deprecation and will be deprecated and subsequently removed in + future releases. + + Example: + + .. code-block:: python + + from qiskit import QuantumCircuit + from qiskit.primitives import Sampler + from qiskit.algorithms import Grover, AmplificationProblem + + sampler = Sampler() + oracle = QuantumCircuit(2) + oracle.cz(0, 1) + problem = AmplificationProblem(oracle, is_good_state=["11"]) + grover = Grover(sampler=sampler) + result = grover.amplify(problem) diff --git a/releasenotes/notes/0.22/add-pulse-drawer-option-936b6d943de9a270.yaml b/releasenotes/notes/0.22/add-pulse-drawer-option-936b6d943de9a270.yaml new file mode 100644 index 000000000000..8342ed51ccbc --- /dev/null +++ b/releasenotes/notes/0.22/add-pulse-drawer-option-936b6d943de9a270.yaml @@ -0,0 +1,20 @@ +--- +features: + - | + A new option, ``"formatter.control.fill_waveform"`` has been added to + the pulse drawer (:func:`.pulse_v2.draw` and :meth:`.Schedule.draw`) + style sheets. This option can be used to remove the face color of pulses + in the output visualization which allows for drawing pulses only with + lines. + + For example: + + .. code-block:: python + + from qiskit.visualization.pulse_v2 import IQXStandard + + my_style = IQXStandard( + **{"formatter.control.fill_waveform": False, "formatter.line_width.fill_waveform": 2} + ) + + my_sched.draw(style=my_style) diff --git a/releasenotes/notes/0.22/add-reset-simplification-pass-82377d80dd0081fd.yaml b/releasenotes/notes/0.22/add-reset-simplification-pass-82377d80dd0081fd.yaml new file mode 100644 index 000000000000..5398ddfc5909 --- /dev/null +++ b/releasenotes/notes/0.22/add-reset-simplification-pass-82377d80dd0081fd.yaml @@ -0,0 +1,25 @@ +--- +features: + - | + Added a new transpiler pass, :class:`~.ResetAfterMeasureSimplification`, + which is used to replace a :class:`~.Reset` operation after a + :class:`~.Measure` with a conditional :class:`~.XGate`. This pass can + be used on backends where a :class:`~.Reset` operation is performed by + doing a measurement and then a conditional X gate so that this will + remove the duplicate implicit :class:`~.Measure` from the :class:`~.Reset` + operation. For example: + + .. jupyter-execute:: + + from qiskit import QuantumCircuit + from qiskit.transpiler.passes import ResetAfterMeasureSimplification + + qc = QuantumCircuit(1) + qc.measure_all() + qc.reset(0) + qc.draw('mpl') + + .. jupyter-execute:: + + result = ResetAfterMeasureSimplification()(qc) + result.draw('mpl') diff --git a/releasenotes/notes/0.22/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml b/releasenotes/notes/0.22/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml new file mode 100644 index 000000000000..5606c830b419 --- /dev/null +++ b/releasenotes/notes/0.22/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + Added a new supported value, ``"reverse_linear"`` for the ``entanglement`` keyword argument + to the constructor for the :class:`~.NLocal` circuit class. For :class:`~.TwoLocal` circuits + (which are subclassess of :class:`~.NLocal`), if ``entanglement_blocks="cx"`` then + using ``entanglement="reverse_linear"`` provides an equivalent n-qubit circuit as + ``entanglement="full"`` but with only :math:`n-1` :class:`~.CXGate` gates, instead of + :math:`\frac{n(n-1)}{2}`. +upgrade: + - | + The default value for the ``entanglement`` keyword argument on the constructor for the + :class:`~.RealAmplitudes` and :class:`~.EfficientSU2` classes has changed from ``"full"`` to + ``"reverse_linear"``. This change was made because the output circuit is equivalent but + uses only :math:`n-1` instead of :math:`\frac{n(n-1)}{2}` :class:`~.CXGate` gates. If you + desire the previous default you can explicity set ``entanglement="full"`` when calling either + constructor. diff --git a/releasenotes/notes/0.22/add-sampler-error-check-38426fb186db44d4.yaml b/releasenotes/notes/0.22/add-sampler-error-check-38426fb186db44d4.yaml new file mode 100644 index 000000000000..c1d469a93934 --- /dev/null +++ b/releasenotes/notes/0.22/add-sampler-error-check-38426fb186db44d4.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Added a validation check to :meth:`.BaseSampler.run`. + It raises an error if there is no classical bit. diff --git a/releasenotes/notes/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml b/releasenotes/notes/0.22/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml similarity index 89% rename from releasenotes/notes/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml rename to releasenotes/notes/0.22/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml index 0f66480fb6d0..34ce84284fe6 100644 --- a/releasenotes/notes/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml +++ b/releasenotes/notes/0.22/add-schedule-block-reference-mechanism-8a7811e17b4fead3.yaml @@ -30,9 +30,8 @@ features: the :attr:`~qiskit.pulse.schedule.ScheduleBlock.references` property. In addition, every reference is managed with a scope to ease parameter management. - :meth:`~qiskit.pulse.schedule.ScheduleBlock.scoped_parameters` and - :meth:`~qiskit.pulse.schedule.ScheduleBlock.search_parameters` have been added to - the schedule block. See API documentation for more details. + :meth:`~.scoped_parameters` and :meth:`~.search_parameters` have been added to + :class:`~.ScheduleBlock`. See API documentation for more details. upgrade: - | Behavior of the :func:`~qiskit.pulse.builder.call` pulse builder function has been upgraded. diff --git a/releasenotes/notes/0.22/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml b/releasenotes/notes/0.22/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml new file mode 100644 index 000000000000..fc5698637295 --- /dev/null +++ b/releasenotes/notes/0.22/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml @@ -0,0 +1,16 @@ +features: + - | + Added a new method :meth:`.SparsePauliOp.argsort`, which + returns the composition of permutations in the order of sorting + by coefficient and sorting by Pauli. By using the ``weight`` + keyword argument for the method the output can additionally be sorted + by the number of non-identity terms in the Pauli, where the set of + all Paulis of a given weight are still ordered lexicographically. + - | + Added a new method :meth:`.SparsePauliOp.sort`, which will first + sort the coefficients using numpy's ``argsort()`` and then sort + by Pauli, where the Pauli sort takes precedence. If the Pauli sort + is the same, it will then be sorted by coefficient. By using the + ``weight`` keyword argument the output can additionally be sorted + by the number of non-identity terms in the Pauli, where the set of + all Paulis of a given weight are still ordered lexicographically. diff --git a/releasenotes/notes/0.22/add-wire-order-to-drawers-657cb54e365c621a.yaml b/releasenotes/notes/0.22/add-wire-order-to-drawers-657cb54e365c621a.yaml new file mode 100644 index 000000000000..aa8cda12bece --- /dev/null +++ b/releasenotes/notes/0.22/add-wire-order-to-drawers-657cb54e365c621a.yaml @@ -0,0 +1,21 @@ +--- +features: + - | + Added a new keyword argument, ``wire_order``, to the :func:`~.circuit_drawer` + function and :meth:`.QuantumCircuit.draw` method which allows arbitrarily + reordering both the quantum and classical bits in the output visualization. + For example: + + .. jupyter-execute:: + + from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister + + qr = QuantumRegister(4, "q") + cr = ClassicalRegister(4, "c") + cr2 = ClassicalRegister(2, "ca") + circuit = QuantumCircuit(qr, cr, cr2) + circuit.h(0) + circuit.h(3) + circuit.x(1) + circuit.x(3).c_if(cr, 10) + circuit.draw('mpl', cregbundle=False, wire_order=[2, 1, 3, 0, 6, 8, 9, 5, 4, 7]) diff --git a/releasenotes/notes/0.22/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml b/releasenotes/notes/0.22/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml new file mode 100644 index 000000000000..f28255974703 --- /dev/null +++ b/releasenotes/notes/0.22/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + Added support for the :class:`~.CSGate`, :class:`~.CSdgGate` and + :class:`~.CCZGate` classes to the constructor for the operator + class :class:`~qiskit.quantum_info.CNOTDihedral`. The input + circuits when creating a :class:`~.CNOTDihedral` operator will now + support circuits using these gates. For example:: + + from qiskit import QuantumCircuit + from qiskit.quantum_info import CNOTDihedral + + qc = QuantumCircuit(2) + qc.t(0) + qc.cs(0, 1) + qc.tdg(0) + operator = CNOTDihedral(qc) diff --git a/releasenotes/notes/0.22/ae-algorithms-primitives-497bae1b2b04f877.yaml b/releasenotes/notes/0.22/ae-algorithms-primitives-497bae1b2b04f877.yaml new file mode 100644 index 000000000000..adda464cb683 --- /dev/null +++ b/releasenotes/notes/0.22/ae-algorithms-primitives-497bae1b2b04f877.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + The amplitude estimation algorithm classes: + + * :class:`~qiskit.algorithms.AmplitudeEstimation`, + * :class:`~qiskit.algorithms.FasterAmplitudeEstimation`, + * :class:`~qiskit.algorithms.IterativeAmplitudeEstimation`, + * :class:`~qiskit.algorithms.MaximumLikelihoodAmplitudeEstimation` + + Now have a new keyword argument, ``sampler`` on their constructor that + takes an instance of an object that implements the :class:`~.BaseSampler` + interface including :class:`~.BackendSampler`, :class:`Sampler`, or any + provider implementations such as those as those present in + qiskit-ibm-runtime and qiskit-aer. This provides an alternative to using + the ``quantum_instance`` argument to set the target :class:`~.Backend` + or :class:`~.QuantumInstance` to run the algorithm on. + Using a :class:`~.QuantumInstance` is pending deprecation and will + be deprecated in a future release. diff --git a/releasenotes/notes/backend-converter-05360f12f9042829.yaml b/releasenotes/notes/0.22/backend-converter-05360f12f9042829.yaml similarity index 89% rename from releasenotes/notes/backend-converter-05360f12f9042829.yaml rename to releasenotes/notes/0.22/backend-converter-05360f12f9042829.yaml index 97695b55d084..e887ecc5dfe1 100644 --- a/releasenotes/notes/backend-converter-05360f12f9042829.yaml +++ b/releasenotes/notes/0.22/backend-converter-05360f12f9042829.yaml @@ -1,13 +1,12 @@ --- features: - | - Added a new class, :class:`~BackendV2Converter`, which is used to wrap + Added a new class, :class:`~.BackendV2Converter`, which is used to wrap a :class:`~.BackendV1` instance in a :class:`~.BackendV2` interface. It enables you to have a :class:`~.BackendV2` instance from any :class:`~.BackendV1`. This enables standardizing access patterns on the newer :class:`~.BackendV2` interface even if you still support :class:`~.BackendV1`. - - | Added a new function :func:`~.convert_to_target` which is used to take a :class:`~.BackendConfiguration`, and optionally a diff --git a/releasenotes/notes/0.22/base-operators-sums-d331e78a9fa4b5d8.yaml b/releasenotes/notes/0.22/base-operators-sums-d331e78a9fa4b5d8.yaml new file mode 100644 index 000000000000..91e7f4a9c287 --- /dev/null +++ b/releasenotes/notes/0.22/base-operators-sums-d331e78a9fa4b5d8.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + ``qiskit.quantum_info.BaseOperator`` subclasses (such as :class:`.ScalarOp`, + :class:`.SparsePauliOp` and :class:`.PauliList`) can now be used with + the built-in Python ``sum()`` function. diff --git a/releasenotes/notes/begin-tweedledum-removal-25bb68fc72804f00.yaml b/releasenotes/notes/0.22/begin-tweedledum-removal-25bb68fc72804f00.yaml similarity index 93% rename from releasenotes/notes/begin-tweedledum-removal-25bb68fc72804f00.yaml rename to releasenotes/notes/0.22/begin-tweedledum-removal-25bb68fc72804f00.yaml index 6f119c07edde..21e2b472b213 100644 --- a/releasenotes/notes/begin-tweedledum-removal-25bb68fc72804f00.yaml +++ b/releasenotes/notes/0.22/begin-tweedledum-removal-25bb68fc72804f00.yaml @@ -11,7 +11,7 @@ upgrade: ``tweedledum`` is no longer a requirement on macOS arm64 (M1) with immediate effect in Qiskit Terra 0.22. This is because the provided wheels for this platform are broken, and building from the sdist is not reliable for most - ppeople. If you manually install a working version of ``tweedledum``, all + people. If you manually install a working version of ``tweedledum``, all the dependent functionality will continue to work. deprecations: - | diff --git a/releasenotes/notes/c_if-to-if_else-converter-2d48046de31814a8.yaml b/releasenotes/notes/0.22/c_if-to-if_else-converter-2d48046de31814a8.yaml similarity index 81% rename from releasenotes/notes/c_if-to-if_else-converter-2d48046de31814a8.yaml rename to releasenotes/notes/0.22/c_if-to-if_else-converter-2d48046de31814a8.yaml index 65c93ef53bc5..ef568934ebd5 100644 --- a/releasenotes/notes/c_if-to-if_else-converter-2d48046de31814a8.yaml +++ b/releasenotes/notes/0.22/c_if-to-if_else-converter-2d48046de31814a8.yaml @@ -2,7 +2,7 @@ features: - | A new transpiler pass, :class:`.ConvertConditionsToIfOps` was added, which - can be manually run to convert old-style :meth:`.Instruction.c_if`-conditioned + can be used to convert old-style :meth:`.Instruction.c_if`-conditioned instructions into :class:`.IfElseOp` objects. This is to help ease the transition from the old type to the new type for backends. For most users, there is no need to add this to your pass managers, and it is not included in any preset diff --git a/releasenotes/notes/circuit-initialize-and-prepare-single-qubit-e25dacc8f873bc01.yaml b/releasenotes/notes/0.22/circuit-initialize-and-prepare-single-qubit-e25dacc8f873bc01.yaml similarity index 100% rename from releasenotes/notes/circuit-initialize-and-prepare-single-qubit-e25dacc8f873bc01.yaml rename to releasenotes/notes/0.22/circuit-initialize-and-prepare-single-qubit-e25dacc8f873bc01.yaml diff --git a/releasenotes/notes/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml b/releasenotes/notes/0.22/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml similarity index 83% rename from releasenotes/notes/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml rename to releasenotes/notes/0.22/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml index 53185ae3e80c..ae998cae60a6 100644 --- a/releasenotes/notes/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml +++ b/releasenotes/notes/0.22/commutative-inverse-cancellation-a10e72d8e42ac74b.yaml @@ -2,7 +2,7 @@ features: - | Refactored gate commutativity analysis into a class :class:`~qiskit.circuit.CommutationChecker`. - It allows to check (based on matrix multiplication) whether two gates commute or do not commute, + This class allows you to check (based on matrix multiplication) whether two gates commute or do not commute, and to cache the results (so that a similar check in the future will no longer require matrix multiplication). @@ -15,19 +15,18 @@ features: res = comm_checker.commute(CXGate(), [qr[1], qr[0]], [], CXGate(), [qr[1], qr[2]], []) - As the two CX gates commute (the first CX gate is over qubits `qr[1]` and `qr[0]`, and the - second CX gate is over qubits `qr[1]` and `qr[2]`), we will have that `res` is `True`. + As the two CX gates commute (the first CX gate is over qubits ``qr[1]`` and ``qr[0]``, and the + second CX gate is over qubits ``qr[1]`` and ``qr[2]``), we will have that ``res`` is ``True``. This commutativity checking is over-conservative for conditional and parameterized gates, - and may return `False` even when such gates commute. + and may return ``False`` even when such gates commute. - | Added a new transpiler pass :class:`.CommutativeInverseCancellation` that cancels pairs of inverse gates exploiting commutation relations between gates. This pass is a generalization of the transpiler pass :class:`.InverseCancellation` as it detects a larger set of inverse gates, and as it takes commutativity into account. The pass also avoids some problems - associated with the transpiler pass :class:`.CommutativeCancellation`, see - `issue #8020 `_ + associated with the transpiler pass :class:`.CommutativeCancellation`. For example:: @@ -50,7 +49,3 @@ features: The inverse checking is over-conservative for conditional and parameterized gates, and may not cancel some of such gates. - - - - diff --git a/releasenotes/notes/compose-meas-no-meas-492ce91167d54154.yaml b/releasenotes/notes/0.22/compose-meas-no-meas-492ce91167d54154.yaml similarity index 66% rename from releasenotes/notes/compose-meas-no-meas-492ce91167d54154.yaml rename to releasenotes/notes/0.22/compose-meas-no-meas-492ce91167d54154.yaml index e4fe28d328c9..d790f6858f34 100644 --- a/releasenotes/notes/compose-meas-no-meas-492ce91167d54154.yaml +++ b/releasenotes/notes/0.22/compose-meas-no-meas-492ce91167d54154.yaml @@ -2,9 +2,9 @@ features: - | :meth:`.QuantumCircuit.compose` will now accept an operand with classical - bits if the base circuit has none itself, as a convenience. The pattern - of composing a circuit with measurements onto a quantum-only circuit is - now valid:: + bits if the base circuit has none itself. The pattern of composing a + circuit with measurements onto a quantum-only circuit is + now valid. For example:: from qiskit import QuantumCircuit diff --git a/releasenotes/notes/condition-in-while-loop-d6be0d6d6a1429da.yaml b/releasenotes/notes/0.22/condition-in-while-loop-d6be0d6d6a1429da.yaml similarity index 100% rename from releasenotes/notes/condition-in-while-loop-d6be0d6d6a1429da.yaml rename to releasenotes/notes/0.22/condition-in-while-loop-d6be0d6d6a1429da.yaml diff --git a/releasenotes/notes/control-flow-depth-size-b598a4eb9d8888eb.yaml b/releasenotes/notes/0.22/control-flow-depth-size-b598a4eb9d8888eb.yaml similarity index 59% rename from releasenotes/notes/control-flow-depth-size-b598a4eb9d8888eb.yaml rename to releasenotes/notes/0.22/control-flow-depth-size-b598a4eb9d8888eb.yaml index 0ba052e96d9b..6b0ba6dc614b 100644 --- a/releasenotes/notes/control-flow-depth-size-b598a4eb9d8888eb.yaml +++ b/releasenotes/notes/0.22/control-flow-depth-size-b598a4eb9d8888eb.yaml @@ -2,13 +2,14 @@ features: - | The :class:`.DAGCircuit` methods :meth:`~.DAGCircuit.depth` and - :meth:`~.DAGCircuit.size` gained a ``recurse`` keyword argument for use with - control flow. By default this is ``False`` and will raise an error if - control-flow is present, to avoid poorly defined results. If set to ``True``, - a proxy value that attempts to fairly weigh each control-flow block relative - to its condition is returned, even though the depth or size of a concrete run - is generally unknowable. See each method's documentation for how each - control-flow operation affects the output. + :meth:`~.DAGCircuit.size` have a new ``recurse`` keyword argument for use with + circuits that contain control-flow operations (such as :class:`~.IfElseOp`, + :class:`~.WhileLoopOp`, and :class:`~.ForLoopOp`). By default this is ``False`` + and will raise an error if control-flow operations are present, to avoid poorly + defined results. If set to ``True``, a proxy value that attempts to fairly weigh + each control-flow block relative to its condition is returned, even though the + depth or size of a concrete run is generally unknowable. See each method's + documentation for how each control-flow operation affects the output. - | :meth:`.DAGCircuit.count_ops` gained a ``recurse`` keyword argument for recursing into control-flow blocks. By default this is ``True``, and all diff --git a/releasenotes/notes/dag_dependency_speedup-f6298348cb3d8746.yaml b/releasenotes/notes/0.22/dag_dependency_speedup-f6298348cb3d8746.yaml similarity index 100% rename from releasenotes/notes/dag_dependency_speedup-f6298348cb3d8746.yaml rename to releasenotes/notes/0.22/dag_dependency_speedup-f6298348cb3d8746.yaml diff --git a/releasenotes/notes/denselayout-loose-bits-3e66011432bc6232.yaml b/releasenotes/notes/0.22/denselayout-loose-bits-3e66011432bc6232.yaml similarity index 100% rename from releasenotes/notes/denselayout-loose-bits-3e66011432bc6232.yaml rename to releasenotes/notes/0.22/denselayout-loose-bits-3e66011432bc6232.yaml diff --git a/releasenotes/notes/deprecate-linear-solvers-factorizers-bbf5302484cb6831.yaml b/releasenotes/notes/0.22/deprecate-linear-solvers-factorizers-bbf5302484cb6831.yaml similarity index 100% rename from releasenotes/notes/deprecate-linear-solvers-factorizers-bbf5302484cb6831.yaml rename to releasenotes/notes/0.22/deprecate-linear-solvers-factorizers-bbf5302484cb6831.yaml diff --git a/releasenotes/notes/0.22/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml b/releasenotes/notes/0.22/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml new file mode 100644 index 000000000000..76482ef07630 --- /dev/null +++ b/releasenotes/notes/0.22/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml @@ -0,0 +1,15 @@ +--- +features: + - | + Added new attributes :attr:`.Clifford.symplectic_matrix`, :attr:`.Clifford.tableau`, + :attr:`.Clifford.z`, :attr:`.Clifford.x`, :attr:`.Clifford.phase`, + :attr:`.Clifford.stab`, :attr:`.Clifford.stab_z`, :attr:`.Clifford.stab_x`, :attr:`.Clifford.stab_phase`, + :attr:`.Clifford.destab`, :attr:`.Clifford.destab_z`, :attr:`.Clifford.destab_x`, :attr:`.Clifford.destab_phase` + to the :class:`~.Clifford` class. These can be used instead of :attr:`.Clifford.table`, that will be deprecated in the future. + :class:`.StabilizerTable` and :class:`.PauliTable` are pending deprecation and + will be deprecated in the future release and subsequently removed after that. + +deprecations: + - | + The :func:`.random_stabilizer_table` has been deprecated and will be removed in a future + release. Instead the :func:`~.random_pauli_list` function should be used. diff --git a/releasenotes/notes/deprecated-pulse-deprecator-394ec75079441cda.yaml b/releasenotes/notes/0.22/deprecated-pulse-deprecator-394ec75079441cda.yaml similarity index 100% rename from releasenotes/notes/deprecated-pulse-deprecator-394ec75079441cda.yaml rename to releasenotes/notes/0.22/deprecated-pulse-deprecator-394ec75079441cda.yaml diff --git a/releasenotes/notes/0.22/edge-coloring-e55700fcf8902c79.yaml b/releasenotes/notes/0.22/edge-coloring-e55700fcf8902c79.yaml new file mode 100644 index 000000000000..1ab51fc1cb59 --- /dev/null +++ b/releasenotes/notes/0.22/edge-coloring-e55700fcf8902c79.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The :class:`.Commuting2qGateRouter` constructor now has a new keyword + argument, ``edge_coloring``. This argument is used to provide an edge + coloring of the coupling map to determine the order in which the + commuting gates are applied. diff --git a/releasenotes/notes/0.22/evolution-framework-primitives-c86779b5d0dffd25.yaml b/releasenotes/notes/0.22/evolution-framework-primitives-c86779b5d0dffd25.yaml new file mode 100644 index 000000000000..2d332d68f699 --- /dev/null +++ b/releasenotes/notes/0.22/evolution-framework-primitives-c86779b5d0dffd25.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + Added a new algorithms interface for creating time evolution algorithms + using the primitives :class:`~.BaseSampler` and :class:`~.BaseEstimator`. + This new interface consists of: + + * :class:`~qiskit.algorithms.TimeEvolutionProblem` + * :class:`~qiskit.algorithms.TimeEvolutionResult` + * :class:`~qiskit.algorithms.ImaginaryTimeEvolver` + * :class:`~qiskit.algorithms.RealTimeEvolver` + + This new interface is an alternative to the previously existing time + evolution algorithms interface available defined with + :class:`~.EvolutionProblem`, :class:`~.EvolutionResult`, + :class:`~.RealEvolver`, and :class:`~.ImaginaryEvolver` which worked + with a :class:`~.QuantumInstance` object instead of primitives. This + new interface supersedes the previous interface which will eventually + be deprecated and subsequently removed in future releases. diff --git a/releasenotes/notes/0.22/fake_auckland-deadbeef.yaml b/releasenotes/notes/0.22/fake_auckland-deadbeef.yaml new file mode 100644 index 000000000000..a2bbcb78923c --- /dev/null +++ b/releasenotes/notes/0.22/fake_auckland-deadbeef.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + Added new backend classes to :mod:`qiskit.providers.fake_provider`: + + * :class:`~.FakeAuckland` + * :class:`~.FakeOslo` + * :class:`~.FakeGeneva` + * :class:`~.FakePerth` + + These new classes implement the :class:`~.BackendV2` interface and + are created using stored snapshots of the backend information from the + IBM Quantum systems ``ibm_auckland``, ``ibm_oslo``, ``ibm_geneva``, and + ``ibm_perth`` systems respectively. diff --git a/releasenotes/notes/fix-Opertor.from_circuit-transpile-5c056968ee40025e.yaml b/releasenotes/notes/0.22/fix-Opertor.from_circuit-transpile-5c056968ee40025e.yaml similarity index 100% rename from releasenotes/notes/fix-Opertor.from_circuit-transpile-5c056968ee40025e.yaml rename to releasenotes/notes/0.22/fix-Opertor.from_circuit-transpile-5c056968ee40025e.yaml diff --git a/releasenotes/notes/fix-decomp-1q-1c-84f369f9a897a5b7.yaml b/releasenotes/notes/0.22/fix-decomp-1q-1c-84f369f9a897a5b7.yaml similarity index 100% rename from releasenotes/notes/fix-decomp-1q-1c-84f369f9a897a5b7.yaml rename to releasenotes/notes/0.22/fix-decomp-1q-1c-84f369f9a897a5b7.yaml diff --git a/releasenotes/notes/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml b/releasenotes/notes/0.22/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml similarity index 67% rename from releasenotes/notes/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml rename to releasenotes/notes/0.22/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml index 144f1e2b9cbe..2cba4044a909 100644 --- a/releasenotes/notes/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml +++ b/releasenotes/notes/0.22/fix-empty-string-pauli-list-init-4d978fb0eaf1bc70.yaml @@ -1,7 +1,7 @@ --- fixes: - | - Fixed initialization of empty symplectic matrix in :meth:'PauliList.from_symplectic' in :class:'.PauliList' class + Fixed initialization of empty symplectic matrix in :meth:`~.PauliList.from_symplectic` in :class:`~.PauliList` class For example:: from qiskit.quantum_info.operators import PauliList diff --git a/releasenotes/notes/0.22/fix-flipping-cz-gate-fd08305ca12d9a79.yaml b/releasenotes/notes/0.22/fix-flipping-cz-gate-fd08305ca12d9a79.yaml new file mode 100644 index 000000000000..a7ad613c4d1d --- /dev/null +++ b/releasenotes/notes/0.22/fix-flipping-cz-gate-fd08305ca12d9a79.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix a problem in the :class:`~.GateDirection` transpiler pass for the + :class:`~.CZGate`. The CZ gate is symmetric, so flipping the qubit + arguments is allowed to match the directed coupling map. diff --git a/releasenotes/notes/0.22/fix-gradient-wrapper-2f9ab45941739044.yaml b/releasenotes/notes/0.22/fix-gradient-wrapper-2f9ab45941739044.yaml new file mode 100644 index 000000000000..73f03c6b8c1b --- /dev/null +++ b/releasenotes/notes/0.22/fix-gradient-wrapper-2f9ab45941739044.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixed issues with the :func:`.DerivativeBase.gradient_wrapper` method + when reusing a circuit sampler between the calls and binding nested + parameters. diff --git a/releasenotes/notes/fix-idle-wires-display-de0ecc60d4000ca0.yaml b/releasenotes/notes/0.22/fix-idle-wires-display-de0ecc60d4000ca0.yaml similarity index 53% rename from releasenotes/notes/fix-idle-wires-display-de0ecc60d4000ca0.yaml rename to releasenotes/notes/0.22/fix-idle-wires-display-de0ecc60d4000ca0.yaml index d5c1777b3d48..8d9ef6cc0c8a 100644 --- a/releasenotes/notes/fix-idle-wires-display-de0ecc60d4000ca0.yaml +++ b/releasenotes/notes/0.22/fix-idle-wires-display-de0ecc60d4000ca0.yaml @@ -1,8 +1,8 @@ --- fixes: - | - A bug in the ``mpl`` and ``latex`` circuit drawers, when + Fixed an issue in the ``mpl`` and ``latex`` circuit drawers, when setting the ``idle_wires`` option to False when there was a ``barrier`` in the circuit would cause the drawers to fail, has been fixed. - (see `#8313 `__ + Fixed `#8313 `__ diff --git a/releasenotes/notes/0.22/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml b/releasenotes/notes/0.22/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml new file mode 100644 index 000000000000..0712c7d6c012 --- /dev/null +++ b/releasenotes/notes/0.22/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixed an issue in :func:`~.circuit_drawer` and :meth:`.QuantumCircuit.draw` + with the ``latex`` method where an ``OSError`` would be raised on systems + whose temporary directories (*e.g* ``/tmp``) are on a different + filesystem than the working directory. + Fixes `#8542 `__ diff --git a/releasenotes/notes/fix-nested-flow-controllers-a2a5f03eed482fa2.yaml b/releasenotes/notes/0.22/fix-nested-flow-controllers-a2a5f03eed482fa2.yaml similarity index 100% rename from releasenotes/notes/fix-nested-flow-controllers-a2a5f03eed482fa2.yaml rename to releasenotes/notes/0.22/fix-nested-flow-controllers-a2a5f03eed482fa2.yaml diff --git a/releasenotes/notes/fix-nondeterministic-dagcircuit-eq-7caa9041093c6e4c.yaml b/releasenotes/notes/0.22/fix-nondeterministic-dagcircuit-eq-7caa9041093c6e4c.yaml similarity index 100% rename from releasenotes/notes/fix-nondeterministic-dagcircuit-eq-7caa9041093c6e4c.yaml rename to releasenotes/notes/0.22/fix-nondeterministic-dagcircuit-eq-7caa9041093c6e4c.yaml diff --git a/releasenotes/notes/fix-qasm2-identity-as-unitary-aa2feeb05707a597.yaml b/releasenotes/notes/0.22/fix-qasm2-identity-as-unitary-aa2feeb05707a597.yaml similarity index 100% rename from releasenotes/notes/fix-qasm2-identity-as-unitary-aa2feeb05707a597.yaml rename to releasenotes/notes/0.22/fix-qasm2-identity-as-unitary-aa2feeb05707a597.yaml diff --git a/releasenotes/notes/fix-target-control-flow-representation-09520e2838f0657e.yaml b/releasenotes/notes/0.22/fix-target-control-flow-representation-09520e2838f0657e.yaml similarity index 92% rename from releasenotes/notes/fix-target-control-flow-representation-09520e2838f0657e.yaml rename to releasenotes/notes/0.22/fix-target-control-flow-representation-09520e2838f0657e.yaml index 51a8f906a6c2..7f1e448fd188 100644 --- a/releasenotes/notes/fix-target-control-flow-representation-09520e2838f0657e.yaml +++ b/releasenotes/notes/0.22/fix-target-control-flow-representation-09520e2838f0657e.yaml @@ -13,10 +13,14 @@ features: instance. In such cases the operation will be treated as globally supported on all qubits. For example, if building a target like:: - from qiskit.transpiler import Target + from qiskit.circuit import Parameter, Measure, IfElseOp, ForLoopOp, WhileLoopOp + from qiskit.circuit.library import IGate, RZGate, SXGate, XGate, CXGate + from qiskit.transpiler import Target, InstructionProperties - ibm_target = Target() - i_props = { + theta = Parameter("theta") + + ibm_target = Target() + i_props = { (0,): InstructionProperties(duration=35.5e-9, error=0.000413), (1,): InstructionProperties(duration=35.5e-9, error=0.000502), (2,): InstructionProperties(duration=35.5e-9, error=0.0004003), @@ -91,9 +95,9 @@ upgrade: there are no connectivity constraints on the backend being modeled by the :class:`~.Target`, not a lack of connecitvity. If you desire the previous behavior for any reason you can reproduce it by checking for a - ``None`` and manually building a coupling map, for example:: + ``None`` return and manually building a coupling map, for example:: - from qiskit.transpiler import Target + from qiskit.transpiler import Target, CouplingMap from qiskit.circuit.library import CXGate target = Target(num_qubits=3) diff --git a/releasenotes/notes/fix-text-drawer-compression-a80a5636957e8eec.yaml b/releasenotes/notes/0.22/fix-text-drawer-compression-a80a5636957e8eec.yaml similarity index 100% rename from releasenotes/notes/fix-text-drawer-compression-a80a5636957e8eec.yaml rename to releasenotes/notes/0.22/fix-text-drawer-compression-a80a5636957e8eec.yaml diff --git a/releasenotes/notes/fix-unitary-synth-1q-circuit-756ad4ed209a313f.yaml b/releasenotes/notes/0.22/fix-unitary-synth-1q-circuit-756ad4ed209a313f.yaml similarity index 100% rename from releasenotes/notes/fix-unitary-synth-1q-circuit-756ad4ed209a313f.yaml rename to releasenotes/notes/0.22/fix-unitary-synth-1q-circuit-756ad4ed209a313f.yaml diff --git a/releasenotes/notes/0.22/fix_8438-159e67ecb6765d08.yaml b/releasenotes/notes/0.22/fix_8438-159e67ecb6765d08.yaml new file mode 100644 index 000000000000..fc7a385619ee --- /dev/null +++ b/releasenotes/notes/0.22/fix_8438-159e67ecb6765d08.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed an issue where :meth:`.Pauli.evolve` and :meth:`.PauliList.evolve` would + raise a dtype error when evolving by certain Clifford gates which + modified the Pauli's phase. + Fixed `#8438 `__ diff --git a/releasenotes/notes/gate-direction-target-a9f0acd0cf30ed66.yaml b/releasenotes/notes/0.22/gate-direction-target-a9f0acd0cf30ed66.yaml similarity index 100% rename from releasenotes/notes/gate-direction-target-a9f0acd0cf30ed66.yaml rename to releasenotes/notes/0.22/gate-direction-target-a9f0acd0cf30ed66.yaml diff --git a/releasenotes/notes/0.22/implements_two_step_tapering-f481a8cac3990cd5.yaml b/releasenotes/notes/0.22/implements_two_step_tapering-f481a8cac3990cd5.yaml new file mode 100644 index 000000000000..822417a07df9 --- /dev/null +++ b/releasenotes/notes/0.22/implements_two_step_tapering-f481a8cac3990cd5.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + The :class:`~.Z2Symmetries` class has two new methods, + :meth:`~.Z2Symmetries.convert_clifford` and + :meth:`~.Z2Symmetries.taper_clifford`. These two methods are the two + operations necessary for taperng an operator based on the Z2 symmetries + in the object and were previously performed internally via the + :meth:`~.Z2Symmetries.taper` method. However, these methods are now + public methods of the class which can be called individually if needed. diff --git a/releasenotes/notes/0.22/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml b/releasenotes/notes/0.22/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml new file mode 100644 index 000000000000..4a0216210c87 --- /dev/null +++ b/releasenotes/notes/0.22/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The runtime performance for conjugation of a long :class:`.PauliList` + object by a :class:`.Clifford` using the :meth:`.PauliList.evolve` + has significantly improved. It will now run significantly faster than + before. diff --git a/releasenotes/notes/0.22/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml b/releasenotes/notes/0.22/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml new file mode 100644 index 000000000000..b3266408baf7 --- /dev/null +++ b/releasenotes/notes/0.22/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Fixed an issue in the :class:`~.SNOBFIT` optimizer class when an + internal error would be raised during the execution of the + :meth:`~.SNOBFIT.minimize` method if no input bounds where specified. + This is now checked at call time to quickly raise a ``ValueError`` if + required bounds are missing from the :meth:`~.SNOBFIT.minimize` call. + Fixes `#8580 `__ diff --git a/releasenotes/notes/0.22/introduce-classical-io-channel-0a616e6ca75b7687.yaml b/releasenotes/notes/0.22/introduce-classical-io-channel-0a616e6ca75b7687.yaml new file mode 100644 index 000000000000..068ac25c1aa6 --- /dev/null +++ b/releasenotes/notes/0.22/introduce-classical-io-channel-0a616e6ca75b7687.yaml @@ -0,0 +1,22 @@ +--- +features: + - | + Added a new abstract class :class:`~.ClassicalIOChannel` to the + :mod:`qiskit.pulse.channels` module. This class is used to represent + classical I/O channels and differentiate these channels from other + subclasses of :class:`~qiskit.pulse.channels.Channel`. This new class is + the base class for the :class:`~.MemorySlot`, :class:`~.RegisterSlot`, + and :class:`~.SnapshotChannel` classes. Accordingly, the + :func:`~qiskit.pulse.transforms.pad` canonicalization pulse transform in + :mod:`qiskit.pulse.transforms` will not introduce delays to any instances + of :class:`~.ClassicalIOChannel` + +upgrade: + - | + The constructors for the :class:`~.SetPhase`, :class:`~.ShiftPhase`, + :class:`~.SetFrequency`, and :class:`~.ShiftFrequency` classes will now + raise a :class:`~.PulseError` if the value passed in via the ``channel`` + argument is not an instance of :class:`~.PulseChannel`. This change was + made to validate the input to the constructors are valid as the + instructions are only valid for pulse channels and not other types of + channels. diff --git a/releasenotes/notes/0.22/make-use-of-callback-in-vqd-99e3c85f03181298.yaml b/releasenotes/notes/0.22/make-use-of-callback-in-vqd-99e3c85f03181298.yaml new file mode 100644 index 000000000000..e3a7b7879f55 --- /dev/null +++ b/releasenotes/notes/0.22/make-use-of-callback-in-vqd-99e3c85f03181298.yaml @@ -0,0 +1,8 @@ +fixes: + - | + Fixed an issue in the output callable from the + :meth:`~qiskit.algorithms.VQD.get_energy_evaluation` method of + the :class:`~qiskit.algorithms.VQD` class will now correctly call + the specified ``callback`` when run. Previously the callback would + incorrectly not be used in this case. + Fixed `#8575 `__ diff --git a/releasenotes/notes/multiple-parallel-rusty-sabres-32bc93f79ae48a1f.yaml b/releasenotes/notes/0.22/multiple-parallel-rusty-sabres-32bc93f79ae48a1f.yaml similarity index 100% rename from releasenotes/notes/multiple-parallel-rusty-sabres-32bc93f79ae48a1f.yaml rename to releasenotes/notes/0.22/multiple-parallel-rusty-sabres-32bc93f79ae48a1f.yaml diff --git a/releasenotes/notes/no_warning_with_reverse_bits-b47cb1e357201593.yaml b/releasenotes/notes/0.22/no_warning_with_reverse_bits-b47cb1e357201593.yaml similarity index 100% rename from releasenotes/notes/no_warning_with_reverse_bits-b47cb1e357201593.yaml rename to releasenotes/notes/0.22/no_warning_with_reverse_bits-b47cb1e357201593.yaml diff --git a/releasenotes/notes/0.22/observable-eval-primitives-e1fd989e15c7760c.yaml b/releasenotes/notes/0.22/observable-eval-primitives-e1fd989e15c7760c.yaml new file mode 100644 index 000000000000..0c3d86659f99 --- /dev/null +++ b/releasenotes/notes/0.22/observable-eval-primitives-e1fd989e15c7760c.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + Added a new function, :func:`~.estimate_observables` which uses an + implementation of the :class:`~.BaseEstimator` interface (e.g. + :class:`~.Estimator`, :class:`~.BackendEstimator`, or any provider + implementations such as those as those present in ``qiskit-ibm-runtime`` + and ``qiskit-aer``) to calculate the expectation values, their means and + standard deviations from a list or dictionary of observables. This + serves a similar purpose to the pre-existing function + :func:`~.eval_observables` which performed the calculation using + a :class:`~.QuantumInstance` object and has been superseded (and will be + deprecated and subsequently removed in future releases) by this + new function. diff --git a/releasenotes/notes/operation-abstract-base-class-c5efe020aa9caf46.yaml b/releasenotes/notes/0.22/operation-abstract-base-class-c5efe020aa9caf46.yaml similarity index 78% rename from releasenotes/notes/operation-abstract-base-class-c5efe020aa9caf46.yaml rename to releasenotes/notes/0.22/operation-abstract-base-class-c5efe020aa9caf46.yaml index ef5e619684d7..9b99cb3adb3e 100644 --- a/releasenotes/notes/operation-abstract-base-class-c5efe020aa9caf46.yaml +++ b/releasenotes/notes/0.22/operation-abstract-base-class-c5efe020aa9caf46.yaml @@ -2,20 +2,19 @@ features: - | - Currently, only subclasses of :class:`qiskit.circuit.Instruction` can be put on - :class:`.QuantumCircuit`, but this interface has become unwieldy and includes too many methods - and attributes for general-purpose objects. - - A new :class:`.Operation` base class provides a lightweight abstract interface + Added a new :class:`.Operation` base class which provides a lightweight abstract interface for objects that can be put on :class:`.QuantumCircuit`. This allows to store "higher-level" objects directly on a circuit (for instance, :class:`.Clifford` objects), to directly combine such objects (for instance, to compose several consecutive :class:`.Clifford` objects over the same qubits), and to synthesize such objects at run time (for instance, to synthesize :class:`.Clifford` in a way that optimizes depth and/or exploits device connectivity). + Previously, only subclasses of :class:`qiskit.circuit.Instruction` could be put on + :class:`.QuantumCircuit`, but this interface has become unwieldy and includes too many methods + and attributes for general-purpose objects. The new :class:`.Operation` interface includes ``name``, ``num_qubits`` and ``num_clbits`` (in the future this may be slightly adjusted), but importantly does not include ``definition`` - or ``_define`` (and thus does not tie synthesis to the object), does not include ``condition`` + (and thus does not tie synthesis to the object), does not include ``condition`` (this should be part of separate classical control flow), and does not include ``duration`` and ``unit`` (as these are properties of the output of the transpiler). @@ -37,7 +36,8 @@ features: cliff = random_clifford(2) qc.append(cliff, [0, 1]) - no longer converts ``cliff`` to :class:`qiskit.circuit.Instruction` when it is appended to ``qc``. + no longer converts ``cliff`` to :class:`qiskit.circuit.Instruction`, which includes + synthesizing the clifford into a circuit, when it is appended to ``qc``. - | Added a new transpiler pass :class:`.OptimizeCliffords` that collects blocks of consecutive @@ -67,11 +67,6 @@ features: Added a new transpiler pass :class:`.HighLevelSynthesis` that synthesizes higher-level objects (for instance, :class:`.Clifford` objects). - As of now, :class:`.HighLevelSynthesis` is only limited to :class:`.Clifford` objects, but it will be - expanded to cover other higher-level objects (as more higher-level objects will become available). - In addition, the plan is to make :class:`.HighLevelSynthesis` "pluggable", so that the users - can "plug in" their own synthesis methods for higher-level objects at transpilation run time. - For example, the following code:: from qiskit import QuantumCircuit @@ -90,11 +85,9 @@ features: :func:`~qiskit.quantum_info.decompose_clifford` function. This new transpiler pass :class:`.HighLevelSynthesis` is integrated into the preset pass managers, - running right after :class:`.UnitarySynthesis` pass. Thus, ``qiskit.compiler.transpile()`` will + running right after :class:`.UnitarySynthesis` pass. Thus, :func:`.transpile` will synthesize all higher-level Cliffords present in the circuit. It is important to note that the work done to store :class:`.Clifford` objects as "higher-level" objects and to transpile these objects using :class:`.HighLevelSynthesis` pass should be completely - transparent to the users, absolutely no code changes are required. However, as explained before, - the users are now able to optimize consecutive Cliffords using the new :class:`.OptimizeCliffords` - pass, and in the future would be able to plug in their own synthesis methods for Cliffords. + transparent, and no code changes are required. diff --git a/releasenotes/notes/operator-parameters-c81b7c05bffb740b.yaml b/releasenotes/notes/0.22/operator-parameters-c81b7c05bffb740b.yaml similarity index 74% rename from releasenotes/notes/operator-parameters-c81b7c05bffb740b.yaml rename to releasenotes/notes/0.22/operator-parameters-c81b7c05bffb740b.yaml index 5d6edf00bad7..d8ceba9d7103 100644 --- a/releasenotes/notes/operator-parameters-c81b7c05bffb740b.yaml +++ b/releasenotes/notes/0.22/operator-parameters-c81b7c05bffb740b.yaml @@ -2,11 +2,12 @@ features: - | :class:`.SparsePauliOp`\ s can now be constructed with coefficient arrays - that are general Python objects. This is purely intended for use with Terra's + that are general Python objects. This is intended for use with :class:`.ParameterExpression` objects; other objects may work, but do not - have first-class support. Some :class:`.SparsePauliOp` methods (such as - conversion to other class representations) may not work when using ``object`` - arrays, if the desired target cannot represent these general arrays. + have first-class support. Some :class:`.SparsePauliOp` methods (such as + conversion to other class representations) may not work when using + ``object`` arrays, if the desired target cannot represent these general + arrays. For example, a :class:`.ParameterExpression` :class:`.SparsePauliOp` could be constructed by:: diff --git a/releasenotes/notes/plot-hist-797bfaeea2156c53.yaml b/releasenotes/notes/0.22/plot-hist-797bfaeea2156c53.yaml similarity index 84% rename from releasenotes/notes/plot-hist-797bfaeea2156c53.yaml rename to releasenotes/notes/0.22/plot-hist-797bfaeea2156c53.yaml index abece191abd2..978c5437666b 100644 --- a/releasenotes/notes/plot-hist-797bfaeea2156c53.yaml +++ b/releasenotes/notes/0.22/plot-hist-797bfaeea2156c53.yaml @@ -3,7 +3,15 @@ features: - | Added a new function :func:`~.plot_distribution` for plotting distributions over quasi-probabilities. This is suitable for ``Counts``, ``QuasiDistribution`` and ``ProbDistribution``. - Raw `dict` can be passed as well. + Raw `dict` can be passed as well. For example: + + .. jupyter-execute:: + + from qiskit.visualization import plot_distribution + + quasi_dist = {'0': .98, '1': -.01} + plot_distribution(quasi_dist) + upgrade: - | The :func:`~.plot_histogram` function has been modified to return an actual @@ -15,13 +23,12 @@ upgrade: probability distribution of the counts data you can leverage the :func:`~.plot_distribution` to generate an equivalent graph. For example, the previous behavior of ``plot_histogram({'00': 512, '11': 500})`` can be re-created with: - + .. jupyter-execute:: - + from qiskit.visualization import plot_distribution import matplotlib.pyplot as plt - + ax = plt.subplot() plot_distribution({'00': 512, '11': 500}, ax=ax) ax.set_ylabel('Probabilities') - ax.get_figure() diff --git a/releasenotes/notes/pluggable-high-level-synthesis-3af9976b22e012d9.yaml b/releasenotes/notes/0.22/pluggable-high-level-synthesis-3af9976b22e012d9.yaml similarity index 100% rename from releasenotes/notes/pluggable-high-level-synthesis-3af9976b22e012d9.yaml rename to releasenotes/notes/0.22/pluggable-high-level-synthesis-3af9976b22e012d9.yaml diff --git a/releasenotes/notes/0.22/prepare-0.22-118e15de86d36072.yaml b/releasenotes/notes/0.22/prepare-0.22-118e15de86d36072.yaml new file mode 100644 index 000000000000..deec31b207fe --- /dev/null +++ b/releasenotes/notes/0.22/prepare-0.22-118e15de86d36072.yaml @@ -0,0 +1,59 @@ +--- +prelude: | + The Qiskit Terra 0.22.0 release is a major feature release that includes + a myriad of new feature and bugfixes. The highlights for this release are: + + * Adding initial support to the transpiler for transpiling + :class:`~.QuantumCircuit` objects that contain control flow instructions + such as :class:`~.ForLoopOp` and :class:`~.WhileLoopOp`. + + * Greatly improved scaling and performance for the :func:`~.transpile` function + with large numbers of qubits, especially when ``optimization_level=3`` is used. + + * External plugin interface for :func:`~.transpile` that enables external + packages to implement stages for the default pass managers. More details on this + can be found at :mod:`qiskit.transpiler.preset_passmanagers.plugin`. + Additionally, :class:`~.BackendV2` backends can now optionally set + custom default plugins to use for the scheduling and translation stages. + + * Updated algorithm implementations in :mod:`qiskit.algorithms` that leverage + the :mod:`~.primitives` classes that implement the :class:`~.BaseSampler` and + :class:`~.BaseEstimator`. + +features: + - | + Added new primitive implementations, :class:`~.BackendSampler` and :class:`~.BackendEstimator`, + to :mod:`qiskit.primitives`. Thes new primitive class implementation wrap a :class:`~.BackendV1` + or :class:`~.BackendV2` instance as a :class:`~.BaseSampler` or :class:`~.BaseEstimator` + respectively. The intended use case for these primitive implementations is to bridge the gap + between providers that do not have native primitive implementations and use that provider's + backend with APIs that work with primitives. For example, the :class:`~.SamplingVQE` class + takes a :class:`~.BaseSampler` instance to function. If you'd like to run that class with + a backend from a provider without a native primitive implementation you can construct a + :class:`~.BackendSampler` to do this:: + + from qiskit.algorithms.minimum_eigensolvers import SamplingVQE + from qiskit.algorithms.optimizers import SLSQP + from qiskit.circuit.library import TwoLocal + from qiskit.primitives import BackendSampler + from qiskit.providers.fake_provider import FakeHanoi + from qiskit.opflow import PauliSumOp + from qiskit.quantum_info import SparsePauliOp + + backend = FakeHanoi() + sampler = BackendSampler(backend=backend) + + operator = PauliSumOp(SparsePauliOp(["ZZ", "IZ", "II"], coeffs=[1, -0.5, 0.12])) + ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz") + optimizer = SLSQP() + sampling_vqe = SamplingVQE(sampler, ansatz, optimizer) + result = sampling_vqe.compute_minimum_eigenvalue(operator) + eigenvalue = result.eigenvalue + + If you're using a provider that has native primitive implementations (such as + ``qiskit-ibm-runtime`` or ``qiskit-aer``) it is always a better choice to use that native + primitive implementation instead of :class:`~.BackendEstimator` or :class:`~.BackendSampler` + as the native implementations will be much more efficient and/or do additional pre and post + processing. :class:`~.BackendEstimator` and :class:`~.BackendSampler` are designed to be + generic that can work with any backend that returns :class:`~.Counts` in their + :class:`~.Results` which precludes additional optimization. diff --git a/releasenotes/notes/0.22/primitive-run-5d1afab3655330a6.yaml b/releasenotes/notes/0.22/primitive-run-5d1afab3655330a6.yaml new file mode 100644 index 000000000000..d6267404c245 --- /dev/null +++ b/releasenotes/notes/0.22/primitive-run-5d1afab3655330a6.yaml @@ -0,0 +1,46 @@ +--- +features: + - | + Added new methods for executing primitives: :meth:`.BaseSampler.run` and :meth:`.BaseEstimator.run`. + These methods execute asynchronously and return :class:`.JobV1` objects which + provide a handle to the exections. These new run methods can be passed :class:`~.QuantumCircuit` + objects (and observables for :class:`~.BaseEstimator`) that are not registered in the constructor. + For example:: + + estimator = Estimator() + result = estimator.run(circuits, observables, parameter_values).result() + + This provides an alternative to the previous execution model (which is now deprecated) for the + :class:`~.BaseSampler` and :class:`~.BaseEstimator` primitives which would take all the inputs via + the constructor and calling the primitive object with the combination of those input parameters + to use in the execution. +deprecations: + - | + The method of executing primitives has been changed. + The :meth:`.BaseSampler.__call__` and + :meth:`.BaseEstimator.__call__` methods were deprecated. + For example:: + + estimator = Estimator(...) + result = estimator(circuits, observables, parameters) + + sampler = Sampler(...) + result = sampler(circuits, observables, parameters) + + should be rewritten as + + .. code-block:: python + + estimator = Estimator() + result = estimator.run(circuits, observables, parameter_values).result() + + sampler = Sampler() + result = sampler.run(circuits, parameter_values).result() + + Using primitives as context managers is deprecated. + Not all primitives have a context manager available. When available (e.g. in ``qiskit-ibm-runtime``), + the session's context manager provides equivalent functionality. + + ``circuits``, ``observables``, and ``parameters`` in the constructor was deprecated. + ``circuits`` and ``observables`` can be passed from ``run`` methods. + ``run`` methods do not support ``parameters``. Users need to resort parameter values by themselves. diff --git a/releasenotes/notes/primitive-shots-option-ed320872d048483e.yaml b/releasenotes/notes/0.22/primitive-shots-option-ed320872d048483e.yaml similarity index 100% rename from releasenotes/notes/primitive-shots-option-ed320872d048483e.yaml rename to releasenotes/notes/0.22/primitive-shots-option-ed320872d048483e.yaml diff --git a/releasenotes/notes/0.22/primitives-run_options-eb4a360c3f1e197d.yaml b/releasenotes/notes/0.22/primitives-run_options-eb4a360c3f1e197d.yaml new file mode 100644 index 000000000000..39c24c4d9d6b --- /dev/null +++ b/releasenotes/notes/0.22/primitives-run_options-eb4a360c3f1e197d.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The constructors for the :class:`~.BaseSampler` and + :class:`~.BaseEstimator` primitive classes have a new optional keyword + argument, ``options`` which is used to set the default values for the + options exposed via the :attr:`~.BaseSampler.options` attribute. diff --git a/releasenotes/notes/project-dynamics-primitives-6003336d0866ca19.yaml b/releasenotes/notes/0.22/project-dynamics-primitives-6003336d0866ca19.yaml similarity index 83% rename from releasenotes/notes/project-dynamics-primitives-6003336d0866ca19.yaml rename to releasenotes/notes/0.22/project-dynamics-primitives-6003336d0866ca19.yaml index a665b63319b5..6ead6d45db4f 100644 --- a/releasenotes/notes/project-dynamics-primitives-6003336d0866ca19.yaml +++ b/releasenotes/notes/0.22/project-dynamics-primitives-6003336d0866ca19.yaml @@ -1,7 +1,7 @@ features: - | - Added the primitives-enabled :class:`PVQD` class to the time evolution framework. This class - implements the projected Variational Quantum Dynamics (p-VQD) algorithm as :class:`.PVQD` of + Added the :class:`~.PVQD` class to the time evolution framework in :mod:`qiskit.algorithms`. + This class implements the projected Variational Quantum Dynamics (p-VQD) algorithm `Barison et al. `_. In each timestep this algorithm computes the next state with a Trotter formula and projects it @@ -13,8 +13,9 @@ features: import numpy as np from qiskit.algorithms.state_fidelities import ComputeUncompute + from qiskit.algorithms.evolvers import EvolutionProblem from qiskit.algorithms.time_evolvers.pvqd import PVQD - from qiskit.primitives import Estimator + from qiskit.primitives import Estimator, Sampler from qiskit import BasicAer from qiskit.circuit.library import EfficientSU2 from qiskit.quantum_info import Pauli, SparsePauliOp @@ -35,8 +36,8 @@ features: pvqd = PVQD( fidelity, ansatz, - estimator, initial_parameters, + estimator, num_timesteps=100, optimizer=optimizer, ) diff --git a/releasenotes/notes/qasm3-fix-conditional-measurement-2d938cad74a9024a.yaml b/releasenotes/notes/0.22/qasm3-fix-conditional-measurement-2d938cad74a9024a.yaml similarity index 100% rename from releasenotes/notes/qasm3-fix-conditional-measurement-2d938cad74a9024a.yaml rename to releasenotes/notes/0.22/qasm3-fix-conditional-measurement-2d938cad74a9024a.yaml diff --git a/releasenotes/notes/0.22/qiskit-nature-797-8f1b0975309b8756.yaml b/releasenotes/notes/0.22/qiskit-nature-797-8f1b0975309b8756.yaml new file mode 100644 index 000000000000..3f9bbac59a65 --- /dev/null +++ b/releasenotes/notes/0.22/qiskit-nature-797-8f1b0975309b8756.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed an issue with the :class:`~.SPSA` class where internally it was + trying to batch jobs into even sized batches which would raise an + exception if creating even batches was not possible. This has been fixed + so it will always batch jobs successfully even if they're not evenly sized. diff --git a/releasenotes/notes/qiskit.pulse.builder-ddefe88dca5765b9.yaml b/releasenotes/notes/0.22/qiskit.pulse.builder-ddefe88dca5765b9.yaml similarity index 100% rename from releasenotes/notes/qiskit.pulse.builder-ddefe88dca5765b9.yaml rename to releasenotes/notes/0.22/qiskit.pulse.builder-ddefe88dca5765b9.yaml diff --git a/releasenotes/notes/0.22/qnspsa-primitification-29a9dcae055bf2b4.yaml b/releasenotes/notes/0.22/qnspsa-primitification-29a9dcae055bf2b4.yaml new file mode 100644 index 000000000000..6cc31b2da775 --- /dev/null +++ b/releasenotes/notes/0.22/qnspsa-primitification-29a9dcae055bf2b4.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + The :meth:`.QNSPSA.get_fidelity` static method now supports an optional + ``sampler`` argument which is used to provide an implementation of the + :class:`~.BaseSampler` interface (such as :class:`~.Sampler`, + :class:`~.BackendSampler`, or any provider implementations such as those + present in ``qiskit-ibm-runtime`` and ``qiskit-aer``) to compute the + fidelity of a :class:`~.QuantumCircuit`. For example:: + + from qiskit.primitives import Sampler + from qiskit.algorithms.optimizers import QNSPSA + + fidelity = QNSPSA.get_fidelity(my_circuit, Sampler()) diff --git a/releasenotes/notes/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml b/releasenotes/notes/0.22/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml similarity index 53% rename from releasenotes/notes/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml rename to releasenotes/notes/0.22/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml index 3435b6980b0d..cf287d37f7d0 100644 --- a/releasenotes/notes/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml +++ b/releasenotes/notes/0.22/qpe-algorithms-primitives-3605bdfa5ab1bfef.yaml @@ -1,11 +1,19 @@ --- features: - | - Added :class:`~qiskit.primitives.BaseSampler` as ``init`` parameter - for the following phase estimation algorithms: - :class:`~qiskit.algorithms.IterativePhaseEstimation`, - :class:`~qiskit.algorithms.PhaseEstimation`, - :class:`~qiskit.algorithms.HamiltonianPhaseEstimation`. + Added a new keyword argument ``sampler`` to the constructors of the + phase estimation classes: + + * :class:`~qiskit.algorithms.IterativePhaseEstimation` + * :class:`~qiskit.algorithms.PhaseEstimation` + * :class:`~qiskit.algorithms.HamiltonianPhaseEstimation` + + This argument is used to provide an implementation of the + :class:`~qiskit.primitives.BaseSampler` interface such as :class:`~.Sampler`, + :class:`~.BackendSampler`, or any provider implementations such as those + as those present in ``qiskit-ibm-runtime`` and ``qiskit-aer``. + + For example: .. code-block:: python @@ -29,11 +37,3 @@ features: evolution=MatrixExponential(), bound=1.05, ) -deprecations: - - | - Using :class:`~qiskit.utils.QuantumInstance` or :class:`~qiskit.providers.Backend` as - ``init`` parameters will now issue a ``PendingDeprecationWarning`` - for the following phase estimation algorithms: - :class:`~qiskit.algorithms.IterativePhaseEstimation`, - :class:`~qiskit.algorithms.PhaseEstimation`, - :class:`~qiskit.algorithms.HamiltonianPhaseEstimation` diff --git a/releasenotes/notes/rabre-rwap-ae51631bec7450df.yaml b/releasenotes/notes/0.22/rabre-rwap-ae51631bec7450df.yaml similarity index 90% rename from releasenotes/notes/rabre-rwap-ae51631bec7450df.yaml rename to releasenotes/notes/0.22/rabre-rwap-ae51631bec7450df.yaml index 6c846f06cf2b..9485fb3864e4 100644 --- a/releasenotes/notes/rabre-rwap-ae51631bec7450df.yaml +++ b/releasenotes/notes/0.22/rabre-rwap-ae51631bec7450df.yaml @@ -2,8 +2,7 @@ features: - | The :class:`~.SabreSwap` transpiler pass has significantly improved - performance because of a rewrite of the internal scoring heuristic in - Rust. + runtime performance due to a rewrite of the algorithm in Rust. upgrade: - | The output from the :class:`~.SabreSwap` transpiler pass (including when diff --git a/releasenotes/notes/register-add-fix-e29fa2ee47aa6d05.yaml b/releasenotes/notes/0.22/register-add-fix-e29fa2ee47aa6d05.yaml similarity index 100% rename from releasenotes/notes/register-add-fix-e29fa2ee47aa6d05.yaml rename to releasenotes/notes/0.22/register-add-fix-e29fa2ee47aa6d05.yaml diff --git a/releasenotes/notes/0.22/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml b/releasenotes/notes/0.22/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml new file mode 100644 index 000000000000..25e921e3b396 --- /dev/null +++ b/releasenotes/notes/0.22/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml @@ -0,0 +1,12 @@ +--- +upgrade: + - | + The deprecated method ``SparsePauliOp.table`` attribute has been removed. + It was originally deprecated in Qiskit Terra 0.19. Instead the + :meth:`~.SparsePauliOp.paulis` method should be used. + - | + Support for returning a :class:`~.PauliTable` from the + :func:`~.pauli_basis` function has been removed. Similarly, the + ``pauli_list`` argument on the :func:`~.pauli_basis` function which was + used to switch to a :class:`~.PauliList` (now the only return type) has + been removed. This functionality was deprecated in the Qiskit Terra 0.19 release. diff --git a/releasenotes/notes/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml b/releasenotes/notes/0.22/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml similarity index 100% rename from releasenotes/notes/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml rename to releasenotes/notes/0.22/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml diff --git a/releasenotes/notes/remove-symbolic-pulse-subclasses-77314a1654521852.yaml b/releasenotes/notes/0.22/remove-symbolic-pulse-subclasses-77314a1654521852.yaml similarity index 83% rename from releasenotes/notes/remove-symbolic-pulse-subclasses-77314a1654521852.yaml rename to releasenotes/notes/0.22/remove-symbolic-pulse-subclasses-77314a1654521852.yaml index 9bab49b21f71..0162dfcad6a7 100644 --- a/releasenotes/notes/remove-symbolic-pulse-subclasses-77314a1654521852.yaml +++ b/releasenotes/notes/0.22/remove-symbolic-pulse-subclasses-77314a1654521852.yaml @@ -11,9 +11,10 @@ features: upgrade: - | ``isinstance`` check with pulse classes :class:`.Gaussian`, :class:`.GaussianSquare`, - :class:`.Drag` and :class:`.Constant` has been invalidated because - these pulse subclasses are no longer instantiated. - Instead of using type information, :attr:`SymbolicPulse.pulse_type` must be used. + :class:`.Drag` and :class:`.Constant` will be invalidated because + these pulse subclasses are no longer instantiated. They will still work in Terra 0.22, + but you should begin transitioning immediately. + Instead of using type information, :attr:`SymbolicPulse.pulse_type` should be used. This is assumed to be a unique string identifer for pulse envelopes, and we can use string equality to investigate the pulse types. For example, @@ -23,7 +24,7 @@ upgrade: pulse = Gaussian(160, 0.1, 40) - if isinstance(pulse, Gaussian) + if isinstance(pulse, Gaussian): print("This is Gaussian pulse.") This code should be upgraded to diff --git a/releasenotes/notes/remove_QiskitIndexError-098fa04f0afe440b.yaml b/releasenotes/notes/0.22/remove_QiskitIndexError-098fa04f0afe440b.yaml similarity index 100% rename from releasenotes/notes/remove_QiskitIndexError-098fa04f0afe440b.yaml rename to releasenotes/notes/0.22/remove_QiskitIndexError-098fa04f0afe440b.yaml diff --git a/releasenotes/notes/0.22/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml b/releasenotes/notes/0.22/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml new file mode 100644 index 000000000000..e46cf58813dd --- /dev/null +++ b/releasenotes/notes/0.22/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The deprecated arguments ``epsilon`` and ``factr`` for the constructor of + the :class:`~.L_BFGS_B` optimizer class have been removed. These arguments + were originally deprecated as part of the 0.18.0 release (released on + July 12, 2021). Instead the ``ftol`` argument should be used, you + can refer to the `scipy docs `__ + on the optimizer for more detail on the relationship between these arguments. diff --git a/releasenotes/notes/rh1_state_to_latex_fix-e36e47cbdb25033e.yaml b/releasenotes/notes/0.22/rh1_state_to_latex_fix-e36e47cbdb25033e.yaml similarity index 100% rename from releasenotes/notes/rh1_state_to_latex_fix-e36e47cbdb25033e.yaml rename to releasenotes/notes/0.22/rh1_state_to_latex_fix-e36e47cbdb25033e.yaml diff --git a/releasenotes/notes/sabres-for-everyone-3148ccf2064ccb0d.yaml b/releasenotes/notes/0.22/sabres-for-everyone-3148ccf2064ccb0d.yaml similarity index 85% rename from releasenotes/notes/sabres-for-everyone-3148ccf2064ccb0d.yaml rename to releasenotes/notes/0.22/sabres-for-everyone-3148ccf2064ccb0d.yaml index 2be30c7a290e..44c8facd68e2 100644 --- a/releasenotes/notes/sabres-for-everyone-3148ccf2064ccb0d.yaml +++ b/releasenotes/notes/0.22/sabres-for-everyone-3148ccf2064ccb0d.yaml @@ -5,13 +5,13 @@ upgrade: ``optimization_level=1`` or ``optimization_level=2`` with :func:`~.transpile` or :func:`~.generate_preset_pass_manager` and output from :func:`~.level_1_pass_manager` and :func:`~.level_2_pass_manager`, - will now use :class:`~.SabreLayout` and :func:`~SabreSwap` by default + will now use :class:`~.SabreLayout` and :class:`~SabreSwap` by default instead of the previous defaults :class:`~.DenseLayout` and :class:`~.StochasticSwap`. This change was made to improve the output quality of the transpiler, the :class:`~.SabreLayout` and - :func:`~SabreSwap` combination typically results in fewer + :class:`~SabreSwap` combination typically results in fewer :class:`~.SwapGate` objects being inserted into the output circuit. If you would like to use the previous default passes you can set ``layout_method='dense'`` and ``routing_method='stochastic'`` on - :func:`~.transpile` or :func:`~.generate_preset_pass_manager to + :func:`~.transpile` or :func:`~.generate_preset_pass_manager` to leverage :class:`~.DenseLayout` and :class:`~.StochasticSwap` respectively. diff --git a/releasenotes/notes/0.22/sampled_expval-85e300e0fb5fa5ea.yaml b/releasenotes/notes/0.22/sampled_expval-85e300e0fb5fa5ea.yaml new file mode 100644 index 000000000000..434c9f941772 --- /dev/null +++ b/releasenotes/notes/0.22/sampled_expval-85e300e0fb5fa5ea.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Added a new function, :func:`~.sampled_expectation_value`, that allows + for computing expectation values for diagonal operators from + distributions such as :class:`~.Counts` and :class:`~.QuasiDistribution`. + Valid operators for use with this function are: ``str``, :class:`~.Pauli`, + :class:`~.PauliOp`, :class:`~.PauliSumOp`, and + :class:`~.SparsePauliOp`. diff --git a/releasenotes/notes/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml b/releasenotes/notes/0.22/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml similarity index 93% rename from releasenotes/notes/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml rename to releasenotes/notes/0.22/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml index 09644d08a537..881e0a1c0648 100644 --- a/releasenotes/notes/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml +++ b/releasenotes/notes/0.22/sampling-vqe-and-qaoa-ecfb36a0a300f69b.yaml @@ -14,6 +14,8 @@ features: from qiskit.algorithms.optimizers import SLSQP from qiskit.circuit.library import TwoLocal from qiskit.primitives import Sampler + from qiskit.opflow import PauliSumOp + from qiskit.quantum_info import SparsePauliOp operator = PauliSumOp(SparsePauliOp(["ZZ", "IZ", "II"], coeffs=[1, -0.5, 0.12])) diff --git a/releasenotes/notes/0.22/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml b/releasenotes/notes/0.22/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml new file mode 100644 index 000000000000..ad926507bee5 --- /dev/null +++ b/releasenotes/notes/0.22/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added a new ``atol`` keyword argument to the :meth:`.SparsePauliOp.equiv` + method to adjust to tolerance of the equivalence check, diff --git a/releasenotes/notes/stage-plugin-interface-47daae40f7d0ad3c.yaml b/releasenotes/notes/0.22/stage-plugin-interface-47daae40f7d0ad3c.yaml similarity index 100% rename from releasenotes/notes/stage-plugin-interface-47daae40f7d0ad3c.yaml rename to releasenotes/notes/0.22/stage-plugin-interface-47daae40f7d0ad3c.yaml diff --git a/releasenotes/notes/state_to_latex_for_none-da834de3811640ce.yaml b/releasenotes/notes/0.22/state_to_latex_for_none-da834de3811640ce.yaml similarity index 100% rename from releasenotes/notes/state_to_latex_for_none-da834de3811640ce.yaml rename to releasenotes/notes/0.22/state_to_latex_for_none-da834de3811640ce.yaml diff --git a/releasenotes/notes/steppable-optimizers-9d9b48ba78bd58bb.yaml b/releasenotes/notes/0.22/steppable-optimizers-9d9b48ba78bd58bb.yaml similarity index 81% rename from releasenotes/notes/steppable-optimizers-9d9b48ba78bd58bb.yaml rename to releasenotes/notes/0.22/steppable-optimizers-9d9b48ba78bd58bb.yaml index 6bde2fc01a40..9e5c3916c782 100644 --- a/releasenotes/notes/steppable-optimizers-9d9b48ba78bd58bb.yaml +++ b/releasenotes/notes/0.22/steppable-optimizers-9d9b48ba78bd58bb.yaml @@ -17,16 +17,10 @@ features: from qiskit.algorithms.optimizers import GradientDescent def objective(x): - if random.choice([True, False]): - return None - else: - return (np.linalg.norm(x) - 1) ** 2 + return (np.linalg.norm(x) - 1) ** 2 def grad(x): - if random.choice([True, False]): - return None - else: - return 2 * (np.linalg.norm(x) - 1) * x / np.linalg.norm(x) + return 2 * (np.linalg.norm(x) - 1) * x / np.linalg.norm(x) initial_point = np.random.normal(0, 1, size=(100,)) @@ -35,13 +29,13 @@ features: optimizer.start(x0=initial_point, fun=objective, jac=grad) for _ in range(maxiter): - state = optimizer.state - # Here you can manually read out anything from the optimizer state. - optimizer.step() + state = optimizer.state + # Here you can manually read out anything from the optimizer state. + optimizer.step() result = optimizer.create_result() - A more complex case would be error handling. Imagine that the funciton you are evaluating has + A more complex case would be error handling. Imagine that the function you are evaluating has a random chance of failing. In this case you can catch the error and run the function again until it yields the desired result before continuing the optimization process. In this case one would use the ask and tell interface. @@ -80,17 +74,15 @@ features: optmizer.state.nit += 1 - cf = TellData(eval_jac=evaluated_gradient) + cf = TellData(eval_jac=evaluated_gradient) optimizer.tell(ask_data=ask_data, tell_data=tell_data) result = optimizer.create_result() - Transitioned GradientDescent to be a subclass of SteppableOptimizer. + Transitioned :class:`GradientDescent` to be a subclass of :class:`.SteppableOptimizer`. fixes: - | :class:`.GradientDescent` will now correctly count the number of iterations, function evaluations and gradient evaluations. Also the documentation now correctly states that the gradient is approximated by a forward finite difference method. - - diff --git a/releasenotes/notes/switched-to-StandardScaler-43d24a7918e96c14.yaml b/releasenotes/notes/0.22/switched-to-StandardScaler-43d24a7918e96c14.yaml similarity index 100% rename from releasenotes/notes/switched-to-StandardScaler-43d24a7918e96c14.yaml rename to releasenotes/notes/0.22/switched-to-StandardScaler-43d24a7918e96c14.yaml diff --git a/releasenotes/notes/tensored-subset-fitter-bd28e6e6ec5bdaae.yaml b/releasenotes/notes/0.22/tensored-subset-fitter-bd28e6e6ec5bdaae.yaml similarity index 100% rename from releasenotes/notes/tensored-subset-fitter-bd28e6e6ec5bdaae.yaml rename to releasenotes/notes/0.22/tensored-subset-fitter-bd28e6e6ec5bdaae.yaml diff --git a/releasenotes/notes/transpiler-control-flow-708896bfdb51961d.yaml b/releasenotes/notes/0.22/transpiler-control-flow-708896bfdb51961d.yaml similarity index 100% rename from releasenotes/notes/transpiler-control-flow-708896bfdb51961d.yaml rename to releasenotes/notes/0.22/transpiler-control-flow-708896bfdb51961d.yaml diff --git a/releasenotes/notes/0.22/trotter-qrte-primitives-8b3e495738b57fc3.yaml b/releasenotes/notes/0.22/trotter-qrte-primitives-8b3e495738b57fc3.yaml new file mode 100644 index 000000000000..4e7c0944f95b --- /dev/null +++ b/releasenotes/notes/0.22/trotter-qrte-primitives-8b3e495738b57fc3.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Added a new :class:`~qiskit.algorithms.time_evolvers.trotterization.TrotterQRTE` class + that implements the :class:`~.RealTimeEvolver` interface that uses an + :class:`qiskit.primitives.BaseEstimator` to perform the calculation. This + new class supersedes the previously available :class:`qiskit.algorithms.TrotterQRTE` + class (which will be deprecated and subsequenty removed in future releases) that used + a :class:`~.Backend` or :class:`~QuantumInstance` to perform the calculation. diff --git a/releasenotes/notes/turn-off-approx-degree-df3d39eb69f7f09f.yaml b/releasenotes/notes/0.22/turn-off-approx-degree-df3d39eb69f7f09f.yaml similarity index 90% rename from releasenotes/notes/turn-off-approx-degree-df3d39eb69f7f09f.yaml rename to releasenotes/notes/0.22/turn-off-approx-degree-df3d39eb69f7f09f.yaml index b5cf69942984..033bab64a0e7 100644 --- a/releasenotes/notes/turn-off-approx-degree-df3d39eb69f7f09f.yaml +++ b/releasenotes/notes/0.22/turn-off-approx-degree-df3d39eb69f7f09f.yaml @@ -10,7 +10,7 @@ upgrade: transformations that break unitary equivalence should be explicitly activated by the user. If you desire the previous default behavior where synthesized :class:`~UnitaryGate` instructions are approximated up to the error rates of the target backend's native instructions you can explicitly - set ``approximation_degree=None` when calling :func:`~.transpile` with ``optimization_level=3``, for + set ``approximation_degree=None`` when calling :func:`~.transpile` with ``optimization_level=3``, for example:: transpile(circuit, backend, approximation_degree=None, optimization_level=3) diff --git a/releasenotes/notes/update-DAGCircuit.substitute_node_with_dag-3a44d16b1a82df41.yaml b/releasenotes/notes/0.22/update-DAGCircuit.substitute_node_with_dag-3a44d16b1a82df41.yaml similarity index 100% rename from releasenotes/notes/update-DAGCircuit.substitute_node_with_dag-3a44d16b1a82df41.yaml rename to releasenotes/notes/0.22/update-DAGCircuit.substitute_node_with_dag-3a44d16b1a82df41.yaml diff --git a/releasenotes/notes/update-bfgs-optimizer-29b4ffa6724fbf38.yaml b/releasenotes/notes/0.22/update-bfgs-optimizer-29b4ffa6724fbf38.yaml similarity index 100% rename from releasenotes/notes/update-bfgs-optimizer-29b4ffa6724fbf38.yaml rename to releasenotes/notes/0.22/update-bfgs-optimizer-29b4ffa6724fbf38.yaml diff --git a/releasenotes/notes/update-prob-quasi-2044285a46219d14.yaml b/releasenotes/notes/0.22/update-prob-quasi-2044285a46219d14.yaml similarity index 78% rename from releasenotes/notes/update-prob-quasi-2044285a46219d14.yaml rename to releasenotes/notes/0.22/update-prob-quasi-2044285a46219d14.yaml index cd052278ff65..4bcfc80d578f 100644 --- a/releasenotes/notes/update-prob-quasi-2044285a46219d14.yaml +++ b/releasenotes/notes/0.22/update-prob-quasi-2044285a46219d14.yaml @@ -3,8 +3,8 @@ upgrade: - | Updated :class:`~qiskit.result.ProbDistribution` and :class:`~qiskit.result.QuasiDistribution` to store the information of the number of bits if bitstrings without prefix "0b" are given. - :meth:`~qiskit.result.ProbDistribution.binary_probabilities` and - :meth:`~qiskit.result.QuasiDistribution.binary_probabilities` use the stored number of bits + :meth:`.ProbDistribution.binary_probabilities` and + :meth:`.QuasiDistribution.binary_probabilities` use the stored number of bits as the default value of the number of bits. .. code-block: python diff --git a/releasenotes/notes/0.22/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml b/releasenotes/notes/0.22/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml new file mode 100644 index 000000000000..db40df63bcf2 --- /dev/null +++ b/releasenotes/notes/0.22/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml @@ -0,0 +1,17 @@ +--- +upgrade: + - | + :class:`.RZXCalibrationBuilder` and :class:`.RZXCalibrationBuilderNoEcho` + have been upgraded to skip stretching CX gates implemented by + non-echoed cross resonance (ECR) sequence to avoid termination of the pass + with unexpected errors. + These passes take new argument ``verbose`` that controls whether the passes + warn when this occurs. If ``verbose=True`` is set, pass raises user warning + when it enconters non-ECR sequence. +deprecations: + - | + The unused argument ``qubit_channel_mapping`` in the + :class:`.RZXCalibrationBuilder` and :class:`.RZXCalibrationBuilderNoEcho` + transpiler passes have been deprecated and will be removed in a future + release. This argument is no longer used and has no effect on the + operation of the passes. diff --git a/releasenotes/notes/visualization-reorganisation-9e302239705c7842.yaml b/releasenotes/notes/0.22/visualization-reorganisation-9e302239705c7842.yaml similarity index 100% rename from releasenotes/notes/visualization-reorganisation-9e302239705c7842.yaml rename to releasenotes/notes/0.22/visualization-reorganisation-9e302239705c7842.yaml diff --git a/releasenotes/notes/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml b/releasenotes/notes/0.22/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml similarity index 96% rename from releasenotes/notes/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml rename to releasenotes/notes/0.22/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml index 5285b1d57176..379bcf321d34 100644 --- a/releasenotes/notes/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml +++ b/releasenotes/notes/0.22/vqe-with-estimator-primitive-7cbcc462ad4dc593.yaml @@ -13,6 +13,7 @@ features: from qiskit.algorithms.optimizers import SLSQP from qiskit.circuit.library import TwoLocal from qiskit.primitives import Estimator + from qiskit.quantum_info import SparsePauliOp h2_op = SparsePauliOp( ["II", "IZ", "ZI", "ZZ", "XX"], diff --git a/releasenotes/notes/add-backend-sampler-dcee9d4db17d5956.yaml b/releasenotes/notes/add-backend-sampler-dcee9d4db17d5956.yaml deleted file mode 100644 index 64481d70420e..000000000000 --- a/releasenotes/notes/add-backend-sampler-dcee9d4db17d5956.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -features: - - | - Added a new :class:`~.BaseSampler` implementation, :class:`~.BackendSampler`, which is - used to create a sampler implementation from a :class:~.Backend` object. If a provider - doesn't provide native primitive implementations the :class:`~.BackendSampler` class - can be used to run anything that requires a sampler primitive object with any backend. - For example:: - - from qiskit.primitives import BackendSampler - from qiskit.providers.fake_provider import FakeVigo - - sampler_for_retired_device = BackendSampler(backend=FakeVigo()) - qc = QuantumCircuit(2) - qc.h(0) - qc.cx(0, 1) - qc.measure_all() - sampler_for_retired_device.run(qc) diff --git a/releasenotes/notes/add-barrier-label-8e677979cb37461e.yaml b/releasenotes/notes/add-barrier-label-8e677979cb37461e.yaml deleted file mode 100644 index 9687f19bcc8e..000000000000 --- a/releasenotes/notes/add-barrier-label-8e677979cb37461e.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -features: - - | - Added a ``label`` parameter to the :class:`.Barrier` which now allows - a user to enter a label for the ``barrier`` directive and the label - will be printed at the top of the ``barrier`` in the `mpl`, `latex`, - and `text` circuit drawers. Printing of existing ``snapshot`` labels - to the 3 circuit drawers was also added. - - .. code-block:: python - - from qiskit import QuantumCircuit - - circuit = QuantumCircuit(2) - circuit.h(0) - circuit.h(1) - circuit.barrier(label="After H") - circuit.draw('mpl') diff --git a/releasenotes/notes/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml b/releasenotes/notes/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml deleted file mode 100644 index c15c8f52ed5d..000000000000 --- a/releasenotes/notes/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - Add new gates :class:`.CZZGate`, :class:`.CSGate`, and :class:`.CSdgGate`. - Added their equivalences into the standard :class:`EquivalenceLibrary`. diff --git a/releasenotes/notes/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml b/releasenotes/notes/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml deleted file mode 100644 index 310eff9357c3..000000000000 --- a/releasenotes/notes/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -features: - - | - New gradient Algorithms using the primitives have been added. They internally - use the primitives to calculate the gradients. There are 4 types of - gradient classes (Finite Difference, Parameter Shift, - Linear Combination of Unitary, and SPSA) for a sampler and estimator. - - For example: - - .. code-block:: python - - estimator = Estimator(...) - gradient = ParamShiftEstimatorGradient(estimator) - job = gradient.run(circuits, observables, parameters) - gradients = job.result().gradients diff --git a/releasenotes/notes/add-grover-primitives-10f81efdba93703d.yaml b/releasenotes/notes/add-grover-primitives-10f81efdba93703d.yaml deleted file mode 100644 index 63ac8886ea96..000000000000 --- a/releasenotes/notes/add-grover-primitives-10f81efdba93703d.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -features: - - | - :class:`~.Grover` supports the primitives and can use :class:`~.BaseSampler` to - calculate the results. Accordingly, ``quantum instance`` in :class:`~.Grover` - is pending deprecation and will be deprecated in a future release. - - Example: - - .. code-block:: python - - from qiskit import QuantumCircuit - from qiskit.primitives import Sampler - from qiskit.algorithms import Grover, AmplificationProblem - - sampler = Sampler() - oracle = QuantumCircuit(2) - oracle.cz(0, 1) - problem = AmplificationProblem(oracle, is_good_state=["11"]) - grover = Grover(sampler=sampler) - result = grover.amplify(problem) - -deprecations: - - | - Using a :class:`~.QuantumInstance` in :class:`~.Grover` is - pending deprecation and will be deprecated in a future release. Instead, use - a :class:`.BaseSampler` to calculate the results, see also the features of this release. diff --git a/releasenotes/notes/add-pulse-drawer-option-936b6d943de9a270.yaml b/releasenotes/notes/add-pulse-drawer-option-936b6d943de9a270.yaml deleted file mode 100644 index 17406410d26b..000000000000 --- a/releasenotes/notes/add-pulse-drawer-option-936b6d943de9a270.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -features: - - | - New pulse drawer option "formatter.control.fill_waveform" has been added to - the style sheets. This option removes the face color of pulses in the drawer. - For example: - - .. code-block:: python - - from qiskit.visualization.pulse_v2 import IQXStandard - - my_style = IQXStandard( - **{"formatter.control.fill_waveform": False, "formatter.line_width.fill_waveform": 2} - ) - - my_sched.draw(style=my_style) - - This code allows a user to draw pulses only with lines. diff --git a/releasenotes/notes/add-reset-simplification-pass-82377d80dd0081fd.yaml b/releasenotes/notes/add-reset-simplification-pass-82377d80dd0081fd.yaml deleted file mode 100644 index 6722958653f9..000000000000 --- a/releasenotes/notes/add-reset-simplification-pass-82377d80dd0081fd.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -features: - - | - Added a new transpiler pass, :class:`~ResetAfterMeasureSimplification`, - which is used to replace a :class:`~.Reset` operation after a - :class:`~.Measure` with a conditional :class:`~.XGate`. This pass can - be used on backends where a :class:`~.Reset` operation is performed by - doing a measurement and then a conditional X gate so that this will - remove the duplicate implicit :class:`~.Measure` from the :class:`~.Reset` - operation. diff --git a/releasenotes/notes/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml b/releasenotes/notes/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml deleted file mode 100644 index 1f51ab260d56..000000000000 --- a/releasenotes/notes/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -features: - - | - Add a new entanglement method `entanglement="reverse_linear"` to :class:`~.NLocal` circuits. - In the case of :class:`~.TwoLocal` circuits, if `entanglement_blocks="cx"` then - `entanglement="reverse_linear"` actually provides the same n-qubit circuit as - `entanglement="full"` but with only n-1 CX gates, instead of n(n-1)/2. - For :class:`~.RealAmplitudes` and :class:`~.EfficientSU2` circuits, the default value - has therefore been changed from `entanglement="full"` to `entanglement="reverse_linear"`. diff --git a/releasenotes/notes/add-sampler-error-check-38426fb186db44d4.yaml b/releasenotes/notes/add-sampler-error-check-38426fb186db44d4.yaml deleted file mode 100644 index aa481d8107fd..000000000000 --- a/releasenotes/notes/add-sampler-error-check-38426fb186db44d4.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -upgrade: - - | - Added a validation check to :meth:`~qiskit.primitives.BaseSampler.run`. - It raises an error if there is no classical bit. - diff --git a/releasenotes/notes/add-wire-order-to-drawers-657cb54e365c621a.yaml b/releasenotes/notes/add-wire-order-to-drawers-657cb54e365c621a.yaml deleted file mode 100644 index fb4bffe516de..000000000000 --- a/releasenotes/notes/add-wire-order-to-drawers-657cb54e365c621a.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -features: - - | - Added the ``wire_order`` option to each of the 3 circuit drawers - ``mpl``, ``latex``, - and ``text``. This option allows users to reorder the display of the quantum and classical - bits in the drawers. - - .. code-block:: python - - from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister - - qr = QuantumRegister(4, "q") - cr = ClassicalRegister(4, "c") - cr2 = ClassicalRegister(2, "ca") - circuit = QuantumCircuit(qr, cr, cr2) - circuit.h(0) - circuit.h(3) - circuit.x(1) - circuit.x(3).c_if(cr, 10) - circuit.draw('mpl', cregbundle=False, wire_order=[2, 1, 3, 0, 6, 8, 9, 5, 4, 7]) diff --git a/releasenotes/notes/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml b/releasenotes/notes/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml deleted file mode 100644 index 23f2866c75dc..000000000000 --- a/releasenotes/notes/add_cnot_dihedral_class_cs_ccz_gates-6bd567daf3a467bd.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -features: - - | - Add the new gates :class:`~qiskit.circuit.library.CSGate`, - :class:`~qiskit.circuit.library.CSdgGate` and :class:`~qiskit.circuit.library.CCZGate` - to the operator class:`~qiskit.quantum_info.CNOTDihedral` class. diff --git a/releasenotes/notes/ae-algorithms-primitives-497bae1b2b04f877.yaml b/releasenotes/notes/ae-algorithms-primitives-497bae1b2b04f877.yaml deleted file mode 100644 index 35e204ef1f60..000000000000 --- a/releasenotes/notes/ae-algorithms-primitives-497bae1b2b04f877.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -features: - - | - Added :class:`~qiskit.primitives.BaseSampler` as ``init`` parameter - for the following amplitude estimation algorithms: - :class:`~qiskit.algorithms.amplitude_estimators.AmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.FasterAmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.IterativeAmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.MaximumLikelihoodAmplitudeEstimation` -deprecations: - - | - Using :class:`~qiskit.utils.QuantumInstance` or :class:`~qiskit.providers.Backend` as - ``init`` parameters will now issue a ``PendingDeprecationWarning`` - for the following amplitude estimation algorithms: - :class:`~qiskit.algorithms.amplitude_estimators.AmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.FasterAmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.IterativeAmplitudeEstimation`, - :class:`~qiskit.algorithms.amplitude_estimators.MaximumLikelihoodAmplitudeEstimation` diff --git a/releasenotes/notes/backend_name_fix-175e12b5cf902f99.yaml b/releasenotes/notes/backend_name_fix-175e12b5cf902f99.yaml deleted file mode 100644 index e9bb9be5acf4..000000000000 --- a/releasenotes/notes/backend_name_fix-175e12b5cf902f99.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - 'aer_simulator_statevector_gpu' was not recognized correctly as statevector - method in some function when using GPU on Qiskit Aer. - This fix recognizes both 'aer_simulator_statevector' and - 'aer_simulator_statevector_gpu' the backend is statevector. diff --git a/releasenotes/notes/base-operators-sums-d331e78a9fa4b5d8.yaml b/releasenotes/notes/base-operators-sums-d331e78a9fa4b5d8.yaml deleted file mode 100644 index 1c92d6d6e85c..000000000000 --- a/releasenotes/notes/base-operators-sums-d331e78a9fa4b5d8.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - ``qiskit.quantum_info.BaseOperator`` subclasses (like :class:`.ScalarOp`, - :class:`.SparsePauliOp` and :class:`.PauliList`) can now be used with ``sum``. diff --git a/releasenotes/notes/bugfix-ucgate-inverse-global_phase-c9655c13c22e5cf4.yaml b/releasenotes/notes/bugfix-ucgate-inverse-global_phase-c9655c13c22e5cf4.yaml deleted file mode 100644 index eae30452782b..000000000000 --- a/releasenotes/notes/bugfix-ucgate-inverse-global_phase-c9655c13c22e5cf4.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -fixes: - - | - Fixes the :meth:`.UCGate.inverse` method which previously did not invert the - global phase. - - | - Fixes the global phase problem of the isometry decomposition. Refer to - `#4687 ` for more - details. diff --git a/releasenotes/notes/decompose-fix-993f7242eaa69407.yaml b/releasenotes/notes/decompose-fix-993f7242eaa69407.yaml deleted file mode 100644 index 93f259266ef5..000000000000 --- a/releasenotes/notes/decompose-fix-993f7242eaa69407.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -fixes: - - Fixed a bug in :meth:`.QuantumCircuit.decompose` that caused the - `gates_to_decompose` argument to be handled incorrectly. \ No newline at end of file diff --git a/releasenotes/notes/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml b/releasenotes/notes/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml deleted file mode 100644 index d51f67f19127..000000000000 --- a/releasenotes/notes/deprecate-stabilizer-table-9efd08c7de1a5b4d.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -features: - - | - Add methods :attr:`.Clifford.symplectic_matrix`, :attr:`.Clifford.tableau`, - :attr:`.Clifford.z`, :attr:`.Clifford.x`, :attr:`.Clifford.phase`, - :attr:`.Clifford.stab`, :attr:`.Clifford.stab_z`, :attr:`.Clifford.stab_x`, :attr:`.Clifford.stab_phase`, - :attr:`.Clifford.destab`, :attr:`.Clifford.destab_z`, :attr:`.Clifford.destab_x`, :attr:`.Clifford.destab_phase`. - These methods can be used instead of :attr:`.Clifford.table`, that will be deprecated in the future. - :class:`StabilizerTable` and :class:`PauliTable` are pending deprecation and - will be deprecated in the future release and subsequently removed after that. -deprecations: - - | - :func:`.random_stabilizer_table` is deprecated. diff --git a/releasenotes/notes/edge-coloring-e55700fcf8902c79.yaml b/releasenotes/notes/edge-coloring-e55700fcf8902c79.yaml deleted file mode 100644 index 130c72cb8157..000000000000 --- a/releasenotes/notes/edge-coloring-e55700fcf8902c79.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -features: - - | - The :class:`.Commuting2qGateRouter` can now take as argument an edge - coloring of the coupling map to determine the order in which the - commuting gates are applied. diff --git a/releasenotes/notes/evolution-framework-primitives-c86779b5d0dffd25.yaml b/releasenotes/notes/evolution-framework-primitives-c86779b5d0dffd25.yaml deleted file mode 100644 index 2adf8a637293..000000000000 --- a/releasenotes/notes/evolution-framework-primitives-c86779b5d0dffd25.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -features: - - | - Added :class:`qiskit.algorithms.time_evolvers` package with interfaces that will cover - primitive-enabled time evolution algorithms: - :class:`qiskit.algorithms.time_evolvers.TimeEvolutionProblem`, - :class:`qiskit.algorithms.time_evolvers.TimeEvolutionResult`, - :class:`qiskit.algorithms.time_evolvers.ImaginaryTimeEvolver`, - :class:`qiskit.algorithms.time_evolvers.RealTimeEvolver`. -deprecations: - - | - :class:`qiskit.algorithms.evolvers` package will now issue a ``PendingDeprecationWarning``. It - will be deprecated in a future release and subsequently removed after that. This is being - replaced by the new :class:`qiskit.algorithms.time_evolvers` package that will host - primitive-enabled algorithms. diff --git a/releasenotes/notes/fake_auckland-deadbeef.yaml b/releasenotes/notes/fake_auckland-deadbeef.yaml deleted file mode 100644 index bad62fb56cd7..000000000000 --- a/releasenotes/notes/fake_auckland-deadbeef.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - The fake backend :class:`~FakeAuckland` was added with the information - from IBM Quantum `ibm_auckland` system. diff --git a/releasenotes/notes/fake_oslo-7bba98d7269f959b.yaml b/releasenotes/notes/fake_oslo-7bba98d7269f959b.yaml deleted file mode 100644 index 08c09df96bb1..000000000000 --- a/releasenotes/notes/fake_oslo-7bba98d7269f959b.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -features: - - | - The fake backend :class:`~FakeOslo` was added with the information from IBM Quantum `ibm_oslo` system. diff --git a/releasenotes/notes/fix-QuantumCircuit.compose-in-control-flow-scopes-a8aad3b87efbe77c.yaml b/releasenotes/notes/fix-QuantumCircuit.compose-in-control-flow-scopes-a8aad3b87efbe77c.yaml deleted file mode 100644 index c6674cf888df..000000000000 --- a/releasenotes/notes/fix-QuantumCircuit.compose-in-control-flow-scopes-a8aad3b87efbe77c.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - :meth:`.QuantumCircuit.compose` will now function correctly when used with - the ``inplace=True`` argument within control-flow builder contexts. - Previously the instructions would be added outside the control-flow scope. - Fixed `#8433 `__. diff --git a/releasenotes/notes/fix-evolvedop-to-instruction-c90c4f1aa6b4232a.yaml b/releasenotes/notes/fix-evolvedop-to-instruction-c90c4f1aa6b4232a.yaml deleted file mode 100644 index f0e17a4be4ea..000000000000 --- a/releasenotes/notes/fix-evolvedop-to-instruction-c90c4f1aa6b4232a.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -fixes: - - | - Fix :meth:`~.EvolvedOp.to_instruction` which previously tried to create a - :class:`~.UnitaryGate` without exponentiating the operator to evolve. - Since this operator is generally not unitary, this raised an error (and if - the operator would have been unitary by chance, it would not have been the expected result). - - Now calling :meth:`~.EvolvedOp.to_instruction` correctly produces a gate - that implements the time evolution of the operator it holds:: - - >>> from qiskit.opflow import EvolvedOp, X - >>> op = EvolvedOp(0.5 * X) - >>> op.to_instruction() - Instruction( - name='unitary', num_qubits=1, num_clbits=0, - params=[array([[0.87758256+0.j, 0.-0.47942554j], [0.-0.47942554j, 0.87758256+0.j]])] - ) diff --git a/releasenotes/notes/fix-flipping-cz-gate-fd08305ca12d9a79.yaml b/releasenotes/notes/fix-flipping-cz-gate-fd08305ca12d9a79.yaml deleted file mode 100644 index 4c27b40a2255..000000000000 --- a/releasenotes/notes/fix-flipping-cz-gate-fd08305ca12d9a79.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Fix a problem in the `GateDirection` transpiler pass for the CZ gate. The CZ is symmetric, so flipping the qubit arguments is allowed to match the directed coupling map. - diff --git a/releasenotes/notes/fix-gradient-wrapper-2f9ab45941739044.yaml b/releasenotes/notes/fix-gradient-wrapper-2f9ab45941739044.yaml deleted file mode 100644 index 07de4aa4eb0b..000000000000 --- a/releasenotes/notes/fix-gradient-wrapper-2f9ab45941739044.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed the following issues with the function - :func:`~qiskit.opflow.gradients.derivative_base.gradient_wrapper`: - - reusing a circuit sampler between the calls, - - binding nested parameters. diff --git a/releasenotes/notes/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml b/releasenotes/notes/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml deleted file mode 100644 index 91fd099d3451..000000000000 --- a/releasenotes/notes/fix-latex-split-filesystem-0c38a1ade2f36e85.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed an ``OSError`` in the LaTeX circuit drawer on systems whose temporary - directories (*e.g* ``/tmp``) are on a different filesystem to the working - directory. See `#8542 `__ - for more detail. diff --git a/releasenotes/notes/fix-numpy-indices-marginal-dist-45889e49ba337d84.yaml b/releasenotes/notes/fix-numpy-indices-marginal-dist-45889e49ba337d84.yaml deleted file mode 100644 index 713a22b1f9ff..000000000000 --- a/releasenotes/notes/fix-numpy-indices-marginal-dist-45889e49ba337d84.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed an issue with the :func:`~.marginal_distribution` function: when - a numpy array was passed in for the ``indices`` argument the function would - raise an error. - Fixed `#8283 `__ diff --git a/releasenotes/notes/fix-opflow-vector-to-circuit-fn-02cb3424269fa733.yaml b/releasenotes/notes/fix-opflow-vector-to-circuit-fn-02cb3424269fa733.yaml deleted file mode 100644 index d101486d0fa9..000000000000 --- a/releasenotes/notes/fix-opflow-vector-to-circuit-fn-02cb3424269fa733.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -fixes: - - | - Previously it was not possible to adjoint a :class:`.CircuitStateFn` that has been - constructed from a :class:`.VectorStateFn`. That's because the statevector has been - converted to a circuit with the :class:`~qiskit.extensions.Initialize` instruction, which - is not unitary. This problem is now fixed by instead using the :class:`.StatePreparation` - instruction, which can be used since the state is assumed to start out in the all 0 state. - - For example we can now do:: - - from qiskit import QuantumCircuit - from qiskit.opflow import StateFn - - left = StateFn([0, 1]) - left_circuit = left.to_circuit_op().primitive - - right_circuit = QuantumCircuit(1) - right_circuit.x(0) - - overlap = left_circuit.inverse().compose(right_circuit) # this line raised an error before! diff --git a/releasenotes/notes/fix-optimizer-settings-881585bfa8130cb7.yaml b/releasenotes/notes/fix-optimizer-settings-881585bfa8130cb7.yaml deleted file mode 100644 index ca0b42f965a6..000000000000 --- a/releasenotes/notes/fix-optimizer-settings-881585bfa8130cb7.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -fixes: - - | - Fix a bug in the :class:`~.Optimizer` classes where re-constructing a new optimizer instance - from a previously exisiting :attr:`~.Optimizer.settings` reset both the new and previous - optimizer settings to the defaults. This notably led to a bug if :class:`~.Optimizer` objects - were send as input to Qiskit Runtime programs. - - Now optimizer objects are correctly reconstructed:: - - >>> from qiskit.algorithms.optimizers import COBYLA - >>> original = COBYLA(maxiter=1) - >>> reconstructed = COBYLA(**original.settings) - >>> reconstructed._options["maxiter"] - 1 # used to be 1000! diff --git a/releasenotes/notes/fix-paramexpr-isreal-8d20348b4ce6cbe7.yaml b/releasenotes/notes/fix-paramexpr-isreal-8d20348b4ce6cbe7.yaml deleted file mode 100644 index f9219b813169..000000000000 --- a/releasenotes/notes/fix-paramexpr-isreal-8d20348b4ce6cbe7.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -fixes: - - | - Fix a bug where a bound :class:`.ParameterExpression` was not identified as real - if ``symengine`` was installed and the bound expression was not a plain ``1j``. - For example:: - - from qiskit.circuit import Parameter - - x = Parameter("x") - expr = 1j * x - bound = expr.bind({x: 2}) - print(bound.is_real()) # used to be True, but is now False - diff --git a/releasenotes/notes/fix-pulse-limit_amplitude-72b8b501710fe3aa.yaml b/releasenotes/notes/fix-pulse-limit_amplitude-72b8b501710fe3aa.yaml deleted file mode 100644 index c65b88a5e5bf..000000000000 --- a/releasenotes/notes/fix-pulse-limit_amplitude-72b8b501710fe3aa.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - A bug that ``limit_amplitude`` set to an individual symbolic pulse or waveform instance - is not properly reflected to the parameter validation has been fixed. - In addition, QPY schedule ``dump`` has been fixed to save ``limit_amplitude`` value - tied to the instance, rather than saving the global class variable. diff --git a/releasenotes/notes/fix-qpy-controlledgate-open-control-35c8ccb4c7466f4c.yaml b/releasenotes/notes/fix-qpy-controlledgate-open-control-35c8ccb4c7466f4c.yaml deleted file mode 100644 index d7a45238b2f4..000000000000 --- a/releasenotes/notes/fix-qpy-controlledgate-open-control-35c8ccb4c7466f4c.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixed QPY serialisation and deserialisation of :class:`.ControlledGate` - with open controls (*i.e.* those whose ``ctrl_state`` is not all ones). - Fixed `#8549 `__. diff --git a/releasenotes/notes/fix-zzmap-pairwise-5653395849fec454.yaml b/releasenotes/notes/fix-zzmap-pairwise-5653395849fec454.yaml deleted file mode 100644 index e5c600dd70e0..000000000000 --- a/releasenotes/notes/fix-zzmap-pairwise-5653395849fec454.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -fixes: - - | - Fix the pairwise entanglement structure for :class:`~.NLocal` circuits. - This led to a bug in the :class:`~.ZZFeatureMap`, where using `entanglement="pairwise"` - raised an error. Now it correctly produces the desired feature map:: - - from qiskit.circuit.library import ZZFeatureMap - encoding = ZZFeatureMap(4, entanglement="pairwise", reps=1) - print(encoding.decompose().draw()) - - The above prints:: - - ┌───┐┌─────────────┐ - q_0: ┤ H ├┤ P(2.0*x[0]) ├──■────────────────────────────────────■──────────────────────────────────────────── - ├───┤├─────────────┤┌─┴─┐┌──────────────────────────────┐┌─┴─┐ - q_1: ┤ H ├┤ P(2.0*x[1]) ├┤ X ├┤ P(2.0*(π - x[0])*(π - x[1])) ├┤ X ├──■────────────────────────────────────■── - ├───┤├─────────────┤└───┘└──────────────────────────────┘└───┘┌─┴─┐┌──────────────────────────────┐┌─┴─┐ - q_2: ┤ H ├┤ P(2.0*x[2]) ├──■────────────────────────────────────■──┤ X ├┤ P(2.0*(π - x[1])*(π - x[2])) ├┤ X ├ - ├───┤├─────────────┤┌─┴─┐┌──────────────────────────────┐┌─┴─┐└───┘└──────────────────────────────┘└───┘ - q_3: ┤ H ├┤ P(2.0*x[3]) ├┤ X ├┤ P(2.0*(π - x[2])*(π - x[3])) ├┤ X ├────────────────────────────────────────── - └───┘└─────────────┘└───┘└──────────────────────────────┘└───┘ - - diff --git a/releasenotes/notes/fix_8438-159e67ecb6765d08.yaml b/releasenotes/notes/fix_8438-159e67ecb6765d08.yaml deleted file mode 100644 index 189827703523..000000000000 --- a/releasenotes/notes/fix_8438-159e67ecb6765d08.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixes issue where :meth:`~.Pauli.evolve` and `~.PauliList.evolve` would - raise a dtype error when evolving by certain Clifford gates which - modified the Pauli's phase. - Fixes `issue #8438 `_ diff --git a/releasenotes/notes/global-phase-ucgate-cd61355e314a3e64.yaml b/releasenotes/notes/global-phase-ucgate-cd61355e314a3e64.yaml deleted file mode 100644 index 536b66acfa6a..000000000000 --- a/releasenotes/notes/global-phase-ucgate-cd61355e314a3e64.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -fixes: - - | - Fixed a global phase bug in :class:`~.UCGate`. diff --git a/releasenotes/notes/ibm_geneva-34b848b0a49278dc.yaml b/releasenotes/notes/ibm_geneva-34b848b0a49278dc.yaml deleted file mode 100644 index 134c5692272e..000000000000 --- a/releasenotes/notes/ibm_geneva-34b848b0a49278dc.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -features: - - | - The fake backend :class:`~FakeGeneva` was added with the information from IBM Quantum `ibm_geneva` system. diff --git a/releasenotes/notes/ibm_perth-5b1e9308dc302e2e.yaml b/releasenotes/notes/ibm_perth-5b1e9308dc302e2e.yaml deleted file mode 100644 index 9412705cd19e..000000000000 --- a/releasenotes/notes/ibm_perth-5b1e9308dc302e2e.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - The fake backend :class:`~FakePerth` was added with the information - from IBM Quantum `ibm_perth` system. diff --git a/releasenotes/notes/implements_two_step_tapering-f481a8cac3990cd5.yaml b/releasenotes/notes/implements_two_step_tapering-f481a8cac3990cd5.yaml deleted file mode 100644 index ca23df6dffea..000000000000 --- a/releasenotes/notes/implements_two_step_tapering-f481a8cac3990cd5.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - Splits the internal procedure in :meth:`taper()` into two methods :meth:`convert_clifford()` and :meth:`taper_clifford()`. The logic remains the same but the methods are now exposed in the public API. Also improves the documentation of the method `taper()`. - diff --git a/releasenotes/notes/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml b/releasenotes/notes/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml deleted file mode 100644 index 403b6c6adf21..000000000000 --- a/releasenotes/notes/improve-basepauli-evolve-clifford-d714b2eee475334b.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - Conjugation of a long :class:`.PauliList` by a :class:`.Clifford` using - :meth:`.PauliList.evolve` will now run much faster. diff --git a/releasenotes/notes/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml b/releasenotes/notes/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml deleted file mode 100644 index da40ee94a6f0..000000000000 --- a/releasenotes/notes/improve-error-message-snobfit-missing-bounds-748943a87e682d82.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -fixes: - - | - Catch error of missing bounds for SNOBFIT optimizer (raising error with clear error message). Arises e.g. when ansatz `UCC` is used in combination with SNOBFIT. Refer to `#8580 ` for more details. diff --git a/releasenotes/notes/introduce-classical-io-channel-0a616e6ca75b7687.yaml b/releasenotes/notes/introduce-classical-io-channel-0a616e6ca75b7687.yaml deleted file mode 100644 index 71a79556a4c8..000000000000 --- a/releasenotes/notes/introduce-classical-io-channel-0a616e6ca75b7687.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -features: - - | - In the qiskit.pulse.channels package, ClassicalIOChannel class has been added - as an abstract base class of MemorySlot, RegisterSlot, and SnapshotChannel. - - The qiskit.pulse.transforms.canonicalization.pad method does not introduce - delays to any channels which are instances of ClassicalIOChannel. - - In qiskit.pulse.instructions, the constructors to SetPhase, ShiftPhase, - SetFrequency and ShiftFrequency now throw a PulseError if the channel parameter - is not of type PulseChannel. - diff --git a/releasenotes/notes/make-use-of-callback-in-vqd-99e3c85f03181298.yaml b/releasenotes/notes/make-use-of-callback-in-vqd-99e3c85f03181298.yaml deleted file mode 100644 index 7c39e26200f5..000000000000 --- a/releasenotes/notes/make-use-of-callback-in-vqd-99e3c85f03181298.yaml +++ /dev/null @@ -1,9 +0,0 @@ -features: - - | - Add calls of the callback function during the :meth:`energy_evaluation` to track the progress of - the algorithm. Also adds a ``step`` argument to the callback to track which eigenstates of the - Hamiltonian is currently being optimized. -issues: - - | - The callback function in the :class:`VQD` was defined but never used. - diff --git a/releasenotes/notes/observable-eval-primitives-e1fd989e15c7760c.yaml b/releasenotes/notes/observable-eval-primitives-e1fd989e15c7760c.yaml deleted file mode 100644 index 43b2c622edbb..000000000000 --- a/releasenotes/notes/observable-eval-primitives-e1fd989e15c7760c.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -features: - - | - Added :meth:`qiskit.algorithms.observables_evaluator.eval_observables` with - :class:`qiskit.primitives.BaseEstimator` as ``init`` parameter. It will soon replace - :meth:`qiskit.algorithms.aux_ops_evaluator.eval_observables`. -deprecations: - - | - Using :meth:`qiskit.algorithms.aux_ops_evaluator.eval_observables` will now issue a - ``PendingDeprecationWarning``. This method will be deprecated in a future release and - subsequently removed after that. This is being replaced by the new - :meth:`qiskit.algorithms.observables_evaluator.eval_observables` primitive-enabled method. diff --git a/releasenotes/notes/pending-deprecate-eigen-solvers-2a4068cc9f83fba2.yaml b/releasenotes/notes/pending-deprecate-eigen-solvers-2a4068cc9f83fba2.yaml deleted file mode 100644 index 044605fe345e..000000000000 --- a/releasenotes/notes/pending-deprecate-eigen-solvers-2a4068cc9f83fba2.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -deprecations: - - | - Module :mod:`qiskit.algorithms.eigen_solvers` is pending deprecation and - is superseded by :mod:`qiskit.algorithms.eigensolvers` diff --git a/releasenotes/notes/pending-deprecate-min-eigen-solvers-fa4341e1014e4df0.yaml b/releasenotes/notes/pending-deprecate-min-eigen-solvers-fa4341e1014e4df0.yaml deleted file mode 100644 index fb6799b45135..000000000000 --- a/releasenotes/notes/pending-deprecate-min-eigen-solvers-fa4341e1014e4df0.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -deprecations: - - | - Module :mod:`qiskit.algorithms.minimum_eigen_solvers` is pending deprecation and - will be deprecated in a future version and eventually removed. The module and its function - are superseded by :mod:`qiskit.algorithms.minimum_eigensolvers` diff --git a/releasenotes/notes/primitive-base-result-92808b069299c19e.yaml b/releasenotes/notes/primitive-base-result-92808b069299c19e.yaml deleted file mode 100644 index ed0641f3c5b2..000000000000 --- a/releasenotes/notes/primitive-base-result-92808b069299c19e.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -features: - - | - Adds a primitive result :class:`qiskit.primitives.base_result.BasePrimitiveResult` to provide common functionality to all inheriting result dataclasses. - * Adds :py:meth:`result.num_experiments` property. - * Adds :py:meth:`result.experiments` property. - * Adds :py:meth:`result.decompose`. - * Validates data types after instantiation (i.e. on dataclass :py:meth:`__post_init__`). - * Checks for consistency in the number of experiments across data fields after instantiation (i.e. on dataclass :py:meth:`__post_init__`). diff --git a/releasenotes/notes/primitive-run-5d1afab3655330a6.yaml b/releasenotes/notes/primitive-run-5d1afab3655330a6.yaml deleted file mode 100644 index e7ee26c00755..000000000000 --- a/releasenotes/notes/primitive-run-5d1afab3655330a6.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -features: - - | - Add methods `~qiskit.primitives.BaseSampler.run` and `~qiskit.primitives.BaseEstimator.run`. - These methods execute asynchronously and return `~qiskit.providers.JobV1`. - Circuits and observables can be appended that are not registered in the constructor. -deprecations: - - | - The method of executing primitives has been changed. - :meth:`~qiskit.primitives.BaseSampler.__call__` method was deprecated and - :meth:`~qiskit.primitives.BaseEstimator.__call__` method was deprecated. - For example:: - - .. code-block:: python - - estimator = Estimator(...) - result = estimator(circuits, observables, parameters) - - sampler = Sampler(...) - result = sampler(circuits, observables, parameters) - - are equivalent by rewriting - - .. code-block:: python - - estimator = Estimator() - result = estimator.run(circuits, observables, parameter_values).result() - - sampler = Sampler() - result = sampler.run(circuits, parameter_values).result() - - Context manager for primitives was deprecated. - Not all Primitives have a context manager available. When available (e.g. qiskit-ibm-runtime), - the session's context manager provides equivalent functionality. - - ``circuits``, ``observables``, and ``parameters`` in the constructor was deprecated. - ``circuits`` and ``observables`` can be passed from ``run`` methods. - ``run`` methods do not support ``parameters``. Users need to resort parameter values by themselves. diff --git a/releasenotes/notes/primitives-run_options-eb4a360c3f1e197d.yaml b/releasenotes/notes/primitives-run_options-eb4a360c3f1e197d.yaml deleted file mode 100644 index 153dbabd31e9..000000000000 --- a/releasenotes/notes/primitives-run_options-eb4a360c3f1e197d.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -features: - - | - Added ``run_options`` arguments in constructor of primitives and ``run_options`` methods to - primitives. It is now possible to set default ``run_options`` in addition to passing - ``run_options`` at runtime. diff --git a/releasenotes/notes/qiskit-nature-797-8f1b0975309b8756.yaml b/releasenotes/notes/qiskit-nature-797-8f1b0975309b8756.yaml deleted file mode 100644 index 08412ffcf95c..000000000000 --- a/releasenotes/notes/qiskit-nature-797-8f1b0975309b8756.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - When the class :class:`~.SPSA` was using `np.split` (from NumPy) for splitting the jobs in even batches, - resulting in an exception if a perfectly even split was not possible. Now, it uses `np.array_split`, which is safer - for these cases. diff --git a/releasenotes/notes/qnspsa-primitification-29a9dcae055bf2b4.yaml b/releasenotes/notes/qnspsa-primitification-29a9dcae055bf2b4.yaml deleted file mode 100644 index 5400eed0de1f..000000000000 --- a/releasenotes/notes/qnspsa-primitification-29a9dcae055bf2b4.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -features: - - | - Add support for the :class:`.BaseSampler` primitive in :func:`.QNSPSA.get_fidelity`. - Now, the fidelity function can be constructed as:: - - from qiskit.primitives import Sampler - from qiskit.algorithms.optimizers import QNSPSA - - fidelity = QNSPSA.get_fidelity(my_circuit, Sampler()) - -deprecations: - - | - Using a backend and expectation converter in :func:`.QNSPSA.get_fidelity` is - pending deprecation and will be deprecated in a future release. Instead, use - a :class:`.BaseSampler` to evaluate circuits, see also the features of this release. \ No newline at end of file diff --git a/releasenotes/notes/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml b/releasenotes/notes/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml deleted file mode 100644 index 48c7acc6a516..000000000000 --- a/releasenotes/notes/remove-deprecated-methods-in-pauli-c874d463ba1f7a0e.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -upgrade: - - | - The deprecated method ``SparsePauliOp.table`` has been removed. - It was originally deprecated in Qiskit Terra 0.19. - Returning PauliTable of :func:`~pauli_basis` has been removed. - The argument ``pauli_list`` in :func:`pauli_basis` has been removed. diff --git a/releasenotes/notes/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml b/releasenotes/notes/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml deleted file mode 100644 index bb6baaf86e5e..000000000000 --- a/releasenotes/notes/remove_optimizers_L_BFGS_B_epsilon-03f997aff50c394c.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -upgrade: - - | - Arguments `epsilon` and `factr` of `~qiskit.algorithms.optimizers.L_BFGS_B` - and `factr` of `~qiskit.algorithms.optimizers.P_BFGS` have been removed and no longer - exist as per the deprecation notice from qiskit-terra - 0.18.0 (released on Jul 12, 2021). diff --git a/releasenotes/notes/sampled_expval-85e300e0fb5fa5ea.yaml b/releasenotes/notes/sampled_expval-85e300e0fb5fa5ea.yaml deleted file mode 100644 index c18da25b607c..000000000000 --- a/releasenotes/notes/sampled_expval-85e300e0fb5fa5ea.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -features: - - | - Adds the ``sampled_expectation_value`` function that allows for computing expectation values - for diagonal operators from distributions such as ``Counts`` and ``QuasiDistribution``. - Valid operators are: ``str``, ``Pauli``, ``PauliOp``, ``PauliSumOp``, and ``SparsePauliOp``. diff --git a/releasenotes/notes/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml b/releasenotes/notes/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml deleted file mode 100644 index 2652bc45f8e9..000000000000 --- a/releasenotes/notes/sparse-pauli-equiv-atol-58f5dfe7f39b70ee.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -features: - - | - Adds `atol` parameter to :meth:`.SparsePauliOp.equiv`. \ No newline at end of file diff --git a/releasenotes/notes/support-channels-in--fake-backend-v2-82f0650006495fbe.yaml b/releasenotes/notes/support-channels-in--fake-backend-v2-82f0650006495fbe.yaml deleted file mode 100644 index 9d01cc969f05..000000000000 --- a/releasenotes/notes/support-channels-in--fake-backend-v2-82f0650006495fbe.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - All fake backends in :mod:`qiskit.providers.fake_provider.backends` have been - updated to return the corresponding pulse channel objects with the method call of - :meth:`~BackendV2.drive_channel`, :meth:`~BackendV2.measure_channel`, - :meth:`~BackendV2.acquire_channel`, :meth:`~BackendV2.control_channel`. diff --git a/releasenotes/notes/taper-performance-6da355c04da5b648.yaml b/releasenotes/notes/taper-performance-6da355c04da5b648.yaml deleted file mode 100644 index c59721149da3..000000000000 --- a/releasenotes/notes/taper-performance-6da355c04da5b648.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - The :meth:`~qiskit.opflow.Z2Symmetries.taper` has significantly improved - performance because intermediate data is simplified. diff --git a/releasenotes/notes/trotter-qrte-primitives-8b3e495738b57fc3.yaml b/releasenotes/notes/trotter-qrte-primitives-8b3e495738b57fc3.yaml deleted file mode 100644 index 1f8b3e25e928..000000000000 --- a/releasenotes/notes/trotter-qrte-primitives-8b3e495738b57fc3.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -features: - - | - Added :class:`qiskit.algorithms.time_evolvers.trotterization.TrotterQRTE` with - :class:`qiskit.primitives.BaseEstimator` as ``init`` parameter. It replaces - :class:`qiskit.algorithms.TrotterQRTE`. -deprecations: - - | - Using :class:`qiskit.algorithms.TrotterQRTE` will now issue a - ``PendingDeprecationWarning``. This algorithm will be deprecated in a future release and - subsequently removed after that. This is being replaced by the new - :class:`qiskit.algorithms.time_evolvers.trotterization.TrotterQRTE` primitive-enabled class. diff --git a/releasenotes/notes/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml b/releasenotes/notes/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml deleted file mode 100644 index a600f75f64a4..000000000000 --- a/releasenotes/notes/upgrade_rzx_builder_skip_direct_cx-d0beff9b2b86ab8d.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -upgrade: - - | - :class:`.RZXCalibrationBuilder` and :class:`.RZXCalibrationBuilderNoEcho` - have been upgraded to skip stretching CX gates implemented by - non-echoed cross resonance (ECR) sequence to avoid termination of the pass - with unexpected errors. - These passes take new argument ``verbose`` that controls warning. - If ``verbose=True`` is set, pass raises user warning when it enconters - non-ECR sequence. -deprecations: - - | - The unused argument ``qubit_channel_mapping`` in the - :class:`.RZXCalibrationBuilder` and :class:`.RZXCalibrationBuilderNoEcho` - transpiler passes have been deprecated and will be removed. - This argument is no longer used. -other: - - | - The transpiler pass module :mod:`~qiskit.transpiler.passes.calibration` has been reorganized. - :class:`.PulseGates` has been moved to :mod:`~qiskit.transpiler.passes.calibration.pulse_gates`, - and :class:`.RZXCalibrationBuilder` and :class:`.RZXCalibrationBuilderNoEcho` - have been moved to :mod:`~qiskit.transpiler.passes.calibration.rzx_builders`. diff --git a/setup.py b/setup.py index 82f60a029e88..b3495c773261 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup( name="qiskit-terra", - version="0.22.0rc2", + version="0.22.0", description="Software for developing quantum computing programs", long_description=README, long_description_content_type="text/markdown",