• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / Qiskit.jl / 27889285033

21 Jun 2026 01:08AM UTC coverage: 74.757% (-1.6%) from 76.4%
27889285033

push

github

web-flow
Bump Qiskit_jll from `~2.2.3` to `~2.4.1` (#54)

* Bump Qiskit_jll from ~2.2.3 to ~2.4.1

* Regenerate LibQiskit.jl for Qiskit_jll ~2.4.1

3 of 15 new or added lines in 2 files covered. (20.0%)

385 of 515 relevant lines covered (74.76%)

271.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.89
/src/c_exit_code.jl
1
# This code is part of Qiskit.
2
#
3
# (C) Copyright IBM 2025.
4
#
5
# This code is licensed under the Apache License, Version 2.0. You may
6
# obtain a copy of this license in the LICENSE.txt file in the root directory
7
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8
#
9
# Any modifications or derivative works of this code must retain this
10
# copyright notice, and modified files need to carry a notice indicating
11
# that they have been altered from the originals.
12

13
import .LibQiskit: QkExitCode
14

15
function check_exit_code(code::QkExitCode, error_string::Ptr{Cchar} = Ptr{Cchar}(C_NULL))::Nothing
514✔
16
    if error_string != C_NULL
684✔
17
        #println(unsafe_string(pointer(error_string)))
18
    end
19
    if code == QkExitCode_Success
344✔
20
        return
340✔
21
    elseif code == QkExitCode_CInputError
4✔
22
        throw(ErrorException("Error related to C data input."))
×
23
    elseif code == QkExitCode_NullPointerError
4✔
24
        throw(ErrorException("Unexpected null pointer."))
×
25
    elseif code == QkExitCode_AlignmentError
4✔
26
        throw(ErrorException("Pointer is not aligned to expected data."))
×
27
    elseif code == QkExitCode_IndexError
4✔
28
        throw(ErrorException("Index out of bounds."))
×
29
    elseif code == QkExitCode_DuplicateIndexError
4✔
30
        throw(ErrorException("Duplicate index."))
×
31
    elseif code == QkExitCode_ArithmeticError
4✔
32
        throw(ErrorException("Error related to arithmetic operations or similar."))
×
33
    elseif code == QkExitCode_MismatchedQubits
4✔
34
        throw(ErrorException("Mismatching number of qubits."))
×
35
    elseif code == QkExitCode_ExpectedUnitary
4✔
36
        throw(ErrorException("Matrix is not unitary."))
4✔
37
    elseif code == QkExitCode_TargetError
×
38
        throw(ErrorException("Target related error"))
×
39
    elseif code == QkExitCode_TargetInstAlreadyExists
×
40
        throw(ErrorException("Instruction already exists in the Target"))
×
41
    elseif code == QkExitCode_TargetQargMismatch
×
42
        throw(ErrorException("Properties with incorrect qargs was added"))
×
43
    elseif code == QkExitCode_TargetInvalidQargsKey
×
44
        throw(ErrorException("Trying to query into the target with non-existent qargs."))
×
45
    elseif code == QkExitCode_TargetInvalidInstKey
×
46
        throw(ErrorException("Querying an operation that doesn't exist in the Target."))
×
47
    elseif code == QkExitCode_TranspilerError
×
48
        throw(ErrorException("Transpilation failed."))
×
NEW
49
    elseif code == QkExitCode_InvalidOperationKind
×
NEW
50
        throw(ErrorException("Invalid operation kind."))
×
NEW
51
    elseif code == QkExitCode_DagError
×
NEW
52
        throw(ErrorException("DAG operation error."))
×
NEW
53
    elseif code == QkExitCode_DagComposeMismatch
×
NEW
54
        throw(ErrorException("DAGs have mismatching qubit/clbit amounts during compose."))
×
NEW
55
    elseif code == QkExitCode_DagComposeMissingBit
×
NEW
56
        throw(ErrorException("One or more bit indices were not found during compose."))
×
NEW
57
    elseif code == QkExitCode_ParameterError
×
NEW
58
        throw(ErrorException("Error concerning parameter handling."))
×
NEW
59
    elseif code == QkExitCode_ParameterNameConflict
×
NEW
60
        throw(ErrorException("Parameter name conflict."))
×
61
    else
62
        throw(ErrorException("Unrecognized error code from Qiskit: $code"))
×
63
    end
64
end
65

66
export QkExitCode
67

68
# Export enum instances
69
for e in (QkExitCode,)
70
    for s in instances(e)
71
        @eval import .LibQiskit: $(Symbol(s))
72
        @eval export $(Symbol(s))
73
    end
74
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc