Release history¶
Release notes¶
QISKit SDK 0.5.0¶
This release brings a number of improvements to QISKit, both for the user experience and under the hood. Please refer to the full changelog for a detailed description of the changes - the highlights are:
- new
statevector
simulators
and feature and performance improvements to the existing ones (in particular to the C++ simulator), along with a reorganization of how to work with backends focused on extensibility and flexibility (using aliases and backend providers). - reorganization of the asynchronous features, providing a friendlier interface
for running jobs asynchronously via
Job
instances. - numerous improvements and fixes throughout the SDK as a whole, both for convenience of the users (such as allowing anonymous registers) and for enhanced functionality (such as improved plotting of circuits).
Upgrading to 0.5.0¶
Please note that several backwards-incompatible changes have been introduced during this release as a result of the ongoing development. While some of these features will continue to be supported during a period of time before being fully deprecated, it is recommended to update your programs in order to prepare for the new versions and take advantage of the new functionality.
QuantumProgram
changes¶
Several methods of the QuantumProgram
class are on their way
to being deprecated:
methods for interacting with the backends and the API:
The recommended way for opening a connection to the IBMQ API and for using the backends is through the top-level functions directly instead of the
QuantumProgram
methods. In particular, theqiskit.register()
method provides the equivalent of the previousqiskit.QuantumProgram.set_api()
call. In a similar vein, there is a newqiskit.available_backends()
,qiskit.get_backend()
and related functions for querying the available backends directly. For example, the following snippet for version 0.4:from qiskit import QuantumProgram quantum_program = QuantumProgram() quantum_program.set_api(token, url) backends = quantum_program.available_backends() print(quantum_program.get_backend_status('ibmqx4')
would be equivalent to the following snippet for version 0.5:
from qiskit import register, available_backends, get_backend register(token, url) backends = available_backends() backend = get_backend('ibmqx4') print(backend.status)
methods for compiling and executing programs:
The top-level functions now also provide equivalents for the
qiskit.QuantumProgram.compile()
andqiskit.QuantumProgram.execute()
methods. For example, the following snippet from version 0.4:quantum_program.execute(circuit, args, ...)
would be equivalent to the following snippet for version 0.5:
from qiskit import execute execute(circuit, args, ...)
In general, from version 0.5 onwards we encourage to try to make use of the
individual objects and classes directly instead of relying on
QuantumProgram
. For example, a QuantumCircuit
can be
instantiated and constructed by appending QuantumRegister
,
ClassicalRegister
, and gates directly. Please check the
update example in the Quickstart section, or the
using_qiskit_core_level_0.py
and using_qiskit_core_level_1.py
examples on the main repository.
Backend name changes¶
In order to provide a more extensible framework for backends, there have been some design changes accordingly:
local simulator names
The names of the local simulators have been homogenized in order to follow the same pattern:
PROVIDERNAME_TYPE_simulator_LANGUAGEORPROJECT
- for example, the C++ simulator previously namedlocal_qiskit_simulator
is nowlocal_qasm_simulator_cpp
. An overview of the current simulators:QASM
simulator is supposed to be like an experiment. You apply a circuit on some qubits, and observe measurement results - and you repeat for many shots to get a histogram of counts viaresult.get_counts()
.Statevector
simulator is to get the full statevector ( amplitudes) after evolving the zero state through the circuit, and can be obtained viaresult.get_statevector()
.Unitary
simulator is to get the unitary matrix equivalent of the circuit, returned viaresult.get_unitary()
.- In addition, you can get intermediate states from a simulator by applying
a
snapshot(slot)
instruction at various spots in the circuit. This will save the current state of the simulator in a given slot, which can later be retrieved viaresult.get_snapshot(slot)
.
backend aliases:
The SDK now provides an “alias” system that allows for automatically using the most performant simulator of a specific type, if it is available in your system. For example, with the following snippet:
from qiskit import get_backend backend = get_backend('local_statevector_simulator')
the backend will be the C++ statevector simulator if available, falling back to the Python statevector simulator if not present.
More flexible names and parameters¶
Several functions of the SDK have been made more flexible and user-friendly:
automatic circuit and register names
qiskit.ClassicalRegister
,qiskit.QuantumRegister
andqiskit.QuantumCircuit
can now be instantiated without explicitly giving them a name - a new autonaming feature will automatically assign them an identifier:q = QuantumRegister(2)
Please note as well that the order of the parameters have been swapped
QuantumRegister(size, name)
.methods accepting names or instances
In combination with the autonaming changes, several methods such as
qiskit.Result.get_data()
now accept both names and instances for convenience. For example, when retrieving the results for a job that has a single circuit such as:qc = QuantumCircuit(..., name='my_circuit') job = execute(qc, ...) result = job.result()
The following calls are equivalent:
data = result.get_data('my_circuit') data = result.get_data(qc) data = result.get_data()
Changelog¶
Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Types of changes:
- Added: for new features.
- Changed: for changes in existing functionality.
- Deprecated: for soon-to-be removed features.
- Removed: for now removed features.
- Fixed: for any bug fixes.
- Security: in case of vulnerabilities.
`0.5.6`_ - 2018-07-06¶
Added¶
Changed¶
- Rename repository to
qiskit-terra
(#606). - Update Bloch sphere to QuTiP version (#618).
Removed¶
- Remove OpenQuantumCompiler (#610).
Fixed¶
- Fixed broken process error and simulator slowdown on Windows (#613).
- Fixed yzy_to_zyz bugs (#520, #607) by moving to quaternions (#626).
`0.5.5`_ - 2018-07-02¶
Added¶
- Retrieve IBM Q jobs from server (#563, #585).
- Add German introductory documentation (
doc/de
) (#592). - Add
unregister()
for removing previously registered providers (#584). - Add matplotlib-based circuit drawer (#579).
- Adding backend filtering by least busy (#575).
- Allow running with new display names for IBMQ devices,
and return those from
available_backends()
(#566) - Introduce Qiskit Transpiler and refactor compilation flow (#578)
- Add CXCancellation pass (#578)
Changed¶
- Remove backend filtering in individual providers, keep only in wrapper (#575).
- Single source of version information (#581)
- Bumped IBMQuantumExperience dependency to 1.9.6 (#600).
- For backend status, status[‘available’] is now status[‘operational’] (#609).
- Added support for registering third-party providers in register() (#602).
- Order strings in the output of
available_backends()
(#566)
Removed¶
- Remove Clifford simulator from default available_backends, until its stable release (#555).
- Remove ProjectQ simulators for moving to new repository (#553).
- Remove QuantumJob class (#616)
Fixed¶
- Fix issue with unintended inversion of initializer gates (#573).
- Fix issue with skip_transpiler causing some gates to be ignored silently (#562).
0.5.4 - 2018-06-11¶
Added¶
- Performance improvements:
- remove deepcopies from dagcircuit, and extra check on qasm() (#523).
Changed¶
- Rename repository to
qiskit-core
(#530). - Repository improvements: new changelog format (#535), updated issue templates (#531).
- Renamed the specification schemas (#464).
- Convert
LocalJob
tests into unit-tests. (#526) - Move wrapper
load_qasm_*
methods to a submodule (#533).
Removed¶
- Remove Sympy simulators for moving to new repository (#514)
Fixed¶
- Fix erroneous density matrix and probabilities in C++ simulator (#518)
- Fix hardcoded backend mapping tests (#521)
- Removed
_modifiers call
fromreapply
(#534) - Fix circuit drawer issue with filename location on windows (#543)
- Change initial qubit layout only if the backend coupling map is not satisfied (#527)
- Fix incorrect unrolling of t to tdg in CircuitBackend (#557)
- Fix issue with simulator extension commands not reapplying correctly (#556)
0.5.3 - 2018-05-29¶
Added¶
- load_qasm_file / load_qasm_string methods
Changed¶
- Dependencies version bumped
Fixed¶
- Crash in the cpp simulator for some linux platforms
- Fixed some minor bugs
0.5.2 - 2018-05-21¶
Changed¶
- Adding Result.get_unitary()
Deprecated¶
- Deprecating
ibmqx_hpc_qasm_simulator
andibmqx_qasm_simulator
in favor ofibmq_qasm_simulator
.
Fixed¶
- Fixing a Mapper issue.
- Fixing Windows 7 builds.
0.5.1 - 2018-05-15¶
There are no code changes.
MacOS simulator has been rebuilt with external user libraries compiled statically, so there’s no need for users to have a preinstalled gcc environment.
Pypi forces us to bump up the version number if we want to upload a new package, so this is basically what have changed.
0.5.0 - 2018-05-11¶
Improvements¶
- Introduce providers and rework backends (#376).
- Split backends into
local
andibmq
. - Each provider derives from the following classes for its specific
requirements (
BaseProvider
,BaseBackend
,BaseJob
). - Allow querying result by both circuit name and QuantumCircuit instance.
- Split backends into
- Introduce the QISKit
wrapper
(#376). - Introduce convenience wrapper functions around commonly used QISKit
components (e.g.
compile
andexecute
functions). - Introduce the DefaultQISKitProvider, which acts as a context manager for
the current session (e.g. providing easy access to all
available_backends
). - Avoid relying on QuantumProgram (eventual deprecation).
- The functions are also available as top-level functions (for example,
qiskit.get_backend()
).
- Introduce convenience wrapper functions around commonly used QISKit
components (e.g.
- Introduce the QISKit
- Introduce
BaseJob
class and asynchronous jobs (#403). - Return
BaseJob
afterrun()
. - Mechanisms for querying
status
andresults
, or tocancel
a job.
- Return
- Introduce
- Introduce a
skip_transpiler
flag forcompile()
(#411). - Introduce schemas for validating interfaces between qiskit and backends (#434)
- qobj_schema
- result_schema
- job_status_schema
- default_pulse_config_schema
- backend_config_schema
- backend_props_schema
- backend_status_schema
- Improve C++ simulator (#386)
- Add
tensor_index.hpp
for multi-partite qubit vector indexing. - Add
qubit_vector.hpp
for multi-partite qubit vector algebra. - Rework C++ simulator backends to use QubitVector class instead of
std::vector
.
- Add
- Improve interface to simulator backends (#435)
- Introduce
local_statevector_simulator_py
andlocal_statevector_simulator_cpp
. - Introduce aliased and deprecated backend names and mechanisms for resolving them.
- Introduce optional
compact
flag to query backend names only by unique function. - Introduce result convenience functions
get_statevector
,get_unitary
- Add
snapshot
command for caching a copy of the current simulator state.
- Introduce
- Introduce circuit drawing via
circuit_drawer()
andplot_circuit()
(#295, #414) - Introduce benchmark suite for performance testing
(
test/performance
) (#277) - Introduce more robust probability testing via assertDictAlmostEqual (#390)
- Allow combining circuits across both depth and width (#389)
- Enforce string token names (#395)
Fixed¶
- Fix coherent error bug in
local_qasm_simulator_cpp
(#318) - Fix the order and format of result bits obtained from device backends (#430)
- Fix support for noises in the idle gate of
local_clifford_simulator_cpp
(#440) - Fix JobProcessor modifying input qobj (#392) (and removed JobProcessor during #403)
- Fix ability to apply all gates on register (#369)
Deprecated¶
- Some methods of
QuantumProgram
are soon to be deprecated. Please use the top-level functions instead. - The
Register
instantiation now expectssize, name
. Usingname, size
is still supported but will be deprecated in the future. - Simulators no longer return wavefunction by setting shots=1. Instead,
use the
local_statevector_simulator
, or explicitly ask forsnapshot
. - Return
job
instance afterrun()
, rather thanresult
. - Rename simulators according to
PROVIDERNAME_SIMPLEALIAS_simulator_LANGUAGEORPROJECT
- Move simulator extensions to
qiskit/extensions/simulator
- Move Rzz and CSwap to standard extension library
0.4.15 - 2018-05-07¶
Fixed¶
- Fixed an issue with legacy code that was affecting Developers Challenge.
0.4.14 - 2018-04-18¶
Fixed¶
- Fixed an issue about handling Basis Gates parameters on backend configurations.
0.4.13 - 2018-04-16¶
Changed¶
- OpenQuantumCompiler.dag2json() restored for backward compatibility.
Fixed¶
- Fixes an issue regarding barrier gate misuse in some circumstances.
0.4.12 - 2018-03-11¶
Changed¶
- Improved circuit visualization.
- Improvements in infrastructure code, mostly tests and build system.
- Better documentation regarding contributors.
Fixed¶
- A bunch of minor bugs have been fixed.
0.4.11 - 2018-03-13¶
Added¶
- More testing :)
Changed¶
- Stabilizing code related to external dependencies.
Fixed¶
- Fixed bug in circuit drawing where some gates in the standard library were not plotting correctly.
0.4.10 - 2018-03-06¶
Added¶
- Chinese translation of README.
Changed¶
- Changes related with infrastructure (linter, tests, automation) enhancement.
Fixed¶
- Fix installation issue when simulator cannot be built.
- Fix bug with auto-generated CNOT coherent error matrix in C++ simulator.
- Fix a bug in the async code.
0.4.9 - 2018-02-12¶
Changed¶
- CMake integration.
- QASM improvements.
- Mapper optimizer improvements.
Fixed¶
- Some minor C++ Simulator bug-fixes.
0.4.8 - 2018-01-29¶
Fixed¶
- Fix parsing U_error matrix in C++ Simulator python helper class.
- Fix display of code-blocks on
.rst
pages.
0.4.7 - 2018-01-26¶
Changed¶
- Changes some naming conventions for
amp_error
noise parameters tocalibration_error
.
Fixed¶
- Fixes several bugs with noise implementations in the simulator.
- Fixes many spelling mistakes in simulator README.
0.4.6 - 2018-01-22¶
Changed¶
We have upgraded some of out external dependencies to:
- matplotlib >=2.1,<2.2
- networkx>=1.11,<2.1
- numpy>=1.13,<1.15
- ply==3.10
- scipy>=0.19,<1.1
- Sphinx>=1.6,<1.7
- sympy>=1.0
0.4.4 - 2018-01-09¶
Changed¶
- Update dependencies to more recent versions.
Fixed¶
- Fix bug with process tomography reversing qubit preparation order.
0.4.3 - 2018-01-08¶
Removed¶
- Static compilation has been removed because it seems to be failing while installing Qiskit via pip on Mac.
0.4.0 - 2018-01-08¶
Added¶
- Job handling improvements.
- Allow asynchronous job submission.
- New JobProcessor class: utilizes concurrent.futures.
- New QuantumJob class: job description.
- Modularize circuit “compilation”.
- Takes quantum circuit and information about backend to transform circuit into one which can run on the backend.
- Standardize job description.
- All backends take QuantumJob objects which wraps
qobj
program description.
- Simplify addition of backends, where circuits are run/simulated.
qiskit.backends
package added.- Real devices and simulators are considered “backends” which inherent from
BaseBackend
.
- Reorganize and improve Sphinx documentation.
- Improve unittest framework.
- Add tools for generating random circuits.
- New utilities for fermionic Hamiltonians (
qiskit/tools/apps/fermion
). - New utilities for classical optimization and chemistry
(
qiskit/tools/apps/optimization
). - Randomized benchmarking data handling.
- Quantum tomography (
qiskit/tools/qcvv
). - Added functions for generating, running and fitting process tomography experiments.
- Quantum tomography (
- Quantum information functions (
qiskit/tools/qi
). - Partial trace over subsystems of multi-partite vector.
- Partial trace over subsystems of multi-partite matrix.
- Flatten an operator to a vector in a specified basis.
- Generate random unitary matrix.
- Generate random density matrix.
- Generate normally distributed complex matrix.
- Generate random density matrix from Hilbert-Schmidt metric.
- Generate random density matrix from the Bures metric.
- Compute Shannon entropy of probability vector.
- Compute von Neumann entropy of quantum state.
- Compute mutual information of a bipartite state.
- Compute the entanglement of formation of quantum state.
- Quantum information functions (
- Visualization improvements (
qiskit/tools
). - Wigner function representation.
- Latex figure of circuit.
- Visualization improvements (
- Use python logging facility for info, warnings, etc.
- Auto-deployment of sphinx docs to github pages.
- Check IBMQuantumExperience version at runtime.
- Add QuantumProgram method to reconfigure already generated qobj.
- Add Japanese introductory documentation (
doc/ja
). - Add Korean translation of readme (
doc/ko
). - Add appveyor for continuous integration on Windows.
- Enable new IBM Q parameters for hub/group/project.
- Add QuantumProgram methods for destroying registers and circuits.
- Use Sympy for evaluating expressions.
- Add support for ibmqx_hpc_qasm_simulator backend.
- Add backend interface to Project Q C++ simulator.
- Requires installation of Project Q.
- Introduce
InitializeGate
class. - Generates circuit which initializes qubits in arbitrary state.
- Introduce
- Introduce
local_qiskit_simulator
a C++ simulator with realistic noise. - Requires C++ build environment for
make
-based build.
- Introduce
- Introduce
local_clifford_simulator
a C++ Clifford simulator. - Requires C++ build environment for
make
-based build.
- Introduce
Changed¶
- The standard extension for creating U base gates has been modified to be consistent with the rest of the gate APIs (see #203).
Removed¶
- The
silent
parameter has been removed from a number ofQuantumProgram
methods. The same behaviour can be achieved now by using theenable_logs()
anddisable_logs()
methods, which use the standard Python logging.
Fixed¶
- Fix basis gates (#76).
- Enable QASM parser to work in multiuser environments.
- Correct operator precedence when parsing expressions (#190).
- Fix “math domain error” in mapping (#111, #151).