Skip to main content

qiskit-qrack-provider

This repository contains a Qrack provider for Qiskit. You must install PyQrack to use it.

Performance can benefit greatly from following the Qrack repository "Quick Start" and "Power user considerations."

Qrack is a GPU-accelerated simulator with optional pure-CPU and CPU/GPU-hybrid simulation, scaling from minimalist systems to multiple GPUs for high performance, with novel near-Clifford, Schmidt-decomposition, quantum binary decision diagram (QBDD), light-cone optimization, state vector, and other simulation techniques. This repository provides the Qrack QasmSimulator.

This provider is based on and adapted from work by the IBM Qiskit Team and QCGPU's creator, Adam Kelly. Attribution is noted in content files, where appropriate. Original contributions and adaptations were made by Daniel Strano of the VM6502Q/Qrack Team.

To use, in Qiskit:

from qiskit.providers.qrack import Qrack

backend = Qrack.get_backend('qasm_simulator')

For example, for use with unitaryfund/mitiq, creating a (noiseless) executor can be as simple as follows:

from qiskit.providers.qrack import Qrack

def executor(circuit, shots=1000):
    """Executes the input circuit and returns the noisy expectation value <A>, where A=|0><0|.
    """
    # Use the Qrack QasmSimulator backend, (but it's specifically noiseless)
    ideal_backend = Qrack.get_backend('qasm_simulator')

    # Append measurements
    circuit_to_run = circuit.copy()
    circuit_to_run.measure_all()

    # Run and get counts
    print(f"Executing circuit with {len(circuit)} gates using {shots} shots.")
    job = ideal_backend.run(circuit_to_run, shots=shots)
    counts = job.result().get_counts()

    # Compute expectation value of the observable A=|0><0|
    return counts["0"] / shots

Generally, you will need to adapt the above executor snippet to your particular purpose.

(Happy Qracking! You rock!)


License: Apache License Version 2.0, Copyright (c) Daniel Strano and the Qrack contributors 2017-2024. All rights reserved.

Metadata

Release files for qiskit-qrack-provider 1.25.0

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

Source distribution (sdist)

Source distribution for qiskit-qrack-provider 1.25.0
File Size Uploaded Provenance Actions
qiskit_qrack_provider-1.25.0.tar.gz 33.3 kB Without provenance Details for qiskit_qrack_provider-1.25.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qiskit-qrack-provider 1.25.0
File Interpreter ABI Platform Actions
qiskit_qrack_provider-1.25.0-py3-none-any.whl Python 3 none any Details for qiskit_qrack_provider-1.25.0-py3-none-any.whl

Total release size: 77.8 kB

Release files / qiskit_qrack_provider-1.25.0.tar.gz

Download URL qiskit_qrack_provider-1.25.0.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
56d8c32b60587ca479ea7724f7e1b2cd7fa66c7d47a9b077b4706e67979546d1
BLAKE2b-256 checksum
How to use checksums
cdd121d79b8c635637f0a15a13f262f52b314b23d2ee74f246cb1e2434d09c02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / qiskit_qrack_provider-1.25.0-py3-none-any.whl

Download URL qiskit_qrack_provider-1.25.0-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fc8a75d6093e564470de06297419084bbbbf279af31a897e516f08a51e4ea94
BLAKE2b-256 checksum
How to use checksums
596248d6e3c52ec3b1155e1056f31d9fc6e4416dee185792323739744d947e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for qiskit-qrack-provider 1.25.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.25.0 This release

2 release files No provenance

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