Skip to main content

QANDLE

QANDLE is a fast and simple quantum state-vector simulator for hybrid machine learning using the PyTorch library. Documentation and examples can be found in the QANDLE documentation, the code resides on GitHub. The paper can be found on arXiv.

Installation

pip install qandle

Usage

import torch
import qandle

# Create a quantum circuit
circuit = qandle.Circuit(
    layers=[
        # embedding layer
        qandle.AngleEmbedding(num_qubits=2),
        # trainable layer, with random initialization
        qandle.RX(qubit=1),
        # trainable layer, with fixed initialization
        qandle.RY(qubit=0, theta=torch.tensor(0.2)),
        # data reuploading
        qandle.RX(qubit=0, name="data_reuploading"),
        # disable quantum weight remapping
        qandle.RY(qubit=1, remapping=None),
        qandle.CNOT(control=0, target=1),
        qandle.MeasureProbability(),
    ]
)


input_state = torch.rand(circuit.num_qubits, dtype=torch.float) # random input
data_reuploading = torch.rand(1, dtype=torch.float) # random data reuploading input

# Run the circuit
circuit(input_state, data_reuploading=data_reuploading)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use QANDLE in your research, please cite the following paper:

@misc{qandle2024,
      title={Qandle: Accelerating State Vector Simulation Using Gate-Matrix Caching and Circuit Splitting}, 
      author={Gerhard Stenzel and Sebastian Zielinski and Michael Kölle and Philipp Altmann and Jonas Nüßlein and Thomas Gabor},
      year={2024},
      eprint={2404.09213},
      archivePrefix={arXiv},
      primaryClass={quant-ph}
}

Metadata

Release files for qandle 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qandle 0.1.12
File Size Uploaded
qandle-0.1.12.tar.gz 30.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qandle 0.1.12
File Interpreter ABI Platform
qandle-0.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 68.5 kB

Release files / qandle-0.1.12.tar.gz

Download URL qandle-0.1.12.tar.gz
Size 30.7 kB
Tags Source
SHA-256 checksum
How to use checksums
914e7b35988692abb24464b71535b614cc68804177adcbabb2481415b0bb3324
BLAKE2b-256 checksum
How to use checksums
0412f7aeb572deba196d68755ab21db62d4c9d993780aaf4e0b4e0e81a80431f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release files / qandle-0.1.12-py3-none-any.whl

Download URL qandle-0.1.12-py3-none-any.whl
Size 37.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfc97a986b6b5e50c0f7fd9c77ba64d4d4424a924b0793ec678c20d1677452c1
BLAKE2b-256 checksum
How to use checksums
55c22fb4cfc5b0440c6bc354178faaf3fbb562371e8d46e7d68f6be814db7b83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page