Skip to main contentIBM Quantum Documentation

Sample-based quantum diagonalization (SQD) release notes


Upcoming release

Bug Fixes

  • pyscf is no longer considered a dependency on Windows, where it fails to install. However, Windows remains an unsupported platform.

0.8.0

New Features

  • Added support for Python 3.9.

  • All functions which take a rand_seed argument now also accept a numpy.random.Generator instance as the rand_seed.

Upgrade Notes


0.7.0

Bug Fixes


0.6.0

Upgrade Notes

  • Specifying addresses as a keyword argument to qiskit_addon_sqd.fermion.solve_fermion() and qiskit_addon_sqd.fermion.optimize_orbitals() is no longer supported. Users may still pass addresses as the first positional argument; however, this usage is deprecated. Users are encouraged to pass the bitstring matrix defining the subspace as the first positional arguments to these functions, as shown below.

    To upgrade, change this code

    # DEPRECATED CODE
    from qiskit_addon_sqd.fermion import (
        bitstring_matrix_to_sorted_addresses,
        solve_fermion,
        optimize_orbitals,
    )
     
    bitstring_matrix = ...
    addresses = bitstring_matrix_to_sorted_addresses(bitstring_matrix, open_shell=open_shell)
    energy, coeffs, occs, spin = solve_fermion(
                                     addresses=addresses,
                                     hcore=hcore,
                                     eri=eri,
                                 )
    ...
    e_oo, rotation, occs_oo = optimize_orbitals(
                                  addresses=addresses,
                                  hcore=hcore,
                                  eri=eri,
                              )
     
    ### SHOULD BECOME ###
     
    # NEW CODE
    from qiskit_addon_sqd.fermion import solve_fermion, optimize_orbitals
     
    bitstring_matrix = ...
    energy, coeffs, occs, spin = solve_fermion(
                                     bitstring_matrix,
                                     hcore=hcore,
                                     eri=eri,
                                 )
    ...
    e_oo, rotation, occs_oo = optimize_orbitals(
                                  bitstring_matrix,
                                  hcore=hcore,
                                  eri=eri,
                              )

Deprecation Notes

Bug Fixes


0.5.0

Upgrade Notes

  • The qiskit_addon_sqd.counts.generate_counts_bipartite_hamming(), qiskit_addon_sqd.subsampling.postselect_and_subsample(), and qiskit_addon_sqd.configuration_recovery.post_select_by_hamming_weight() now require the hamming_right and hamming_left arguments to be specified as keyword arguments. Additionally, the samples_per_batch and n_batches arguments to qiskit_addon_sqd.subsampling.postselect_and_subsample() should now be passed as keyword arguments.

    To upgrade

    from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight
    from qiskit_addon_sqd.subsampling import postselect_and_subsample
    from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming
     
    counts = generate_counts_bipartite_hamming(num_samples, num_bits, num_elec_a, num_elec_b)
     
    ...
     
    bs_mat = post_select_by_hamming_weight(bs_mat_full, num_elec_a, num_elec_b)    
     
    ...
     
    batches = postselect_and_subsample(
        bs_mat,
        probs_arr,
        num_elec_a,
        num_elec_b,
        samples_per_batch,
        num_batches,
    )

    should be changed to

    from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight
    from qiskit_addon_sqd.subsampling import postselect_and_subsample
    from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming
     
    counts = generate_counts_bipartite_hamming(num_samples, num_bits, hamming_right=num_elec_a, hamming_left=num_elec_b)
     
    ...
     
    bs_mat = post_select_by_hamming_weight(bs_mat_full, hamming_right=num_elec_a, hamming_left=num_elec_b)
     
    ...
     
    batches = postselect_and_subsample(
        bs_mat,
        probs_arr,
        hamming_right=num_elec_a,
        hamming_left=num_elec_b,
        samples_per_batch=samples_per_batch,
        num_batches=num_batches,
    )

0.4.0

Prelude

This is a minor release which introduces a couple of small, but important, breaking changes to to the API. These changes allow for a more consistent pattern in specifying the number of alpha and beta electrons throughout both the chemistry and non-chemistry functions in the API.

Upgrade Notes

  • The qiskit_addon_sqd.counts.generate_counts_bipartite_hamming(), qiskit_addon_sqd.subsampling.postselect_and_subsample(), and qiskit_addon_sqd.configuration_recovery.post_select_by_hamming_weight() now take the hamming_right positional argument before the hamming_left argument to better match the rest of the workflow.

    To upgrade

    from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight
    from qiskit_addon_sqd.subsampling import postselect_and_subsample
    from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming
     
    counts = generate_counts_bipartite_hamming(num_samples, num_bits, num_elec_b, num_elec_a)
     
    ...
     
    bs_mat = post_select_by_hamming_weight(bs_mat_full, num_elec_b, num_elec_a)    
     
    ...
     
    batches = postselect_and_subsample(
        bs_mat,
        probs_arr,
        num_elec_b,
        num_elec_a,
        samples_per_batch,
        n_batches,
    )

    should be changed to

    from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight
    from qiskit_addon_sqd.subsampling import postselect_and_subsample
    from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming
     
    counts = generate_counts_bipartite_hamming(num_samples, num_bits, num_elec_a, num_elec_b)
     
    bs_mat = post_select_by_hamming_weight(bs_mat_full, num_elec_a, num_elec_b)
     
    ...
     
    batches = postselect_and_subsample(
        bs_mat,
        probs_arr,
        num_elec_a,
        num_elec_b,
        samples_per_batch,
        n_batches,
    )
Was this page helpful?
Report a bug or request content on GitHub.