Tutorials ========= .. tip:: Interactive tutorials can be found on `our Jupyter server `_. Basic Usage ----------- To use the :doc:`provider <./provider>`, a QRydDemo API token is required. The token can be obtained via our `online registration form `_. You can use the token to initialize the provider: .. testcode:: from qiskit_qryd_provider import QRydProvider import os provider = QRydProvider(os.getenv("QRYD_API_TOKEN")) Afterwards, you can choose a :doc:`backend <./backends>`. Different backends are available that are capable of running ideal simulations of quantum circuits on the GPU-based emulator of the `QRydDemo `_ consortium. An inclusion of noise models is planned for the future. You can either choose a backend emulating 30 qubits arranged in a 5x6 square lattice with nearest-neighbor connectivity .. testcode:: backend = provider.get_backend("qryd_emulator$square") or a backend emulating 30 qubits arranged in a triangle lattice with nearest-neighbor connectivity .. testcode:: backend = provider.get_backend("qryd_emulator$triangle") If you use these backends, the compilation of quantum circuits happens on our servers. The circuits are compiled to comply with the native gate set and connectivity of the Rydberg platform, using a decomposer developed by `HQS Quantum Simulations `_. After selecting a backend, you can run a circuit on the backend, using the `transpile` function followed by `backend.run`: .. testcode:: from qiskit import QuantumCircuit, transpile qc = QuantumCircuit(2, 2) qc.h(0) qc.cx(0, 1) qc.measure([0, 1], [0, 1]) job = backend.run(transpile(qc, backend), shots=200) print(job.result().get_counts()) .. testoutput:: :hide: ... Alternatively, you can use the `BackendSampler` primitive: .. testcode:: from qiskit import QuantumCircuit from qiskit.primitives import BackendSampler qc = QuantumCircuit(2, 2) qc.h(0) qc.cx(0, 1) qc.measure([0, 1], [0, 1]) job = BackendSampler(backend).run(qc, shots=200) print(job.result().quasi_dists[0]) .. testoutput:: :hide: ... Expert Options -------------- The value of the phase shift of the :class:`PCZ gate ` can be modified before using the backend via: .. testcode:: from qiskit_qryd_provider import PCZGate PCZGate.set_theta(1.234)