diff --git a/README.md b/README.md index b304a910a2b8..137b38400ee1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ This library is the core component of Qiskit, which contains the building blocks for creating and working with quantum circuits, quantum operators, and primitive functions (Sampler and Estimator). It also contains a transpiler that supports optimizing quantum circuits, and a quantum information toolbox for creating advanced operators. +Qiskit provides two public APIs: a Python API and a C API. The Python API is the primary interface and prior to Qiskit 2.0 was the only public API available +for Qiskit. The C API is designed to provide direct access to Qiskit's internal data model (which is written in Rust). The C API can be consumed as either a +shared library (`libqiskit.so`) for standalone use, or from its embedding in the `qiskit` Python package [for writing Python extension modules](https://quantum.cloud.ibm.com/docs/guides/c-extension-for-python). + For more details on how to use Qiskit, refer to the documentation located here: @@ -22,7 +26,9 @@ For more details on how to use Qiskit, refer to the documentation located here: ## Installation -We encourage installing Qiskit via ``pip``: +### Python + +For running Qiskit on Python we recommend installing Qiskit via ``pip``: ```bash pip install qiskit @@ -32,9 +38,26 @@ Pip will handle all dependencies automatically and you will always install the l To install from source, follow the instructions in the [documentation](https://quantum.cloud.ibm.com/docs/guides/install-qiskit-source). +### Standalone C library + +To install Qiskit as a standalone C library the only option is currently to build Qiskit from source. This requires having the +[Rust](https://rust-lang.org/) compiler installed. To simplify building having [GNU Make](https://www.gnu.org/software/make/) installed +is recommended. With these requirements installed you can run: + +```bash +make c +``` + +Which will compile the C library and put the `dist/c` directory in the root of the repository which will contain the shared library and C headers for +library. + +You can refer to the [documentation](https://quantum.cloud.ibm.com/docs/guides/install-c-api) on installing the C API for more details and how to +use the built library. + ## Create your first quantum program in Qiskit -Now that Qiskit is installed, it's time to begin working with Qiskit. The essential parts of a quantum program are: +Now that Qiskit is installed, it's time to begin working with Qiskit. We will use the Python interface to demonstrate creating a quantum program. +The essential parts of a quantum program are: 1. Define and build a quantum circuit that represents the quantum state 2. Define the classical output by measurements or a set of observable operators 3. Depending on the output, use the Sampler primitive to sample outcomes or the Estimator primitive to estimate expectation values.