pyqrack

Access a fast C++11/OpenCL quantum simulator from Python. Supports OpenCL acceleration, zero-copy mode, and integration with PyZX for circuit optimization.

Visit pyqrack

PyQrack provides pure Python bindings for the high-performance Qrack quantum computer simulator, which is written in C++11 and OpenCL. This allows Python users to leverage a fast, state-vector based simulator.

Key features include:

  • OpenCL acceleration: Utilizes GPUs or other accelerators for improved performance. Note that OpenCL installation is required for accelerator support, except on Mac ARM where it's deprecated.
  • Zero-copy mode: Engage this mode via PYQRACK_HOST_POINTER_DEFAULT_ON=1 for potential performance gains, especially with integrated graphics.
  • Flexible gate representation: Define arbitrary single-qubit gates using 2x2 complex matrices.
  • Controlled gates: Supports multiply-controlled gates (MC, MAC).
  • PyZX integration: Load and simulate circuits defined or optimized using the PyZX library.

Installation is typically done via PyPi wheels, which include pre-compiled Qrack binaries. Building from source requires building Qrack first. Environment variables can configure library paths or floating-point precision.

Share:

Similar to pyqrack:

 

  
  

 

  
  

 

  
  

Command Menu