Releases: QuEST-Kit/QuEST
v3.0.1
Bug fixes
Issue #148: Fixed CMake compilation issue for GPU mode on MacOS.
Issue #210: Fixed distributed mixDamping
which previously gave an incorrect result when targeting the final qubit in the density matrix.
(No Issue): Fixed distributed controlledTwoQubitUnitary
and multiControlledUnitary
. Gave incorrect results when targeting qubits of indices < #totalqubits
- log2(#nodes)
with control qubits which included 0
and/or 1
.
This release is the first to be thoroughly unit tested serially, with multithreading, with GPU accleration, and with distribution of 2, 4 and 8 nodes, on Ubuntu and MacOS.
v3.0.0
Overview
This release adds several powerful operations, like general unitaries (that's any unitary matrix, any number of control qubits, and any number of target qubits), general decoherence channels, and some all-qubit operations and expectation-value calculations. It improves the usability of the ComplexMatrix
type, and improves the documentation.
Tyson Jones thanks his favourite rubber duck; Sinan Shi.
New features
- refactored
ComplexMatrix2
into a 2D array.
This allows much easier initialisation, as demonstrated in this PR.
- added
ComplexMatrix4
andComplexMatrixN
types. - added
createComplexMatrixN()
- added
destroyComplexMatrixN()
- added
getStaticComplexMatrixN()
- added
initComplexMatrixN()
These are for specifying two-qubit and N
-qubit general unitaries and noise operators.
- added
twoQubitUnitary()
- added
controlledTwoQubitUnitary()
- added
multiControlledTwoQubitUnitary()
- added
multiQubitUnitary()
- added
controlledMultiQubitUnitary()
- added
multiControlledMultiQubitUnitary()
These functions effect general unitaries, even in distributed mode, which to the best of our knowledge, is currently a unique QuEST facility!
- added
mixPauli()
- added
mixKrausMap()
- added
mixTwoQubitKrausMap()
- added
mixMultiQubitKrausMap()
These functions allow the simulation of general noise processes on density matrices, through any completely positive map, expressed via Kraus operators!
- added
enum pauliOpType
- added
calcExpecPauliSum()
- added
calcExpecPauliProd()
These allow the calculation of the expected value of weighted sums and products of Pauli operators (and ergo, Pauli-basis Hamiltonians), of both state-vectors and density matrices.
- added
multiRotateZ()
- added
multiRotatePauli()
- added
swapGate()
- added
sqrtSwapGate()
- added
multiStateControlledUnitary()
A handful of multi-qubit unitaries.
- added
applyPauliSum()
- added
initBlankState()
- added
setWeightedQureg()
- added
createCloneQureg()
- added
copyStateToGPU()
- added
copyStateFromGPU()
These functions allow more direct modifications of the quantum state, in order to produce possibly un-physical states.
- added
calcHilbertSchmidtDistance()
- added
calcDensityInnerProduct()
These are calculations primarily for density matrices.
- exposed
invalidQuESTInputError()
This allows user to choose how invalid user-input to QuEST is handled (and hence, recovered from).
- Restructured documentation into groups
The API is now grouped into several categories (e.g. Unitaries
and Calculations
) for easier reading.
API breaking changes
ComplexMatrix2
became a struct (.real
and.imag
fields) of 2D arrays ofqreal
(no longer containComplex
)applyOneQubitDephaseError
becamemixDephasing
applyTwoQubitDephaseError
becamemixTwoQubitDephasing
applyOneQubitDepolariseError
becamemixDepolarising
applyOneQubitDampingError
becamemixDamping
addDensityMatrix
becamemixDensityMatrix
initStateDebug
becameinitDebugState
(not present in API previously)
Bug fixes
- error in
initPureState
(effected only CPU code) - error in
controlledPhaseShift
(effected only GPU code) - fixed all known compiler warnings
- Mingw32 compiler issues
v2.1.0
New features
- applyOneQubitDampingError function added: Mixes a density matrix to induce single-qubit damping (decay to 0 state, or zero temperature qubit damping)
- New build system
- New testing framework
API breaking changes
- seedQuESTDefault is now seeded only by PID and time in milliseconds, not also using the hostname of the node on which the process is running. This makes it significantly more likely that QuEST will compile successfully on new OS. hostname should not have been contributing significantly to the effectiveness of the seeding -- it would only matter when multiple instances of QuEST were spawned on different nodes at the same millisecond.
Build system changes
- QuEST can now be built using cmake as described in the QuEST tutorial. This should improve the cross-platform support of QuEST. In case of problems with the new system, a makefile in the old style is provided in examples.
Testing framework changes
- Test suite rewritten with Python3, for test framework interfacing with main QuEST library and integrated into new Cmake build system (make test).
- Test suite allows more extensible and unified testing structure for ease of maintainability as QuEST expands.
Bug fixes
- Issue #118: Fixed compilation issues related to gethostname in some Windows environments by removing seeding by hostname from
seedQuESTDefault
- Issue #122: Fixed bug in
calcFidelity
when performed on a density matrix, when running on CPU(s) (i.e. GPU code unaffected) - Issue #126: Fixed bug in
multiControlledPhaseShift
when performed on a density matrix - Issue #140: Fixed bug in
controlledPauliY
when running in distributed mode - Also see one bug fix in Milestone v2.0.1
Related issues and pull requests
v2.0.1
Bug Fixes
Issue #113: Fixed error in function seedQuESTDefault() when running in distributed mode on more than one process. This bug made it possible for multiple functions to disagree on a measurement outcome, leading to potential incorrect operation of the following functions: measure(), measureWithStats()
Related issues
v2.0.0
New features
-
Density matrices
- In addition to statevectors, all gates/measurements/state-initialisers can be performed on new density matrix representations of the (now, possibly mixed) quantum states, which can be simulated on all hardware backends.
- Density matrices can be initialised to any pure state (e.g. through
initZeroState
,initPureState
,initClassicalState
). - Density matrices can undergo one and two qubit dephasing and depolarising noise, through
applyOneQubitDephaseError
,applyTwoQubitDepolarisingError
, etc. getDensityAmp
addDensityMatrix
calcPurity
calcFidelity
-
QASM generation. All gates can be recorded into a QASM log, including those which require decomposition into multiple native QASM operations.
startRecordingQASM
stopRecordingQASM
clearRecordedQASM
printRecordedQASM
writeRecordedQASMToFile
-
qcomp
, a precision-agnostic complex type which supports operators, and resolves to the standard complex type ofC
orC++
, depending on the user's language. This is optionally imported with#include <QuEST_complex.h>
. For example, ifQuEST_PREC=4
atC++
compile time, thenqcomp x
will resolve tocomplex<long double> x
. This is useful for performing complex algebra when calculating e.g. unitary gate arguments, and can be converted to/from the QuESTComplex
struct with:toComplex
fromComplex
-
a centralised user-input validation system which catches 28 user errors, such as mismatching qureg dimensions, invalid noise probabilities, attempted collapse to impossible measurement outcomes, etc.
-
other additional functions
calcFidelity
calcInnerProduct
cloneQureg
getAmp
setAmps
initStateFromAmps
- Quregs are automatically in the zero state after creation.
API breaking changes:
- typedef
REAL
becameqreal
void initQuESTEnv(QuESTEnv* env)
becameQuESTEnv createQuESTEnv()
closeQuESTEnv
becamedestroyQuESTEnv
MultiQubit
becameQureg
calcTotalProbability
becamecalcTotalProb
findProbOfOutcome
becamecalcProbOfOutcome
initStatePlus
becameinitPlusState
initStateZero
becameinitZeroState
sigmaX
becamepauliX
(same forY
andZ
)controlledSigmaX
becamecontrolledPauliX
(same forY
andZ
)getProbEl
becamegetProbAmp
getRealAmpEl
becamegetRealAmp
(same forImag
)
Build system changes:
- Compilation is now part of the unit testing
- User can optionally
#include <QuEST_complex.h>
for a native complex type
v1.1.0
New features
- compatibility with
C
andC++
on any target hardware - API now identical for all target hardware (
getProbEl
and controlled-rotate gates added on GPU) - convenience scripts for unit testing
- compiler compatibility testing
- seeding now default when creating QuEST env
initClassicalState
Build system changes
- new build process targets CPUs, GPUs, network with single makefile, with explicit support for GNU, Intel and Clang compilers
- source files can mix
C
andC++
- improved compatibility with older compilers
- resolved compiler warnings
Bug fixes
- fixes in unit testing routines
v1.0.0
New features
- ControlledRotateAroundAxis, ControlledRotateX, ControlledRotateY, ControlledRotateZ
- QuESTSeedRandomDefault uses pid, time and hostname as opposed to just pid and time
- QuESTSeedRandom allows user to specify their own seeds
For full v1.0.0 API, see https://aniabrown.github.io/QuEST/QuEST_8h.html
API breaking changes
- qubits.h renamed to QuEST.h -- #include "qubits.h" needs to be changed to #include "QuEST.h" in user circuit files
- the Mersenne Twister random number generator used for measure and measureWithStats is no longer seeded by default when you call initQuESTEnv. Instead, you need to call QuESTSeedRandomDefault to seed by pid, time and hostname, or QuESTSeedRandom for user defined seeding.
Build system changes
- there is now an example makefile and example circuit file in the root directory. This means the code can be tested very quickly after downloading using "make; ./demo" in the root directory. For developers -- make sure that these files are exact copies of those in the examples folder when comitting.
- include directory is now passed to the compiler, which means you can use #include "QuEST.h" as opposed to #include "/pathtoQuEST/QuEST.h" as before
Bug fixes
- rotateAroundAxis, rotateX, rotateY and rotateZ were using the wrong equation and not normalising the input vector correctly -- this is now fixed