<jupyter_start><jupyter_text>qBraid-SDK: Devices and Jobs Enable qBraid Quantum Jobs through the qBraid CLI, available only through https://lab.qbraid.com<jupyter_code>!qbraid jobs enable -n qbraid_sdk
import qbraid
qbraid.__version__<jupyter_output><empty_output><jupyter_text>Unified quantum device search There's no such function in Qiskit or Cirq, only tedious work-arounds that require you to look into the docs anyways. For Braket, it requires making an authenticated API request through Boto3, and only includes credentialed devices in the response. The qBraid-SDK lists all available QPU's and simulators available through Qiskit, Cirq, and Braket, all in one place.<jupyter_code>from qbraid import get_devices
get_devices()<jupyter_output><empty_output><jupyter_text>Filter your device search with many different advanced query options! For example, let's find simulators containing keyword "State" available through AWS or IBM:<jupyter_code>get_devices(
    filters={
        "type": "Simulator",
        "name": {"$regex": "State"},
        "vendor": {"$in": ["AWS", "IBM"]},
    }
)<jupyter_output><empty_output><jupyter_text>This time, let's search for all gate-based QPUs with at least 5 qubits that are online<jupyter_code>get_devices(
    filters={
        "paradigm": "gate-based",
        "type": "QPU",
        "numberQubits": {"$gte": 5},
        "status": "ONLINE",
    }
)<jupyter_output><empty_output><jupyter_text>Recently added the ability to search by preferred software package, for instance<jupyter_code>get_devices(filters={"runPackage": "qiskit", "requiresCred": "false"})<jupyter_output><empty_output><jupyter_text>Run circuits on any device<jupyter_code>from qbraid import device_wrapper, job_wrapper, get_jobs
from qbraid.api import ibmq_least_busy_qpu<jupyter_output><empty_output><jupyter_text>Copy the desired Device ID into the device wrapper function and you're on your way.<jupyter_code>qbraid_device = device_wrapper("ibm_aer_qasm_sim")
qbraid_device.info
least_busy = ibmq_least_busy_qpu()
least_busy
qbraid_ibmq_device = device_wrapper(least_busy) # IBMQ credential handled by qBraid Quantum Jobs
qbraid_ibmq_device.vendor_dlo
from qiskit import QuantumCircuit
import numpy as np

qiskit_circuit = QuantumCircuit(1, 1)

qiskit_circuit.h(0)
qiskit_circuit.ry(np.pi / 4, 0)
qiskit_circuit.rz(np.pi / 2, 0)
qiskit_circuit.measure(0, 0)

qiskit_circuit.draw()<jupyter_output><empty_output><jupyter_text>Initialize quantum jobs and collect results, with the ability to extract wrapped objects at any step<jupyter_code>shots = 2**10

qbraid_ibm_job = qbraid_device.run(qiskit_circuit, shots=shots)
qbraid_ibm_job.status()<jupyter_output><empty_output><jupyter_text>Submit quantum jobs to any supported device through the same simple and consistent protocol<jupyter_code>qbraid_google_device = device_wrapper("google_cirq_dm_sim")
qbraid_aws_device = device_wrapper("aws_dm_sim")  # AWS credential handled by qBraid Quantum Jobs
qbraid_google_job = qbraid_google_device.run(qiskit_circuit, shots=shots)
qbraid_aws_job = qbraid_aws_device.run(qiskit_circuit, shots=shots)<jupyter_output><empty_output><jupyter_text>Monitor and manage your jobs from one location<jupyter_code>get_jobs()
qbraid_google_result = qbraid_google_job.result()
qbraid_aws_result = qbraid_aws_job.result()
qbraid_ibm_result = qbraid_ibm_job.result()<jupyter_output><empty_output><jupyter_text>Easily compare results<jupyter_code>print(f"google device counts: {qbraid_google_result.measurement_counts()}")
print(f"aws device counts: {qbraid_aws_result.measurement_counts()}")
print(f"ibm device counts: {qbraid_ibm_result.measurement_counts()}")
qbraid_google_result.plot_counts()
qbraid_aws_result.plot_counts()
qbraid_ibm_result.plot_counts()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09256810367627612, 'fraction_numerical': 0.003967204443268976, 'mean_word_length': 7.654462242562929, 'pattern_counts': {'":': 12, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '465296', 'license': 'Apache-2.0', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1301, 'n_words': 301, 'path': 'qbraid_sdk_devices_and_jobs.ipynb', 'repo_name': 'qBraid/Lab-Kernel-Demos', 'size': '3781'}