.. Strangeworks Python SDK documentation master file, created by sphinx-quickstart on Fri Jan 22 18:44:30 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Strangeworks SDK Qiskit Runtime Extension ========================================================= .. image:: https://img.shields.io/pypi/v/strangeworks_qiskit_runtime.svg :target: https://pypi.python.org/pypi/strangeworks_qiskit_runtime :alt: PyPI The service uses the Strangeworks API accessed through the Strangeworks python SDK. For more information on the general python sdk see our `docs `_. To get started you will need to install the SDK and authenticate using your API key. Your API key can be found on the dashboard page of the Strangeworks platform at https://portal.strangeworks.com. Installation ------------ The Peptide design SDK is installed from a private git repo using pip :: pip install strangeworks-qiskit-runtime Test your installation by running the following :: $ python >>> import strangeworks_qiskit_runtime >>> print(strangeworks_qiskit_runtime.__version__) Authentication -------------- Authenticate using the ``strangeworks.authenticate()`` method :: $ python >>> import strangeworks >>> strangeworks.authenticate(api_key="") Basic Usage ----------- The SDK provides a Qiskit extension that can be used to run quantum circuits on the Strangeworks platform. .. code-block:: python import qiskit import strangeworks from qiskit_ibm_runtime import Session from strangeworks_qiskit_runtime import ( StrangeworksQiskitRuntimeService, StrangeworksSampler, ) # Authenticate with the Strangeworks API and set the resource for the # product (this is only needed for products with more than one resource) strangeworks.authenticate(api_key=os.getenv("STRANGEWORKS_API_KEY")) service = StrangeworksQiskitRuntimeService(channel="ibm_quantum") session = Session(service=service, backend="ibmq_qasm_simulator") sampler = StrangeworksSampler(session=session) circuit = qiskit.QuantumCircuit(2) circuit.h(0) circuit.cx(0, 1) circuit.measure_all() job = sampler.run(circuit, shots=1000) result = job.result() Python SDK Module Reference --------------------------- .. toctree:: :maxdepth: 4 :caption: Contents: strangeworks_qiskit_runtime