0.8.0 - 2019-05-02
Added
- Added exact and approximate decomposition of SU(4) to arbitrary supercontrolled basis
- Introduced schedule lo configuration. (#2115)
- Introduced pulse schedule assembler. (#2115)
- Builtin library of continuous pulses and builtin library of discrete pulses which are obtained
by sampling continuous pulses with default sampling strategy. - Sampler decorator and standard sampler library for conversion of continuous pulses
to discreteSamplePulse(#2042). - Core StochasticSwap routine implimented in Cython (#1789).
- Added QuantumChannel classes SuperOp, Choi, Kraus, Stinespring, PTM, Chi to
quantum_info for manipulating quantum channels and CPTP maps. - Added Operator object to quantum_info for representing matrix operators.
- Introduced the backend defaults model and endpoint for pulse backends (#2101).
meas_levelto result schema (#2085).- Core StochasticSwap routine implemented in Cython (#1789).
- New EnlargeWithAncilla pass for adding ancilla qubits after a Layout
selection pass (#1603). - New Unroll2Q pass for unrolling gates down to just 1q or 2q gates (#1614).
- Added support for register slicing when applying operations to a register (#1643).
- Added in new parameter
justifyto the text, mpl and latex circuit drawers to say how the
circuit should be aligned. (#1725, #1797, #1977) - Added function for purity of a mixed state in
qiskit.quantum_information
(#1733) - Added parameter to the TextProgressBar to allow the output to be sent to a
different output stream - Added a
__qiskit_version__parameter to the qiskit namespace. This will
contain a dictionary of versions for all installed qiskit elements. (#1885). - Added a
RunConfigobject for configurations related to running an
experiment (e.g. shots, memory) (#1856) - Added a
TranspileConfigobject for configurations related to transforming
circuits (e.g. basis_gates, coupling_map, initial_layout) (#1856) - Added a
qiskit.compilernamespace for all functions that transpile, schedule
and assemble circuits and pulses (#1856) - Added support for passing a list of
basis_gates,coupling_mapetc. to the
qiskit.compiler.transpile()function, each corresponding to one of the circuits (#2163) - Added a
qiskit.compiler.assemble_circuits()function to generate qobj from some
circuits and a RunConfig (#1856) execute()andassemble()allow setting a qobj_header, of type
QobjHeader or dict, to add extra information to the qobj (and thus result).- Register indexing supports negative indices (#1875)
- Added new resource estimation passes:
Depth,Width,Size,CountOps, and
NumTensorFactors, all grouped in theResourceEstimationanalysis pass. - Added
nodes_on_wire()to DAGCircuit which returns an iterator over all the
operations on the given wire - Added new properties to an Instruction:
num_qubits,num_clbits(#1816). - Added a
QuantumCircuit.appendpublic method for appending arbitrary instructions
to some qubits and clbits in the circuit (#1816). - Added an
Instruction.definitionproperty that defines a composite instruction
in terms of other, simpler instructions (#1816). - Added an
Instruction.mirror()method that mirrors a composite instruction
(reverses its sub-instructions) (#1816). - Added an
PassManager.passes()method that returns a list of the passes that
have been added to the pass manager, including options and flow controllers. - Added a
PassManager.run()that transforms aQuantumCircuitaccording to its
pass schedule and returns aQuantumCircuit. - Added a
qiskit.quantum_info.randomfor generating random states, unitaries, etc (#2119). - Added a
qiskit.quantum_info.synthesisfor algorithms that synthesize circuits (#2119). - Added a
NoiseAdaptiveLayoutpass to compute a backend calibration-data aware initial
qubit layout. (#2089) - Gates and instructions in a circuit accept integers as parameters to refer to
wires instead of named bits. - Added a
OptimizeSwapBeforeMeasurepass that removes the swap gates when they
are followed by a measurement instruction, moving the latter to the proper wire. (#1890) - Added a
RemoveDiagonalGatesBeforeMeasurepass that removes the diagonal gates when they
are followed by a measurement instruction. (#2208) - Added a
CommutativeCancellationpass that cancels self-inverse gates and combines
rotations about the Z axis, leveraging previously-found gate commutation relations. (#2012) - Add an option for using a user config file to enable changing default
settings for various functions in qiskit. Right now it only supports setting
the default circuit drawing backend. (#2122) - Added a
Collect2qBlockspass that analyzes the circuit for uninterrupted sequences
of gates (blocks) acting on 2 qubits. (#2134) - Added a
ConsolidateBlocksthat turns previously-collected blocks of any size
into equivalent Unitary operators in the circuit. (#2134) - Added support for parameterized circuits. (#2103)
- Added preset PassManagers that offer predetermined pipelines of transpiler passes. (#2163)
Changed
- require scipy>=1.0, use
scipy.stats.unitary_group.rvsforrandom_unitary(). - two_qubit_kak decomposition works with Operator or raw matrix input objects.
- process_fidelity works with QuantumChannel and Operator object inputs.
- Backend defaults values are no longer required (#2101).
- QuantumCircuit properties more self-consistent and no longer need DAG (#1993).
- The most connected subset in DenseLayout is now reduced bandwidth (#2021).
- plot_histogram now allows sorting by Hamming distance from target_string (#2064).
- FunctionalPulse is no longer a class and instead is a decorator,
functional_pulse
that returns aSamplePulsewhen called. (#2043) - Changed
average_datato accept observable input in matrix form (#1858) - Change random_state to take in dim over number of qubits (#1857)
- The
Exceptionsubclasses have been moved to an.exceptionsmodule
within each package (for example,qiskit.exceptions.QiskitError) (#1600). - The
QiskitTestCaseand testing utilities are now included as part of
qiskit.testand thus available for third-party implementations, with
convenience test cases for providers and backends. (#1616, #1844) - The snapshot instruction now takes
labelandsnap_typeinstead of
slot(#1615). - The test folders have been reorganized to match the python modules (#1625)
- The circuits_to_qobj no longers uses the unrollers (#1629)
- The previously deprecated default output of
circuit_drawer()(using latex
and falling back to mpl) is no longer present. Instead the default output
is the ascii arttextoutput backend. - Changed param to params in Instruction (#1665).
dag_drawerandplot_gate_mapare available via importing
qiskit.tools.visualization. They will raise at the point of use, if
dependencies are not installed (#1669).- The
qiskit.validationschemas are now strict and raise a more specific
ModelValidationError(#1695). - The default transpile pipeline will now add a barrier before the set of
final measurements when compiling for both simulators and devices (#1591). - Purity function in
qiskit.tools.qi.qicalls new version in
qiskit.quantum_informationand issues deprecation warning (#1733) - Updated
dag.node_counterto return the current number of nodes (#1763) - The argument
basis_gatesused incompile,execute, andtranspile
is not longer a comma-separated string but a list of strings. For example,
this basis['u1','u2','u3','cx']should be used instead of'u1,u2,u3,cx'
(#1333) - Methods on the
DAGCircuitwhich previously returned node_ids and/or dicts now
returnDAGNodes - The
Qobjclasses have been reimplemented using models and schemas, as the
rest of spec-defined entities. (#1909). - The rzz gate is now represented as a line when printed in text (#1957).
- Text drawer has support for multi-q gates (#1939).
- Separate
QobjintoPulseQobjandQasmQobj(#1969). - It is possible to define a layout as a list of integers. This maps the ordered list
of virtual circuit qubits to physical qubits as defined by the list of integers (#1946). - Instructions no longer have context about where they are in a circuit. Instead,
the circuit keeps this context. So Instructions are now light-weight and only
have a name, num_qubits, num_clbits and params (#1816). - The old syntax for attaching a gate to the circuit then modifying it is no longer
supported (e.g.circuit.s(qr).inverse()orcircuit.s(qr).c_if(cr, 4)).
Instead, you must first modify the gate then attach it (#1816). QuantumCircuit.datanow contains a list of tuples, where each tuple is a
(instruction, qarg, carg) (#1816).- The visualization subpackage has moved from
qiskit.tools.visualizationto
qiskit.visualization. The public API (which was declared stable in
the 0.7 release) is still accessible off ofqiskit.tools.visualization.
(#1878) - Layout object can now only be constructed from a dictionary, and must be bijective (#2157).
transpile()acceptsinitial_layoutin the form of dict, list or Layout (#2157).- Not specifying a basis in
execute()ortranspile()no longer defaults to unrolling
to the ['u1', 'u2', 'u3', 'cx'] basis. Instead the default behavior is to not unroll,
unless specifically requested (#2166). - Instruction.copy() is now a shallow copy instead of deep (#2214)
- Layout and CouplingMap classes are now accessible from qiskit.transpiler (#2222).
Deprecated
- The methods prefixed by
_getin the DAGCircuit object are being renamed
without that prefix (see #1346) - Changed elements in
couplinglistofCouplingMapfrom tuples to lists
(#1666). - Unroller bases must now be explicit, and violation raises an informative
QiskitError(#1802). - The
qiskit.tools.qcvvpackage is deprecated in favor of Qiskit Ignis (#1884). - The
qiskit.compile()function is now deprecated in favor of explicitly
using theqiskit.compiler.transpile()function to transform a circuit followed
byqiskit.compiler.assemble()to make a qobj out of it. qiskit.converters.qobj_to_circuits()has been deprecated and will be
removed in a future release. Instead
qiskit.compiler.disassemble_circuits()should be used to extract
QuantumCircuitobjects from a compiled qobj. (#2137)- The
qiskit.transpiler.transpile()function is deprecated in favor of
qiskit.compiler.transpile()(#2166). - The
seed_mapperargument intranspile()andexecute()is deprecated in favor of
seed_transpile(), which sets the seed for all stochastic stages of the transpiler (#2166). - The
seedargument isexecute()is deprecated in favor ofseed_simulator(#2166). - The
pass_managerargument intranspile()is deprecated. Instead, the
pass_manager.run()methdod can be used directly to transform the circuit (#2166). - The
qiskit._utilmodule is deprecated and replaced byqiskit.util.
qiskit._utilwill be removed in the 0.9 release. (#2154)
Fixed
- Fixed #1892, whereby inheriting from QuantumRegister or ClassicalRegister would
cause a QiskitError in instruction.py (#1908). - Fixed #829 by removing dependence on scipy unitary_group (#1857).
- Fixed a bug with measurement sampling optimization in BasicAer
qasm_simulator (#1624). - Fixed a bug where barriers didn't plot over all qubits when using matplotlib (#1718).
- Fixed a minor conda env bug in Makefile (#1691).
- Fixed a bug in BasicMapper pass operating over multiple registers (#1611).
- Fixed a bug in BarrierBeforeFinalMeasurements which incorrectly moved measurements
used in conditional operations (#1705). - Fixed a bug that with transpile ignoring initial layout when
coupling map is provided (#1711). - Fixed a bug in the definition of the rzz gate (#1940).
- Fixed a bug in DAGCircuit.collect_runs() that did not exclude conditional gates (#1943).
- Fixed a mapping issue with layouts on non-adjacent qubits, by adding ancillas (#2023).
- Fixed a bug in which an
initial_layoutcould be changed even if it made the circuit
compatible with the devicecoupling_map(#2036). - Fixed
qobj_to_circuitsfor circuits that contain initialize instructions
(#2138)
Removed
- The previously deprecated functions
plot_circuit(),
latex_circuit_drawer(),generate_latex_source(), and
matplotlib_circuit_drawer()fromqiskit.tools.visualizationhave
been removed. Thecircuit_drawer()function from the same module should
be used instead. - The previously deprecated keys
plot_barriersandreverse_bitskeys in
thestylekwarg dict are deprecated, instead the
qiskit.tools.visualization.circuit_drawer()kwargsplot_barriersand
reverse_bitsshould be used instead. - Removed the wrapper folder as part of the post 0.7 cleanup (#1613).
- Removed the python wrappers of the legacy simualtors now that
Qiskit Aer is out (#1615). - Removed simulator instructions
save,load,wait,noise
as unsupported in Aer (#1615). - Removed circuit.add as deprecated (#1627)
- Removed the unroller (#1629)
- Removed deprecated
resultmethods (#1659) - Removed deprecated
couplingdictkwarg fromCouplingMap(#1666) - Removed deprecated
transpile_dag()formatkwarg (#1664) - Removed deprecated
Pauliv,w, andpauli_groupcase arg as int (#1680) - Removed deprecated
state_fidelity()function fromtools.qi(#1681) - Removed
QISKitErrorin favor ofQiskitError. (#1684) - The IBMQ provider (
qiskit.providers.ibmq) has been moved to its own
package (pip install qiskit-ibmq-provider). (#1700) compiled_circuit_qasmhas been removed from the Qobj header, since it
was part of the pre-qobj specification (#1715).- Removed the wigner plotting functions
plot_wigner_function,
plot_wigner_curve,plot_wigner_plaquette, andplot_wigner_data
(#1860). - Removed
Instruction.reapply()method (#1816).