Quantum Rings Plugin for Qiskit
Step 1. Import the required libraries
from qiskit.circuit import QuantumCircuit
from qiskit import QuantumCircuit, transpile, QuantumRegister, ClassicalRegister, AncillaRegister
from qiskit.visualization import plot_histogram
from matplotlib import pyplot as plt
import QuantumRingsLib
from QuantumRingsLib import QuantumRingsProvider
from quantumrings.toolkit.qiskit import QrBackendV2
from quantumrings.toolkit.qiskit import QrJobV1
from matplotlib import pyplot as plt
Step 2. Obtain the Quantum Rings Provider
Do not forget to replace your account key and account name.
qr_provider = QuantumRingsProvider(token = <ACCOUNT_KEY>, name=<ACCOUNT_NAME>)
Step 3. Build the Quantum Circuit using Qiskit provided functions
shots = 1000
numberofqubits = int(qr_provider.active_account()["max_qubits"])
q = QuantumRegister(numberofqubits , 'q')
c = ClassicalRegister(numberofqubits , 'c')
qc = QuantumCircuit(q, c)
# Create the GHZ state (Greenberger–Horne–Zeilinger)
qc.h(0);
for i in range (qc.num_qubits - 1):
qc.cx(i, i + 1);
# Measure all qubits
qc.measure_all();
Step 4. Transpile the code for Quantum Rings SDK
mybackend = QrBackendV2(qr_provider)
qc_transpiled = transpile(qc, mybackend)
Step 5. Execute the code and plot the histogram
job = mybackend.run(qc_transpiled, shots = shots)
result = job.result()
counts = result.get_counts()
plot_histogram(counts)
Metadata
Release files for quantumrings-toolkit-qiskit 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantumrings_toolkit_qiskit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for quantumrings_toolkit_qiskit-0.2.0-py3-none-any.whl |
Release files / quantumrings_toolkit_qiskit-0.2.0-py3-none-any.whl
| Download URL | quantumrings_toolkit_qiskit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d4131e824d99e9dbbca2aeabee94ada2a5ce77ef77c998533d4d0b1436c0595
|
|
BLAKE2b-256 checksum How to use checksums |
04e30041c9052c9b3d0eb78df3fb75781eb703f4efd7d6ae32388a5752e382f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for quantumrings-toolkit-qiskit 0.2.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.