Skip to main content

QuForge: a library for qudit simulation

Project description

QuForge Logo

QuForge v0.2.1

QuForge is a Python-based quantum simulator designed for qudits, extending quantum computing capabilities beyond traditional qubits. It facilitates the simulation of quantum circuits with customizable qudit dimensions, supporting both dense and sparse operations for efficient computation. Built on the differentiable framework PyTorch, QuForge enables execution on accelerating devices such as GPUs and TPUs, enhancing simulation speed.

For detailed documentation, visit quforge.readthedocs.io.

Installation

Install QuForge using pip:

pip install quforge

To install the latest version directly from the source:

# Clone the repository
git clone https://github.com/tiago939/QuForge.git

# Navigate to the project directory
cd QuForge

# Install the package
pip install .

Ensure that your environment meets the necessary dependencies listed in requirements.txt.

Usage

Here's an example of how to create and execute a simple quantum circuit using QuForge:

import quforge.quforge as qf

# Initialize a 2-level (qubit) circuit with 2 wires
circuit = qf.Circuit(dim=2, wires=2)

# Add gates to the circuit
circuit.H(index=[0])           # Hadamard gate on wire 0
circuit.CNOT(index=[0, 1])   # CNOT gate with control wire 0 and target wire 1

# Initialize the state
state = qf.State('0-0', dim=2)

# Execute the circuit
result = circuit(state)

print(result)

This script sets up a quantum circuit with a Hadamard gate and a CNOT gate, then executes it on an initial state.

Directory Structure

The QuForge repository is organized as follows:

QuForge/
├── docs/                   # Documentation files
├── examples/               # Example scripts demonstrating QuForge usage
├── quforge/                # Main source code for the QuForge library   ├── __init__.py         # Initializes the quforge package   └── ...                 # Other source files
├── .gitignore              # Specifies files and directories to ignore in Git
├── .readthedocs.yaml       # Configuration for Read the Docs documentation hosting
├── LICENSE                 # License information (Apache-2.0)
├── README.md               # Overview and instructions for the project
├── logo.png                # QuForge logo image
├── requirements.txt        # List of Python dependencies
└── setup.py                # Installation script for the QuForge package

Contributions and Support

We are continuously working on optimizing the library. Please reach out if you have any suggestions or questions!

Citation

If you use QuForge in your research, please cite our work:

@misc{2024quforge,
      title={QuForge: A Library for Qudits Simulation},
      author={Tiago de Souza Farias and Lucas Friedrich and Jonas Maziero},
      year={2024},
      eprint={2409.17716},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      url={https://arxiv.org/abs/2409.17716},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quforge-0.2.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quforge-0.2.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file quforge-0.2.1.tar.gz.

File metadata

  • Download URL: quforge-0.2.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for quforge-0.2.1.tar.gz
Algorithm Hash digest
SHA256 62adb8399a1d34f29d4024b8d0912354c5ab2b03f4a3096d02eed7cf4318ac3c
MD5 b4ab292d514ae9fb50e459b80e0e5b7d
BLAKE2b-256 2efd0d37cf8ed3db25fdc83251e00a21c9c88ff55ec935bcaac79c741e8b7617

See more details on using hashes here.

File details

Details for the file quforge-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: quforge-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for quforge-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 967519fa5a8b3fdb0504eb2a2d1e3fe393268ddb710384a46026067c5fed1277
MD5 0ebef113ebf99cb7e0440f1ac3a6cec7
BLAKE2b-256 a725a9f2098d82b0e4e6aaac9760eac87b1cd664450191a03239aefe2a0f471a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page