Skip to content

Qiskit C++ is an opensource interface to quantum centric supercomputing, compatible interface to Qiskit in C++

License

Notifications You must be signed in to change notification settings

ssghost/qiskit-cpp

 
 

Repository files navigation

Qiskit C++

Qiskit C++ provides a modern C++ (version C++ 11 or later) interface of Qiskit for circuit building, (transpilation and returning samples of quantum circuit outputs ... to be added in the future release), as same as Qiskit Python interfaces. This interface is based on Qiskit C-API introduced in Qiskit 2.1.

Supported OS

  • Linux

    • AlmaLinux 9
    • Amazon Linux 2023
    • RedHat Enterprise Linux 8
    • RedHat Enterprise Linux 9
    • SuSE 15
    • Ubuntu 22.04
    • Ubuntu 24.04
  • macOS

    • Sequoia 15.1 or above
  • Windows

Jump To:

Getting Started

Preparing Qiskit and Qiskit C extension

Before building Qiskit C++, install Qiskit 2.1 or later and build Qiskit C extension library https://github.com/Qiskit/qiskit/tree/main/crates/cext

$ git clone git@github.com:Qiskit/qiskit.git $ cd qiskit $ make c 

Building Qiskit C++

Qiskit C++ only has C++ header files. There is nothing to do to build the SDK.

Running examples

Examples are available in this directory.

Building examples

To build application using Qiskit C++, add path to Qiskit C-API, include path to qiskit.h (installed in dist/c/include) and library libqiskit.so (installed in dist/c/lib) or qiskit_cext.dll.lib (generated in target/release) for Windows. See ./CMakeLists.txt for example to make test program.

$ mkdir build $ cd build $ cmake -DPath_to_qiskit .. $ make 

Contributing

Regardless if you are part of the core team or an external contributor, welcome and thank you for contributing to Qiskit C++

Solving linting/format issues

Contributor must execute the commands below and fix any issues before submitting Pull Request.

Running unit test

Contributor must execute the command below and fix any issues before submitting Pull Request.

Checking API document

Contributor can generate API document from source.

$ doxygen Doxyfile 

API document will be created under html directory.

License

Apache License 2.0

About

Qiskit C++ is an opensource interface to quantum centric supercomputing, compatible interface to Qiskit in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.7%
  • CMake 1.3%