Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Releases: cda-tum/dd_package

Version 2.2.0 Release

14 Mar 10:02
7c9644a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.0...v2.2.0

Version 2.1.0 Release

28 Mar 16:07
a9efdc7
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.2...v2.1.0

Version 2.0.2 Release

07 May 08:48
17800b5
Compare
Choose a tag to compare

This release adds the essential functionality to the JKQ DD Package to support hybrid Schrödinger-Feynman simulation.
The main change is that decision diagrams might now "start" (from the bottom) with a different qubit than 0, which is needed for splitting the circuit horizontally. Additionally, it adds functionality that allows to efficiently export a complete set of amplitudes from a state vector DD and to transfer an existing DD to another package instance.

For a detailed description of the changes, see the corresponding pull request (#12).

Version 2.0.1 Bugfix Release

27 Apr 08:35
3e339f9
Compare
Choose a tag to compare

This release addresses some of the bugs and performance deficits that came up when integrating the new package version into our QFR library. For a detailed description of the respective changes, see the corresponding pull request (#10).

Version 2.0

27 Apr 08:32
c0dc65b
Compare
Choose a tag to compare

This new major version of the JKQ DD Package addresses several (legacy) drawbacks:

  • a maximum qubit size can now be set dynamically
  • the line member for operations has been dropped and operations are now considered as a set of controls and a target.
  • the decision diagram structure for matrices has previously been abused to represent vectors. This entails certain redundancies for nodes representing vectors and inefficiencies for operations acting on vectors. Furthermore, most of the operations to date do not really convey their applicability, e.g., it does per se not make sense to multiply two vectors or to calculate the inner product between two matrices, yet the routines in the current version of the package allow this. This new package version introduces a separation between vector and matrix DD nodes.
  • management of the unique table and the complex table/cache was still written in C and prone to errors and memory leaks.

This involves some breaking changes to the existing code structure:

  • 🏗️ Library is now header-only. All code from .cpp files has been moved to corresponding .hpp files

  • 🚌 moved all header to include/dd so that users of the library include it as, e.g. #include dd/Package.hpp

  • 💥 Node and Edge Structs

    • separate Node classes for vectors (vNode) and matrices (mNode)
    • separate Edge classes for vectors (vEdge) and matrices (mEdge)
    • Node and Edge structs become more than mere containers, e.g., <Edge>.isTerminal() is used instead of dd::Package::isTerminal(<Edge>)
    • vNode::terminal and mNode::terminal as terminal nodes
    • vEdge::zero, vEdge::one, mEdge::zero, mEdge::one as zero and one terminals
    • isZeroTerminal() and isOneTerminal routines for Edge struct
  • 💥 Compute Table

    • (Templated) class for compute tables
    • Separate compute tables for all operations supported by the package
    • Compute table for (conjugate) transpose are now unary to conserve space
    • Hash for compute tables is refactored and now uses std::hash specializations for Complex, ComplexValue, Edge and CachedEdge.
  • 💥 operations

    • (Templated) class for noise operation table
    • operations is renamed to noiseOperationTable to better convey its intent
    • removed controls, i.e., only the kind of operation and the target qubit are used as hash
  • 💥 Unique Table and Memory Management

    • (Templated) class for unique tables
    • next is dropped from the Node classes
    • Buckets are now single-linked lists
    • Available space chain is a vector of vectors and represents a collection of chunks
    • Chunks grow geometrically with a default factor of 2
    • In addition there is a stack<Node*> that handles nodes returned to the available space chain
  • 💥 Complex Table, Complex Cache and Memory Management

    • Separate both concepts into separate (templated) classes
    • next is dropped from the complex table entry class
    • Complex table buckets are now single-linked lists
    • Available space chain is a vector of vectors and represents a collection of chunks
    • Chunks grow geometrically with a default factor of 2
    • In addition there is a stack<Entry*> that handles numbers returned to the available space chain
  • 💥 Data Types for Qubits

    • Instead of sprinkling (unsigned) short throughout the code for indexing qubits and controls, typedefs are introduced
    • Qubit thereby represents the index of a qubit, i.e. [0, max). Currently defaults to a signed 8bit integer type which allows to address up to 128 qubits.
    • QubitCount is the corresponding unsigned type to Qubit and is used for specifying the number of qubits in various routines. Since it is unsigned, it can also represent max.
    • RefCount is used as datatype for reference counting in the complex numbers' table as well as the unique tables. The default (uint_fast32_t) allows for a maximum reference count of ~4 billion.
  • 💥 printDD routine dropped

  • 🎨 use C++17 inline variables/methods

  • ⚡ Performance Implications (according to benchmarks)

    • ⬆️ vector node creation reduced substantially (from ~10ns down to ~1.3ns)
    • ⬆️ matrix node creation seems to be reduced as well (from 7-10ns down to ~5ns)
    • ⬇️ complex number package creation time approximately doubled. this is probably caused by the allocations of the complex table that previously took place on the first call to getCachedComplex and are now allocated directly in the constructor
    • ⬇️ package creation time also approximately doubled. this has two possible causes. On the one side, the same effect as above takes effect for the unique table. On the other side, there are now two separate unique tables and a total of nine compute tables, where previously there has been one unique table and six compute tables. In the future the sizes of the respective tables might be tuned individual on demand, e.g. multiplication is the most dominant operation in the package, so it should offer the most buckets, while calculating the kronecker product is a far less frequent operation and might not need that many buckets.
    • ⬆️ Caching performance of the unique table seems to have improved (MakeIdentCached benchmark) (from ~3.9ns down to ~1.67ns). Will be interesting to see in real simulations.
    • ⬆️ Most of the other benchmarks show a small improvement or remain on an equal level. This is definitely a success, considering that the package is much more accessible in its new form.

Version 1.3

15 Apr 12:05
3464f79
Compare
Choose a tag to compare

The purpose of this release is to tag the most recent version of the package before the major version upgrade.