Releases: ProjectQ-Framework/ProjectQ
ProjectQ v0.4.1
New Features
-
New tutorial implementing parts of the following paper (showcasing how to use the new gates of this release):
Quantum Algorithm for Spectral Measurement with Lower Gate Count
by David Poulin, Alexei Kitaev, Damian S. Steiger, Matthew B. Hastings, Matthias Troyer
Phys. Rev. Lett. 121, 010501 (2018)
(arXiv:1711.11025) -
QubitOperator
can now be used as a gate if it contains only one term and is unitary:
QubitOperator("X1 Z2", -1j) | qureg
-
New gate for general state preparation, see StatePreparation
-
New Uniformly controlled rotations (Ry and Rz), see UniformlyControlledRy and UniformlyControlledRz
-
Decomposition for
SqrtSwap
Improvements
- Optimized decomposition of multi-controlled X
- BasicGate
==
tests now for matrix property which enables the following fast option to create a gate defined by a matrix:
gate = BasicGate()
gate.matrix = np.matrix(...)
(It is still suggested to create a new gate class by deriving from BasicGate if the gate is used frequently or to use the symbolic gate decompositions of ProjectQ)
- Allow string input for
collapse_wavefunction
method of theSimulator
Fixes
- Running circuits on IBM now also works if the circuit is trivial, i.e., it contains no gates but only measurements.
ProjectQ v0.4
New Features
- Mappers: Implementation of a
BasicMapper
class supported by all backends. - Mappers: 1D and 2D grid mappers, see our new mapper tutorial.
- Interface to RevKit (big thanks @msoeken). Examples can be found here and here.
- Automatic mapping for the IBM 16 qubit chip, see the new IBMQ tutorial.
- Updated the
IBMBackend
to allow to retrieve timed-out jobs, see the new IBMQ tutorial. - New setups for compiling to a restricted gate set with a) all-to-all connectivity (see
projectq.setups.restrictedgateset
) b) linear chain of qubits (seeprojectq.setups.linear
) c) a 2D grid of qubits (seeprojectq.setups.grid
). - Improved Error Handling: No multiple errors anymore, error messages are simplified (full error message still available if one sets
verbose=True
in theMainEngine
). - Support for
CZ
gate. - New option for the
CircuitDrawer
to make all qubit lines start at the beginning.
Improvements:
- Speed improvement of the
LocalOptimizer
- Increase seed range of the
Simulator
Breaking Changes
- Setups are now explicit. Previously one could
import projectq.setups.ibm
which automatically changed theengine_list
in theMainEngine
. This does not work anymore! Instead it now has to be done explicitly:MainEngine(engine_list=projectq.setups.ibm.get_engine_list())
. This change was necessary to allow more advanced setups with different options, see the updated compiler tutorial. Measure
gate is now strictly a single qubit gate. Previously it was possible to apply aMeasure
gate to a quantum register. Now one has to writeAll(Measure) | qureg
(from projectq.ops import All, Measure
). Previous codes still run withMeasure | qureg
but it will give a warning and support for this syntax will end with the next release.
ProjectQ v0.3.6
New Features
- Basic support for 16-qubit IBM chip added (mapping needs to be done manually still)
- Added support for barriers and arbitrary rotation gates for the IBM backend
- New decomposition rules for conversion of rotation gates
- New gates: sqrt(X) and sqrt(Swap)
- Resource counter keeps track of gate objects (and not just their string representation)
Fixes
- Simulator throws exception if number of qubits does not agree with the gate size being applied (easier to find bugs in user code)
- Classical simulator now registers measurement results like every other backend, allowing to use
int(qubit)
after measurement - Fixed bug in emulation of controlled time evolution gates
- Fixed Python 3.6 incompatibility of decomposition rules
ProjectQ v0.3.5
New Features
- The user can now select which of the 5-qubit IBM QE chips to use (ibmqx2 or ibmqx4). See https://github.com/ProjectQ-Framework/ProjectQ/blob/develop/examples/ibm.py for an example.
ProjectQ v0.3.4
New Features
- Compilation to 1- and 2-qubit gates using Barenco et al.'s decompositions.
- Example of compiling to a specific gate set, see https://github.com/ProjectQ-Framework/ProjectQ/blob/develop/examples/compiler_tutorial.ipynb
- Simulator can execute general
QubitOperator
s directly; even non-unitary gates are possible. - ProjectQ allows user-defined k-qubit gates for k <= 5, and the simulator can execute them directly.
ProjectQ v0.3.3
Changes
- Workaround for issue with pybind11 version 2.2.0
set_wavefunction
of the python simulator now also accepts purely real wavefunctions (using float instead of complex type)
ProjectQ v0.3.2
New features & changes
New simulator feature
Simulator.collapse_wavefunction
allows to collapse the wavefunction according to a user-specified outcome. See http://projectq.readthedocs.io/en/latest/projectq.backends.html#projectq.backends.Simulator.collapse_wavefunction for details.
New tutorial
New simulator tutorial added to the examples folder (https://github.com/ProjectQ-Framework/ProjectQ/tree/develop/examples). It explains all basic & more advanced features of the simulator.
Check it out: https://github.com/ProjectQ-Framework/ProjectQ/blob/develop/examples/simulator_tutorial.ipynb
Easier installation on MacOS
MacOS installation now supports default XCode compiler.
See http://projectq.readthedocs.io/en/latest/tutorials.html#detailed-instructions-and-os-specific-hints for details.
Test coverage
... is now at 100% (after rounding :-) )
ProjectQ v0.3.1
New simulator features:
get_probability/amplitude
functions for easier access (compared to cheat)set_wavefunction
to initialize the simulator to an arbitrary wavefunction
see http://projectq.readthedocs.io/en/latest/projectq.backends.html#projectq.backends.Simulator
ProjectQ v0.3.0
New
- Time evolution gate to evolve under a Hamiltonian (QubitOperator)
- Expectation value feature added to simulator
ProjectQ v0.2.0
New
- New mapper for the IBM Quantum Experience chip which extends the possible options for applying a CNOT gate by taking into account the new hardware restrictions of the current chip. The interface is changed to support QASM 2.0.
Changes
- Changed code style guidelines to indentation using 4 spaces and updated all the code.
Breaking Changes
- Decompositions rules are not global anymore which makes testing a lot easier. Compared to the previous version, the initializer of the
AutoReplacer
now requires a decomposition rule set as an input parameter.