Skip to content

Workbench Python API Overview

This section provides a high-level overview of the PsiQuantum Workbench Python API, which serves as the primary interface for users to create, manipulate, and simulate quantum circuits.

The Python API is built on top of the C++ core implementation, providing a user-friendly interface while maintaining high performance for quantum simulations.

Architecture

The Workbench Python API is designed with several key components that work together:

Key classes:

  1. QPU (Quantum Processing Unit) - The central simulation engine that manages quantum states and executes quantum operations
  2. Qubits - Objects representing quantum registers and quantum arithmetic data types
  3. Qubricks - Base class for higher-level abstractions for building reusable quantum circuit components
  4. OpFilter - Base class for filters - operation transformers that process quantum operations as they flow through the system
  5. Resource estimator - The interface for getting resource estimates for quantum programs

Workbench also offers a variety of built-in Qubricks that implement common quantum routines such as quantum arithmetic, state preparation, and others.