### Full Rigetti Workflow Example Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/rigetti An end-to-end example demonstrating the setup of credentials, provider, device, program definition, job submission, and result retrieval for a Rigetti processor. ```python import os from pyquil import Program from qbraid.runtime.rigetti import RigettiProvider # 1. Set credentials (or export as env var beforehand) os.environ["RIGETTI_REFRESH_TOKEN"] = "your-refresh-token" # 2. Initialize provider and start quilc provider = RigettiProvider() provider.setup() # 3. Get the target device device = provider.get_device("ankaa-3") print(f"Device status: {device.status()}") print(f"Number of qubits: {len(device.live_qubits())}") # 4. Define a GHZ state circuit program = Program(""" DECLARE ro BIT[3] H 0 CNOT 0 1 CNOT 1 2 MEASURE 0 ro[0] MEASURE 1 ro[1] MEASURE 2 ro[2] """) # 5. Submit the job job = device.run(program, shots=1000) print(f"Submitted job: {job.id}") # 6. Retrieve results result = job.result() print(f"Counts: {result.data.measurement_counts}") # Expected output (approximate): {'000': ~500, '111': ~500} ``` -------------------------------- ### Launch, List, Watch, and Send Commands for qbraid Agents Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_agents Basic commands to get started with managing AI coding agents. Use 'launch' to start a new session, 'list' to view active sessions, 'watch' to stream live activity, and 'send' to provide instructions. ```bash qbraid agents launch # Interactive launch ``` ```bash qbraid agents list # Show active sessions ``` ```bash qbraid agents watch # Stream live activity ``` ```bash qbraid agents send --text "..." # Send instructions ``` -------------------------------- ### Install qBraid SDK from source Source: https://docs.qbraid.com/v2/sdk/user-guide/overview Install the qBraid SDK from its GitHub repository. Clone the repository and then use pip to install it from the root directory. ```bash git clone https://github.com/qBraid/qBraid.git cd Qbraid pip install . ``` -------------------------------- ### Install qBraid SDK from Source Source: https://docs.qbraid.com/v2/sdk Install the qBraid SDK from its GitHub repository. Clone the repository and then run the pip install command in the root directory. ```bash git clone https://github.com/qBraid/qBraid.git cd qBraid pip install . ``` -------------------------------- ### Install qbraid-qir from source Source: https://docs.qbraid.com/v2/qir Install qbraid-qir from its source repository. Clone the repository and run pip install in the root directory. ```bash git clone https://github.com/qBraid/qbraid-qir.git cd qbraid-qir pip install . ``` -------------------------------- ### Install qbraid SDK Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/native Install the qbraid SDK using pip. Ensure you install the relevant extras for your chosen devices. ```bash pip install qbraid ``` -------------------------------- ### Run GHZ state circuit on Quantinuum emulator Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/quantinuum This example demonstrates a full workflow: initializing the Quantinuum provider, getting an emulator device, defining a GHZ state circuit, submitting the job with specific optimization levels, and retrieving the results. ```python from pytket.circuit import Circuit from qbraid.runtime.quantinuum import QuantinuumProvider # 1. Initialize provider (assumes qnx login was run) provider = QuantinuumProvider() # 2. Get an emulator device device = provider.get_device("H1-1E") print(f"Device status: {device.status()}") # 3. Define a GHZ state circuit circuit = Circuit(3) circuit.H(0) circuit.CX(0, 1) circuit.CX(1, 2) circuit.measure_all() # 4. Submit the job job = device.run(circuit, shots=1000, optimisation_level=2) print(f"Submitted job: {job.id}") # 5. Retrieve results result = job.result() print(f"Counts: {result.data.measurement_counts}") # Expected output (approximate): {'000': ~500, '111': ~500} ``` -------------------------------- ### Install qbraid-algorithms from source Source: https://docs.qbraid.com/v2/algorithms Install the qbraid-algorithms package from its source code. This involves cloning the repository and running a pip install command. ```bash git clone https://github.com/qBraid/qbraid-algorithms.git cd qbraid-algorithms pip3 install . ``` -------------------------------- ### Install qBraid-SDK v0.10.2 Source: https://docs.qbraid.com/home/legacy-jobs Install the specified version of the qBraid-SDK to work with legacy jobs. Ensure this version is installed before proceeding. ```bash pip install 'qbraid==0.10.2' ``` -------------------------------- ### Install qBraid-Algorithms from source Source: https://docs.qbraid.com/v2/algorithms/user-guide/overview Install the qBraid-Algorithms package from its source repository. This involves cloning the repository and then performing a pip installation. ```bash git clone https://github.com/qBraid/qbraid-algorithms.git cd qbraid-algorithms pip3 install . ``` -------------------------------- ### Install qBraid CLI Source: https://docs.qbraid.com/v2/cli/user-guide/overview Install the qBraid CLI package from PyPI. This is the basic installation for command-line usage. ```bash pip install qbraid-cli ``` -------------------------------- ### Start Server and Configure SSH Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_compute Use this command to start a compute server and automatically configure SSH access. It waits for the server to be ready and combines server start with SSH setup. ```console qbraid compute up ``` ```console qbraid compute up 2vCPU_4GB ``` -------------------------------- ### Install PyQASM from source Source: https://docs.qbraid.com/v2/pyqasm Install PyQASM from its source repository. Clone the repository and run pip install in the root directory. ```bash git clone https://github.com/qBraid/pyqasm.git cd pyqasm pip install . ``` -------------------------------- ### List Installed Environments Source: https://docs.qbraid.com/v2/cli/user-guide/overview List all installed qBraid environments using the 'envs list' command. This helps in managing your quantum computing setups. ```bash $ qbraid envs list ``` -------------------------------- ### List Installable qBraid Environments Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_envs Shows a list of pre-built qBraid environments available for installation from the cloud catalog. Supports pagination. ```console $ qbraid envs available [OPTIONS] ``` -------------------------------- ### Install qbraid SDK Source: https://docs.qbraid.com/sdk/user-guide/providers/native Install the qbraid SDK using pip. Additional extras may be needed for specific device integrations. ```bash pip install qbraid ``` -------------------------------- ### Install a qbraid environment Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_envs Installs a pre-built environment from cloud storage. Offers options to create a local environment or proceed with download if platform or Python version mismatches occur. ```console $ qbraid envs install [OPTIONS] ENV_SLUG ``` -------------------------------- ### Install PyQASM from source Source: https://docs.qbraid.com/v2/pyqasm/user-guide/overview Install PyQASM from its source repository by cloning the git repository and running pip install in the root directory. ```shell git clone https://github.com/qBraid/pyqasm.git cd pyqasm pip install . ``` -------------------------------- ### Install from source with optional dependencies Source: https://docs.qbraid.com/v2/qir Install qbraid-qir from source, including optional dependencies using the 'extras_require' format. ```bash pip install '.[qiskit,cirq,qasm3,squin]' ``` -------------------------------- ### Example QuantumProvider Implementation Source: https://docs.qbraid.com/v2/sdk/user-guide/runtime/new-provider This example demonstrates how to implement a custom QuantumProvider. It includes methods for building a TargetProfile and retrieving devices, using a hypothetical MySession for API interactions. ```python from qbraid.runtime import QuantumProvider, TargetProfile class MyProvider(QuantumProvider): def __init__(self, api_key: str): super().__init__() self.session = MySession(api_key) def _build_profile(self, data: dict[str, Any]) -> TargetProfile: return TargetProfile(**data) def get_device(self, device_id: str) -> MyDevice: data = self.get_device(device_id=device_id) profile = self._build_profile(data) return MyDevice(profile, self.session) def get_devices(self, **kwargs) -> list[MyDevice]: data = self.session.get_devices(**kwargs) profiles = [self._build_profile(item) for item in data] return [MyDevice(profile, self.session) for profile in profiles] ``` -------------------------------- ### Install qiskit extra Source: https://docs.qbraid.com/sdk/user-guide/providers/ibm Install the qiskit extra for qbraid to interface with IBM Quantum backends. ```bash pip install 'qbraid[qiskit]' ``` -------------------------------- ### Install qBraid SDK with Quantinuum extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/quantinuum Install the qBraid SDK with the necessary dependencies for Quantinuum integration. This includes pytket, pytket-quantinuum, and qnexus. ```bash pip install 'qbraid[quantinuum]' ``` -------------------------------- ### Install qBraid CLI with Environments Extra Source: https://docs.qbraid.com/v2/cli/user-guide/overview Install the qBraid CLI with the 'envs' extra to manage qBraid environments. This is recommended for full functionality. ```bash pip install 'qbraid-cli[envs]' ``` -------------------------------- ### Install Rigetti Provider Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/rigetti Install the Rigetti provider and its dependencies, pyquil and qcs-sdk-python. ```bash pip install 'qbraid[rigetti]' ``` -------------------------------- ### Install qbraid-qir from source with optional dependencies Source: https://docs.qbraid.com/v2/qir/user-guide/overview Install qbraid-qir from source, including multiple optional dependencies using the 'extras_require' format. ```shell pip install '.[qiskit,cirq,qasm3,squin]' ``` -------------------------------- ### Install qbraid-qir with Qiskit support Source: https://docs.qbraid.com/v2/qir Install qbraid-qir with optional Qiskit dependencies for Qiskit to QIR conversions. ```bash pip install 'qbraid-qir[qiskit]' ``` -------------------------------- ### Verify qBraid Setup Source: https://docs.qbraid.com/v2/core Verify your qBraid setup by connecting to the quantum runtime and listing available devices. This code snippet requires your credentials to be configured. ```python from qbraid_core.services.runtime import QuantumRuntimeClient quantum_client = QuantumRuntimeClient() device_list = quantum_client.list_devices() for device in device_list: print(device.qrn) ``` -------------------------------- ### Install qBraid Visualization Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/ionq Installs the necessary package for visualizing quantum circuit results, including histograms and probability distributions. ```bash pip install 'qbraid[visualization]' ``` -------------------------------- ### Install qbraid-core Source: https://docs.qbraid.com/v2/core/user-guide/overview Install the qbraid-core package from PyPI. Ensure you are using a version compatible with qBraid API V2. ```bash pip install qbraid-core ``` -------------------------------- ### Install Package into qBraid Environment Source: https://docs.qbraid.com/v2/cli/user-guide/environments Activate a specific qBraid environment (e.g., 'qiskit') and then use 'python -m pip install' to install packages. This ensures packages are installed within the active environment and persist across sessions. Remember to deactivate when finished. ```bash $ qbraid envs activate qiskit $ python -m pip install pytket $ deactivate ``` -------------------------------- ### Install Braket Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/aws Install the 'braket' extra for qbraid to enable integration with Amazon Braket. ```bash pip install 'qbraid[braket]' ``` -------------------------------- ### Install PyQASM with visualization support Source: https://docs.qbraid.com/v2/pyqasm Install PyQASM with the 'visualization' extra dependency for circuit drawing tools. ```bash pip install 'pyqasm[visualization]' ``` -------------------------------- ### Install qBraid SDK with Origin Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/origin Install the qBraid SDK with the necessary Origin extra to include pyqpanda3. Ensure you have Python 3.10 or greater. ```bash pip install 'qbraid[origin]' ``` -------------------------------- ### Install qbraid-qir with Squin support Source: https://docs.qbraid.com/v2/qir Install qbraid-qir with optional Squin dependencies for Squin to QIR conversions. ```bash pip install 'qbraid-qir[squin]' ``` -------------------------------- ### Install qbraid-core v0.1.50 Source: https://docs.qbraid.com/home/legacy-jobs Install the specified version of the qbraid-core library to access detailed job metadata and results. This is a prerequisite for using QuantumClient. ```bash pip install 'qbraid-core==0.1.50' ``` -------------------------------- ### Install qbraid-algorithms from source with CLI dependencies Source: https://docs.qbraid.com/v2/algorithms/user-guide/cli Install the qbraid-algorithms package from a local source with CLI dependencies using pip. ```bash pip install -e ".[cli]" ``` -------------------------------- ### Verify qBraid Setup Source: https://docs.qbraid.com/v2/core/user-guide/overview Verify your qBraid setup by listing available quantum devices using the QuantumRuntimeClient. This confirms your credentials and connection to the qBraid services. ```python >>> from qbraid_core.services.runtime import QuantumRuntimeClient >>> quantum_client = QuantumRuntimeClient() >>> device_list = quantum_client.list_devices() >>> for device in device_list: ... print(device.qrn) ``` -------------------------------- ### Install qbraid-qir with Squin support Source: https://docs.qbraid.com/v2/qir/user-guide/overview Install qbraid-qir with the 'squin' extra dependency for Squin to QIR conversions. ```shell pip install 'qbraid-qir[squin]' ``` -------------------------------- ### Install qBraid with OQC Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/oqc Install the qBraid library with the necessary OQC dependencies. This command ensures all required packages for OQC integration are included. ```bash pip install 'qbraid[oqc]' ``` -------------------------------- ### Get qBraid CLI Help Source: https://docs.qbraid.com/v2/cli View help documentation for the qBraid CLI. You can get general help or specific help for commands and subcommands. ```bash $ qbraid --help ``` ```bash $ qbraid --help ``` ```bash $ qbraid --help ``` -------------------------------- ### Install a Hub Project Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_projects Clones a qBraid Hub project and installs its associated environments. It automatically handles platform and Python version mismatches. ```console $ qbraid projects install [OPTIONS] SLUG ``` -------------------------------- ### Install qBraid SDK with IonQ Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/ionq Install the qBraid SDK with the necessary IonQ extra package using pip. Ensure you are using Python 3.10 or greater. ```bash pip install 'qbraid[ionq]' ``` -------------------------------- ### Install qbraid-algorithms with CLI dependencies Source: https://docs.qbraid.com/v2/algorithms/user-guide/cli Install the qbraid-algorithms package with necessary CLI dependencies using pip. ```bash pip install "qbraid-algorithms[cli]" ``` -------------------------------- ### Install qbraid-core Source: https://docs.qbraid.com/v2/core Install the qbraid-core package from PyPI. Ensure you are using version 0.2.0 or later for compatibility with qBraid API V2. ```bash pip install qbraid-core ``` -------------------------------- ### Install qbraid-qir with Cirq support Source: https://docs.qbraid.com/v2/qir Install qbraid-qir with optional Cirq dependencies for Cirq to QIR conversions. ```bash pip install 'qbraid-qir[cirq]' ``` -------------------------------- ### Install qbraid-algorithms with pip Source: https://docs.qbraid.com/v2/algorithms Install the qbraid-algorithms package using pip. Ensure you have Python 3.11 or greater. ```bash pip install qbraid-algorithms ``` -------------------------------- ### Install Azure Extra Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/azure Install the Azure extra for qbraid to enable integration with Azure Quantum supported devices. ```bash pip install 'qbraid[azure]' ``` -------------------------------- ### Install qbraid-qir with OpenQASM 3 support Source: https://docs.qbraid.com/v2/qir Install qbraid-qir with optional OpenQASM 3 dependencies for OpenQASM 3 to QIR conversions. ```bash pip install 'qbraid-qir[qasm3]' ``` -------------------------------- ### Install qBraid-Algorithms using pip Source: https://docs.qbraid.com/v2/algorithms/user-guide/overview Install the qBraid-Algorithms package using pip. Ensure you have Python 3.11 or greater. ```bash pip install qbraid-algorithms ``` -------------------------------- ### Install qBraid SDK with Qiskit and Cirq Extras Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/ionq Installs the qBraid SDK with additional support for Qiskit and Cirq programming frameworks. This is a prerequisite for submitting multi-circuit jobs with these libraries. ```bash pip install 'qbraid[qiskit,cirq]' ``` -------------------------------- ### Get qBraid CLI Version Source: https://docs.qbraid.com/v2/cli Retrieve the current version of the qBraid CLI installed on your system. ```bash $ qbraid --version ``` -------------------------------- ### Full Example: Origin Provider Workflow Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/origin An end-to-end example demonstrating how to use the Origin provider to run a GHZ state circuit on the full amplitude simulator. Requires setting API credentials and defining a quantum program. ```python import os from pyqpanda3.core import QProg, H, CNOT, measure from qbraid.runtime.origin import OriginProvider # 1. Set credentials (or export as env var beforehand) os.environ["ORIGIN_API_KEY"] = "your_api_key_here" # 2. Initialize provider provider = OriginProvider() # 3. Get the target device device = provider.get_device("full_amplitude") print(f"Device status: {device.status()}") # 4. Define a GHZ state circuit prog = QProg(3) q = prog.qubits() prog << H(q[0]) << CNOT(q[0], q[1]) << CNOT(q[1], q[2]) prog << measure(0, 0) << measure(1, 1) << measure(2, 2) # 5. Submit the job job = device.run(prog, shots=1000) print(f"Submitted job: {job.id}") # 6. Retrieve results result = job.result() print(f"Probabilities: {result.data.get_probabilities()}") # Expected output (approximate): {'000': 0.5, '111': 0.5} ``` -------------------------------- ### Get a Specific Device and Check Status Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/origin Retrieve a specific quantum device by its ID and check its current status. For example, 'full_amplitude' simulator. ```python device = provider.get_device("full_amplitude") print(device.status()) # ``` -------------------------------- ### Get All Devices Response Example Source: https://docs.qbraid.com/v2/api-reference/rest/get-quantum-devices This JSON object represents a successful response when retrieving a list of quantum devices. It includes details about a 'QIR sparse simulator' device. ```json { "success": true, "data": [ { "name": "QIR sparse simulator", "qrn": "qbraid:qbraid:sim:qir-sv", "vendor": "qbraid", "deviceType": "SIMULATOR", "runInputTypes": ["qasm2", "qasm3", "qir.bc", "qir.ll"], "status": "ONLINE", "statusMsg": null, "nextAvailable": null, "queueDepth": 0, "avgQueueTime": null, "numberQubits": 64, "paradigm": "gate_model", "modality": "sparse_simulator", "noiseModels": null, "pricingModel": "fixed", "pricing": { "perTask": 0.5, "perShot": 0, "perMinute": 7.5 }, "directAccess": true } ] } ``` -------------------------------- ### Setup RigettiProvider Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/rigetti Ensure the quilc compiler is running and ready for program compilation. Can auto-start quilc or point to an existing endpoint. ```python provider = RigettiProvider() # Start a local quilc process (default behavior) provider.setup() # Or, point to an existing quilc endpoint provider.setup(quilc_endpoint="tcp://my-quilc-host:5555") ``` -------------------------------- ### Example 200 OK Response for Get Job Source: https://docs.qbraid.com/v2/api-reference/rest/get-quantum-jobs This JSON object represents a successful response when retrieving a quantum job. It includes details about the job's status, execution, and cost. ```json { "success": true, "data": { "name": "My quantum job", "shots": 1000, "deviceQrn": "qbraid:qbraid:sim:qir-sv", "tags": {}, "runtimeOptions": {}, "jobQrn": "qbraid:job:abc123xyz", "batchJobQrn": null, "vendor": "qbraid", "provider": "qbraid", "status": "COMPLETED", "statusMsg": null, "experimentType": "gate_model", "queuePosition": null, "timeStamps": { "createdAt": "2025-01-15T10:30:00Z", "endedAt": "2025-01-15T10:30:05Z", "executionDuration": 5000 }, "cost": 0.501875, "estimatedCost": 0.5, "metadata": {} } } ``` -------------------------------- ### Example Response for Get All Jobs Source: https://docs.qbraid.com/v2/api-reference/rest/get-quantum-jobs-list This JSON object represents a successful response (200 OK) when retrieving a list of quantum jobs. It includes job details, status, timestamps, cost information, and pagination metadata. ```json { "success": true, "data": [ { "name": "Bell state job", "shots": 1000, "deviceQrn": "qbraid:qbraid:sim:qir-sv", "tags": { "experiment": "bell-state" }, "runtimeOptions": {}, "jobQrn": "qbraid:job:abc123xyz", "batchJobQrn": null, "vendor": "qbraid", "provider": "qbraid", "status": "COMPLETED", "statusMsg": null, "experimentType": "gate_model", "queuePosition": null, "timeStamps": { "createdAt": "2025-01-15T10:30:00Z", "endedAt": "2025-01-15T10:30:05Z", "executionDuration": 5000 }, "cost": 0.501875, "estimatedCost": 0.5, "metadata": {} } ], "pagination": { "page": 1, "limit": 50, "total": 1, "totalPages": 1, "hasNext": false, "hasPrev": false }, "meta": { "timestamp": "2025-01-15T10:30:06.000Z" } } ``` -------------------------------- ### Install PyQASM Source: https://docs.qbraid.com/v2/pyqasm/user-guide/overview Install the PyQASM package using pip. This command installs the core package. ```shell pip install pyqasm ``` -------------------------------- ### Example QuantumDevice Implementation Source: https://docs.qbraid.com/v2/sdk/user-guide/runtime/new-provider This snippet illustrates a basic QuantumDevice implementation. It defines how to initialize the device, check its status, transform input, and submit quantum jobs using a provided session. ```python from qbraid.runtime import DeviceStatus, QuantumDevice class MyDevice(QuantumDevice): def __init__(self, profile: TargetProfile, session: MySession): super.__init__(profile=profile) self.session = session def status(self) -> DeviceStatus: data = self.session.get_device(self.id) status = data.get("status") if status == "online": return DeviceStatus.ONLINE return DeviceStatus.OFFLINE def transform(self, run_input: Mock) -> str: program_ir = str(run_input) return program_ir def submit(self, run_input: str, shots=1000) -> MyJob: job_data = {"target": self.id, "inpput": run_input, "shots": shots} job_data = self.session.create_job(job_data) job_id = job_data["job_id"] return MyJob(job_id, session=self.session, device=self, shots=shots) ``` -------------------------------- ### Install PyQASM CLI Source: https://docs.qbraid.com/v2/pyqasm/user-guide/cli Install the PyQASM CLI tool as an extra dependency. This command is used to add the CLI functionality to your PyQASM installation. ```shell pip install 'pyqasm[cli]' ``` -------------------------------- ### Get General Help Source: https://docs.qbraid.com/v2/cli/user-guide/overview Display general help information for the qBraid CLI, listing all available commands and global options. ```bash $ qbraid --help ``` -------------------------------- ### Install agent lifecycle hooks Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_agents Installs hooks for AI coding tools to manage agent lifecycles. You can specify a particular tool to install hooks for. ```console $ qbraid agents hooks install [OPTIONS] ``` -------------------------------- ### Run Circuit with IonQ Native Gates Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/ionq This example demonstrates how to initialize the IonQ provider, select a simulator device, define a quantum circuit using IonQ's native gates (gpi, gpi2, ms), and run the circuit with a specified number of shots. ```python from qbraid.runtime import IonQProvider provider = IonQProvider(api_key="YOUR_API_KEY") device = provider.get_device("simulator") qasm = """ OPENQASM 3.0; qubit[3] q; gpi(0.5) q[0]; gpi2(0) q[1]; ms(0,0.5) q[1], q[2]; """ job = device.run(qasm, shots=1000) ``` -------------------------------- ### Install Package in Notebook Source: https://docs.qbraid.com/v2/lab/user-guide/notebooks Use the `%pip` magic command to install packages directly within a Jupyter notebook cell. This ensures packages are installed in the correct environment for the active kernel. Remember to restart the kernel after installation for changes to take effect. ```python %pip install ``` -------------------------------- ### qbraid pip install Command Usage Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_pip This command is used to install packages using pip within the qBraid environment. It accepts open-ended arguments and options for the pip install action. ```console $ qbraid pip install [OPTIONS] ``` -------------------------------- ### Launch GPU Instance with qBraid CLI Source: https://docs.qbraid.com/v2/home/pricing Use the qBraid CLI to provision a GPU instance. The 'Slug' identifies the specific GPU profile. ```console $ qbraid compute up gpu-h100-sxm ``` -------------------------------- ### Check if a skill is installed Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_skills Verifies if a specific skill is installed on your system and indicates its location. ```console $ qbraid skills check "quantum-circuit-simulator" ``` -------------------------------- ### Install a skill for AI coding tools Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_skills Installs a specified skill, making it available to your AI coding tools. By default, it installs to Claude Code. Use the --target option to specify other tools or 'all'. ```console $ qbraid skills install "quantum-circuit-simulator" ``` ```console $ qbraid skills install "data-analysis-toolkit" --target all ``` -------------------------------- ### Install qbraid-qir Source: https://docs.qbraid.com/v2/qir Install the qbraid-qir package using pip. Requires Python 3.10 or greater. ```bash pip install qbraid-qir ``` -------------------------------- ### Initialize RigettiProvider Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/rigetti Instantiate the RigettiProvider for interacting with Rigetti quantum systems. ```python from qbraid.runtime.rigetti import RigettiProvider provider = RigettiProvider() ``` -------------------------------- ### Install PyQASM Source: https://docs.qbraid.com/v2/pyqasm Install the PyQASM library using pip. Requires Python 3.10 or greater. ```bash pip install pyqasm ``` -------------------------------- ### Install qbraid-qir with Cirq support Source: https://docs.qbraid.com/v2/qir/user-guide/overview Install qbraid-qir with the 'cirq' extra dependency for Cirq to QIR conversions. ```shell pip install 'qbraid-qir[cirq]' ``` -------------------------------- ### Verify Forest SDK Installation Source: https://docs.qbraid.com/v2/sdk/user-guide/providers/rigetti Check if the Forest SDK, specifically the quilc compiler, is installed and accessible. ```bash quilc --version ``` -------------------------------- ### qbraid compute server start Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_compute Starts a compute server using the specified profile slug. Options include specifying a cluster, waiting for readiness, setting a timeout, and configuring SSH. ```APIDOC ## qbraid compute server start ### Description Starts a server using the specified profile slug. Options allow for cluster selection, waiting for the server to be ready, setting a timeout, and configuring SSH access. ### Usage ```console $ qbraid compute server start [OPTIONS] PROFILE_SLUG ``` ### Arguments * `PROFILE_SLUG`: Profile slug to start (required) ### Options * `-c, --cluster TEXT`: Cluster ID * `-w, --wait`: Wait for server to be ready * `-t, --timeout INTEGER`: Wait timeout in seconds (default: 120) * `--ssh`: Configure SSH after start * `--help`: Show this message and exit. ``` -------------------------------- ### Install Qiskit Extra Source: https://docs.qbraid.com/v2/qir/user-guide/qiskit-qir Install the qiskit extra for qbraid-qir. Requires Qiskit version 2.0 or higher. ```shell pip install 'qbraid-qir[qiskit]' ``` -------------------------------- ### Example TargetProfile Implementation Source: https://docs.qbraid.com/v2/sdk/user-guide/runtime/new-provider This snippet shows how to instantiate a TargetProfile, which encapsulates configuration settings for a quantum device. It includes device details, experiment type, and basis gates. ```python from unittest.mock import Mock from qbraid.programs import ProgramSpec, ExperimentType from qbraid.runtime import DeviceType, TargetProfile profile = TargetProfile( device_id="abc123", num_qubits=7, device_type=DeviceType.QPU, experiment_type=ExperimentType.GATE_MODEL, program_spec=ProgramSpec(Mock, alias="mock"), basis_gates=["h", "x", "z", "cx", "s", "t"], provider_name="myprovider", ) ``` -------------------------------- ### Install PyQASM with CLI support Source: https://docs.qbraid.com/v2/pyqasm Install PyQASM with the 'cli' extra dependency for command-line tool usage. ```bash pip install 'pyqasm[cli]' ``` -------------------------------- ### List Installed qBraid Environments Source: https://docs.qbraid.com/v2/cli/api-reference/qbraid_envs Displays a list of all qBraid environments currently installed on your local machine. ```console $ qbraid envs list [OPTIONS] ```