Release 0.8
New minimum python dependency
- Raised minimal Python version to 3.6 (previously 3.5)
Major new features and improvements
Added a complete tutorial
- The new tutorial can be found in the docs.
- The tutorial builds up a teleportation protocol between Alice and Bob, and includes sections about qubit manipulation, discrete event simulation, components, composite components, quantum processor and programs and protocols. Mostly incorporated the old overview documentation.
- The final section that builds up a full working example of the things learned in the previous tutorials.
- A getting started guide gives a very brief summary of the tutorial topics.
Protocols run method now yields directly on event expressions
- The run() method of Protocol, which should return a generator, now expects yield statements to return an
EventExpression
instead of theAwaitCondition
introduced in version 0.7 (which is now removed). - The return value from a yield (
expr = yield self.await_*
) is a copy of theEventExpression
that was yielded on.
It contains information on the atomic expressions were triggered and with which events, which can be used to retrieve any results (such as messages available at the port for example). Protocol.await_event
andProtocol.await_eventexpression
are removed as they are obviated by yielding on event expressions directly.- Renamed
Protocol.await_sleep
(now deprecated) toProtocol.await_timer
. Timer starts when calling the method, not when yielding on the return value. - Functionality of other
Protocol.await_*
methods remain unchanged. - Added
Protocol.await_program
method. - Removed
AwaitCondition
and all its subclasses.
Bell measurement instruction
- Added
instructions.INSTR_MEASURE_BELL
instruction that does Bell state measurement on two qubits. - The
instructions.IMeasure
class now accepts optionalmeas_operators
parameter, which overrides theobservable
parameter. - Added
instructions.IMeasureBell
class (subclass ofIMeasure
) that defines the general measurement operators, but will use individual operations in the case of stabiliser formalism.
Minor features and improvements
QuantumProcessor
- Moved initializing of topologies from the
QuantumProcessor
constructor to the individualPhysicalInstruction
constructor. - The done/fail callbacks of a
QuantumProcessor
that are called once now automatically remove themselves to avoid an unneeded call todismiss
.
Protocols
DataProtocol
now subclassesNodeProtocol
.
Components and Ports
- Added attributes
notify_all_{input,output}
toPort
which, in contrast to thenotify_next_{input,output}
attributes, will ensure all input and output messages schedule an event.
Quantum memory
- The
measure
method of aQuantumMemory
supports multi-qubit measurements if the dimensions of the measurement operators match the list of qubits given. If they don't match each qubit will be measured individually. - The
IMeasure
instruction also supports multi-qubit measurements, identical to themeasure
method.
Qubits
- Added the qubits.ketutil module, with the specialised functions
reduced_dm()
,partial_trace()
,reorder_ket()
,ket_fidelity()
for ket vectors. - Moved all ket vector utility functions in ketstates.py (
dagger()
,ket2dm()
, ...) to ketutil.py. - Added
reduced_dm()
to dmutil.py module. qubitapi.fidelity()
now callsQState.fidelity()
instead of directly implementing the fidelity measurement, so that each QState can implement an optimized method.QState.fidelity()
now also supports Ket and DM reference states.- Improved
KetState.fidelity()
by avoiding the construction of an intermediary density matrix.