Skip to main content

Quantastica quantum programming tools

Project description

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)
job_result = job.result()

print(job_result.get_counts(qc))

Details

Syntax

ToasterBackend.get_backend(backend_name = None)

Arguments

backend_name can be:

  • qasm_simulator only counts will be returned

  • statevector_simulator both counts and state vector will be returned

If backend name is not provided then it will act as qasm_simulator

That's it. Enjoy! :)

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

quantastica-qiskit-toaster-0.9.12.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

quantastica_qiskit_toaster-0.9.12-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file quantastica-qiskit-toaster-0.9.12.tar.gz.

File metadata

  • Download URL: quantastica-qiskit-toaster-0.9.12.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for quantastica-qiskit-toaster-0.9.12.tar.gz
Algorithm Hash digest
SHA256 e4d87730b8d3e509f721f73f12f9f840c2c8cd748f552184c8e355ad774dde05
MD5 931b78617b4394612e950f771f70f67e
BLAKE2b-256 8b091077dcebff918ea8724e6ceacbca7e605f91f0c51f9fd769b47c9cd742f3

See more details on using hashes here.

File details

Details for the file quantastica_qiskit_toaster-0.9.12-py3-none-any.whl.

File metadata

  • Download URL: quantastica_qiskit_toaster-0.9.12-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for quantastica_qiskit_toaster-0.9.12-py3-none-any.whl
Algorithm Hash digest
SHA256 5f12d8bc0a97c62e6a348b9d268a8c90b5de1837ed99e8d6cf2c140335b03395
MD5 6c079b36fad74325fe14548e767ef8fd
BLAKE2b-256 53ce63d478d80e5ca8ddda9b31e8b4b3562806242f92083b291d9278d6a15f7b

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