Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSparseTerm & exit codes #42

Merged
merged 6 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
cmake_minimum_required (VERSION 3.27)
project (Qiskit)

# We are using CMake to build our C API test suite, and we leverage ctest to run
# those tests.
enable_testing ()

# The C API is provided by the qiskit_c_ext Rust crate. Its header gets
# generated by cbindgen (see `make c-header`). It is important that this done as
# The C API is provided by the qiskit_cext Rust crate. Its header gets
# generated by cbindgen (see `make cheader`). It is important that this done as
# a Release-build for cbindgen to work properly.
find_library (qiskit qiskit_c_ext PATHS target/release REQUIRED)
find_library (qiskit qiskit_cext PATHS target/release REQUIRED)

# The remaining CMake configuration is done inside of the C API test suite.
add_subdirectory (test/c)
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ qiskit-accelerate = { path = "crates/accelerate" }
qiskit-circuit = { path = "crates/circuit" }
qiskit-qasm2 = { path = "crates/qasm2" }
qiskit-qasm3 = { path = "crates/qasm3" }
qiskit-c-ext = { path = "crates/c_ext" }
qiskit-cext = { path = "crates/cext" }

[profile.release]
lto = 'fat'
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ cformat:
sh tools/run_clang_format.sh

# Build C API crate and header
cbuild:
cheader:
cargo build --release --no-default-features --features cbinding
cbindgen --crate qiskit-c-ext --output qiskit.h --lang C
cbindgen --crate qiskit-cext --output qiskit.h --lang C

# Use ctest to run C API tests
ctest: cbuild
Expand Down
1 change: 0 additions & 1 deletion crates/accelerate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub mod isometry;
pub mod nlayout;
pub mod optimize_1q_gates;
pub mod pauli_exp_val;
pub mod py_sparse_observable;
pub mod remove_diagonal_gates_before_measure;
pub mod remove_identity_equiv;
pub mod results;
Expand Down
Loading