Qubit Toaster backend for Qiskit
Allows running Qiskit code on Qubit Toaster - a high performance quantum circuit simulator.
More goodies at https://quantastica.com
Install
pip install quantastica-qiskit-toaster
Usage
Import ToasterBackend into your Qiskit code:
from quantastica.qiskit_toaster import ToasterBackend
Replace Aer.get_backend with ToasterBackend.get_backend.
Example
from qiskit import QuantumRegister, ClassicalRegister
from qiskit import QuantumCircuit, execute, Aer
from quantastica.qiskit_toaster import ToasterBackend
qc = QuantumCircuit()
q = QuantumRegister(2, "q")
c = ClassicalRegister(2, "c")
qc.add_register(q)
qc.add_register(c)
qc.h(q[0])
qc.cx(q[0], q[1])
qc.measure(q[0], c[0])
qc.measure(q[1], c[1])
# Instead:
#backend = Aer.get_backend("qasm_simulator")
# Use:
backend = ToasterBackend.get_backend("qasm_simulator")
# OR:
# backend = ToasterBackend.get_backend("statevector_simulator")
job = execute(qc, backend=backend)
# To speed things up a little bit qiskit's optimization can be disabled
# by setting optimization_level to 0 like following:
# job = execute(qc, backend=backend, optimization_level=0)
job_result = job.result()
print(job_result.get_counts(qc))
Details
Syntax
ToasterBackend.get_backend(backend_name = None)
Arguments
backend_name can be:
-
qasm_simulatoronly counts will be returned -
statevector_simulatorboth counts and state vector will be returned
If backend name is not provided then it will act as qasm_simulator
That's it. Enjoy! :)
Metadata
Release files for quantastica-qiskit-toaster 0.9.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantastica-qiskit-toaster-0.9.18.tar.gz | 13.5 kB | Without provenance | Details for quantastica-qiskit-toaster-0.9.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantastica_qiskit_toaster-0.9.18-py3-none-any.whl | Python 3 | none | any | Details for quantastica_qiskit_toaster-0.9.18-py3-none-any.whl |
Total release size: 30.8 kB
Release files / quantastica-qiskit-toaster-0.9.18.tar.gz
| Download URL | quantastica-qiskit-toaster-0.9.18.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdd43b487fb294394faa298c5715274f804d0ac4b55fb947325a45450358853a
|
|
BLAKE2b-256 checksum How to use checksums |
4a845018d85554cdba51e041b23487888be3833f9f10bf1f39985a80de6c3037
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
|
Release files / quantastica_qiskit_toaster-0.9.18-py3-none-any.whl
| Download URL | quantastica_qiskit_toaster-0.9.18-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
497b111c809cf9e35144c0344439973d3c7a51e4b7ed01339cab87513ebeda16
|
|
BLAKE2b-256 checksum How to use checksums |
bc5edb6b13877b7965317f236484f96200985678e68525db29ce79b413f00dfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
|
Security for quantastica-qiskit-toaster 0.9.18
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.