Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
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:

<https://quantum.cloud.ibm.com/docs/>


## Installation

We encourage installing Qiskit via ``pip``:
### Python

For running Qiskit on Python we recommend installing Qiskit via ``pip``:

```bash
pip install qiskit
Expand All @@ -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.

Comment on lines 29 to +56

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is your intention to change this once we've sorted out the distribution story for C? It's a bit weird having such a large asymmetry.

Even within that: perhaps we should just link to the canonical "build from source" instructions for C in the contributing guide, rather than duplicating them (and the requirements) on the main landing page.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wanted to make sure we had some instructions for the time being. But once we have a better distribution story that would replace this and we can just link to the build from source instruction.

## 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.
Expand Down
Loading