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.24.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.24.0
File Size Uploaded Provenance Actions
qiskit_qrack_provider-1.24.0.tar.gz 24.2 kB Without provenance Details for qiskit_qrack_provider-1.24.0.tar.gz

Built distribution (wheel)

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

Total release size: 57.4 kB

Release files / qiskit_qrack_provider-1.24.0.tar.gz

Download URL qiskit_qrack_provider-1.24.0.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
31b9b4d21cbca0b8e20ddea79c61d3bae441b73b8ae14666a8fa2a3a2755203d
BLAKE2b-256 checksum
How to use checksums
c7e57230a1b9e87214330127976b0df809bba271ae03e5afb14adfe97fec3f22
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.24.0-py3-none-any.whl

Download URL qiskit_qrack_provider-1.24.0-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
296fa96ac37d0d26c50c70679a2b4bda5816c8fcdd11bb9ed7f2f27daf149b32
BLAKE2b-256 checksum
How to use checksums
dbb1a339df72f00f33bdaaf8f55f93708c811eb5a57fddb947b64d7c88685286
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.24.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.24.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