CLinalg: C++ Linear-algebra-based simulator
Proposed as a faster alternative to PyLinalg
, CLinalg
is a
Linear-algebra simulator written in C++, with a python (pybind11) interface.
The quantum state is stored as a complex valued vector of length \(2^{N}\), with each element being the complex amplitude of the particular state:
where \(|i\rangle\) represents a computational basis state.
Quantum gates are manipulated as complex valued matrices. Applying a gate consists in selecting the groups of \(2^{arity}\) amplitudes in the state vector, and doing a dot product of each group with the matrix representing the gate.
Miscellanous remarks about the simulator:
it accepts any gate, of any arity.
it works with the entire amplitude vector. Any information is available.
it is memory and run-time exponential in the number of qubits. This implies a hard simulation limit at around 20-30 qubits, depending on your RAM.