mqt-core 3.3.2__cp314-cp314t-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mqt/core/__init__.py +89 -0
- mqt/core/__main__.py +55 -0
- mqt/core/_commands.py +52 -0
- mqt/core/_compat/__init__.py +11 -0
- mqt/core/_compat/typing.py +29 -0
- mqt/core/_version.py +34 -0
- mqt/core/_version.pyi +12 -0
- mqt/core/bin/mqt-core-algorithms.dll +0 -0
- mqt/core/bin/mqt-core-circuit-optimizer.dll +0 -0
- mqt/core/bin/mqt-core-dd.dll +0 -0
- mqt/core/bin/mqt-core-ds.dll +0 -0
- mqt/core/bin/mqt-core-fomac.dll +0 -0
- mqt/core/bin/mqt-core-ir.dll +0 -0
- mqt/core/bin/mqt-core-na-fomac.dll +0 -0
- mqt/core/bin/mqt-core-na.dll +0 -0
- mqt/core/bin/mqt-core-qasm.dll +0 -0
- mqt/core/bin/mqt-core-qdmi-driver.dll +0 -0
- mqt/core/bin/mqt-core-qdmi-na-device.dll +0 -0
- mqt/core/bin/mqt-core-zx.dll +0 -0
- mqt/core/dd.cp314t-win_amd64.pyd +0 -0
- mqt/core/dd.pyi +1016 -0
- mqt/core/dd_evaluation.py +368 -0
- mqt/core/fomac.cp314t-win_amd64.pyd +0 -0
- mqt/core/fomac.pyi +125 -0
- mqt/core/include/mqt-core/algorithms/BernsteinVazirani.hpp +39 -0
- mqt/core/include/mqt-core/algorithms/GHZState.hpp +18 -0
- mqt/core/include/mqt-core/algorithms/Grover.hpp +33 -0
- mqt/core/include/mqt-core/algorithms/QFT.hpp +21 -0
- mqt/core/include/mqt-core/algorithms/QPE.hpp +30 -0
- mqt/core/include/mqt-core/algorithms/RandomCliffordCircuit.hpp +22 -0
- mqt/core/include/mqt-core/algorithms/StatePreparation.hpp +43 -0
- mqt/core/include/mqt-core/algorithms/WState.hpp +18 -0
- mqt/core/include/mqt-core/algorithms/mqt_core_algorithms_export.h +43 -0
- mqt/core/include/mqt-core/boost/config/abi/borland_prefix.hpp +27 -0
- mqt/core/include/mqt-core/boost/config/abi/borland_suffix.hpp +12 -0
- mqt/core/include/mqt-core/boost/config/abi/msvc_prefix.hpp +22 -0
- mqt/core/include/mqt-core/boost/config/abi/msvc_suffix.hpp +8 -0
- mqt/core/include/mqt-core/boost/config/abi_prefix.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/abi_suffix.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx03.hpp +211 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx11.hpp +212 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx14.hpp +47 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx17.hpp +65 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx20.hpp +59 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx23.hpp +41 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx98.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/auto_link.hpp +525 -0
- mqt/core/include/mqt-core/boost/config/compiler/borland.hpp +342 -0
- mqt/core/include/mqt-core/boost/config/compiler/clang.hpp +370 -0
- mqt/core/include/mqt-core/boost/config/compiler/clang_version.hpp +89 -0
- mqt/core/include/mqt-core/boost/config/compiler/codegear.hpp +389 -0
- mqt/core/include/mqt-core/boost/config/compiler/comeau.hpp +59 -0
- mqt/core/include/mqt-core/boost/config/compiler/common_edg.hpp +185 -0
- mqt/core/include/mqt-core/boost/config/compiler/compaq_cxx.hpp +19 -0
- mqt/core/include/mqt-core/boost/config/compiler/cray.hpp +446 -0
- mqt/core/include/mqt-core/boost/config/compiler/diab.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/compiler/digitalmars.hpp +146 -0
- mqt/core/include/mqt-core/boost/config/compiler/gcc.hpp +386 -0
- mqt/core/include/mqt-core/boost/config/compiler/gcc_xml.hpp +115 -0
- mqt/core/include/mqt-core/boost/config/compiler/greenhills.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/compiler/hp_acc.hpp +153 -0
- mqt/core/include/mqt-core/boost/config/compiler/intel.hpp +577 -0
- mqt/core/include/mqt-core/boost/config/compiler/kai.hpp +33 -0
- mqt/core/include/mqt-core/boost/config/compiler/metrowerks.hpp +201 -0
- mqt/core/include/mqt-core/boost/config/compiler/mpw.hpp +143 -0
- mqt/core/include/mqt-core/boost/config/compiler/nvcc.hpp +64 -0
- mqt/core/include/mqt-core/boost/config/compiler/pathscale.hpp +141 -0
- mqt/core/include/mqt-core/boost/config/compiler/pgi.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/compiler/sgi_mipspro.hpp +29 -0
- mqt/core/include/mqt-core/boost/config/compiler/sunpro_cc.hpp +225 -0
- mqt/core/include/mqt-core/boost/config/compiler/vacpp.hpp +189 -0
- mqt/core/include/mqt-core/boost/config/compiler/visualc.hpp +398 -0
- mqt/core/include/mqt-core/boost/config/compiler/xlcpp.hpp +303 -0
- mqt/core/include/mqt-core/boost/config/compiler/xlcpp_zos.hpp +174 -0
- mqt/core/include/mqt-core/boost/config/detail/cxx_composite.hpp +218 -0
- mqt/core/include/mqt-core/boost/config/detail/posix_features.hpp +95 -0
- mqt/core/include/mqt-core/boost/config/detail/select_compiler_config.hpp +157 -0
- mqt/core/include/mqt-core/boost/config/detail/select_platform_config.hpp +147 -0
- mqt/core/include/mqt-core/boost/config/detail/select_stdlib_config.hpp +121 -0
- mqt/core/include/mqt-core/boost/config/detail/suffix.hpp +1334 -0
- mqt/core/include/mqt-core/boost/config/header_deprecated.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/helper_macros.hpp +37 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/cmath.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/complex.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/functional.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/memory.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/utility.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/platform/aix.hpp +33 -0
- mqt/core/include/mqt-core/boost/config/platform/amigaos.hpp +15 -0
- mqt/core/include/mqt-core/boost/config/platform/beos.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/platform/bsd.hpp +83 -0
- mqt/core/include/mqt-core/boost/config/platform/cloudabi.hpp +18 -0
- mqt/core/include/mqt-core/boost/config/platform/cray.hpp +18 -0
- mqt/core/include/mqt-core/boost/config/platform/cygwin.hpp +71 -0
- mqt/core/include/mqt-core/boost/config/platform/haiku.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/hpux.hpp +87 -0
- mqt/core/include/mqt-core/boost/config/platform/irix.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/linux.hpp +106 -0
- mqt/core/include/mqt-core/boost/config/platform/macos.hpp +87 -0
- mqt/core/include/mqt-core/boost/config/platform/qnxnto.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/solaris.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/symbian.hpp +97 -0
- mqt/core/include/mqt-core/boost/config/platform/vms.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/platform/vxworks.hpp +422 -0
- mqt/core/include/mqt-core/boost/config/platform/wasm.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/platform/win32.hpp +90 -0
- mqt/core/include/mqt-core/boost/config/platform/zos.hpp +32 -0
- mqt/core/include/mqt-core/boost/config/pragma_message.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/requires_threads.hpp +92 -0
- mqt/core/include/mqt-core/boost/config/stdlib/dinkumware.hpp +324 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libcomo.hpp +93 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libcpp.hpp +180 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libstdcpp3.hpp +482 -0
- mqt/core/include/mqt-core/boost/config/stdlib/modena.hpp +79 -0
- mqt/core/include/mqt-core/boost/config/stdlib/msl.hpp +98 -0
- mqt/core/include/mqt-core/boost/config/stdlib/roguewave.hpp +208 -0
- mqt/core/include/mqt-core/boost/config/stdlib/sgi.hpp +168 -0
- mqt/core/include/mqt-core/boost/config/stdlib/stlport.hpp +258 -0
- mqt/core/include/mqt-core/boost/config/stdlib/vacpp.hpp +74 -0
- mqt/core/include/mqt-core/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- mqt/core/include/mqt-core/boost/config/user.hpp +133 -0
- mqt/core/include/mqt-core/boost/config/warning_disable.hpp +47 -0
- mqt/core/include/mqt-core/boost/config/workaround.hpp +305 -0
- mqt/core/include/mqt-core/boost/config.hpp +67 -0
- mqt/core/include/mqt-core/boost/cstdint.hpp +556 -0
- mqt/core/include/mqt-core/boost/cxx11_char_types.hpp +70 -0
- mqt/core/include/mqt-core/boost/detail/workaround.hpp +10 -0
- mqt/core/include/mqt-core/boost/limits.hpp +146 -0
- mqt/core/include/mqt-core/boost/multiprecision/complex128.hpp +24 -0
- mqt/core/include/mqt-core/boost/multiprecision/complex_adaptor.hpp +1046 -0
- mqt/core/include/mqt-core/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/io.hpp +698 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float.hpp +2297 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_complex.hpp +12 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_dec_float.hpp +3690 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add.hpp +368 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/bitwise.hpp +889 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/checked.hpp +178 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/comparison.hpp +374 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/divide.hpp +703 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/import_export.hpp +248 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/limits.hpp +282 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/literals.hpp +295 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/misc.hpp +1457 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/multiply.hpp +848 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/serialize.hpp +211 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int.hpp +2360 -0
- mqt/core/include/mqt-core/boost/multiprecision/debug_adaptor.hpp +760 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/assert.hpp +29 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/atomic.hpp +62 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/bitscan.hpp +317 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/constexpr.hpp +88 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/default_ops.hpp +4052 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/digits.hpp +49 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/dynamic_array.hpp +44 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/empty_value.hpp +87 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/endian.hpp +35 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/et_ops.hpp +1831 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/float128_functions.hpp +95 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/fpclassify.hpp +101 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/constants.hpp +288 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/pow.hpp +905 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trig.hpp +1058 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trunc.hpp +82 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/hash.hpp +56 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/integer_ops.hpp +474 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/itos.hpp +39 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/min_max.hpp +106 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/no_et_ops.hpp +661 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/number_base.hpp +1656 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/number_compare.hpp +848 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/precision.hpp +313 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/rebind.hpp +19 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/standalone_config.hpp +148 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/static_array.hpp +42 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/string_helpers.hpp +48 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/tables.hpp +80 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/ublas_interop.hpp +75 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/utype_helper.hpp +374 -0
- mqt/core/include/mqt-core/boost/multiprecision/eigen.hpp +248 -0
- mqt/core/include/mqt-core/boost/multiprecision/float128.hpp +920 -0
- mqt/core/include/mqt-core/boost/multiprecision/fwd.hpp +268 -0
- mqt/core/include/mqt-core/boost/multiprecision/gmp.hpp +4060 -0
- mqt/core/include/mqt-core/boost/multiprecision/integer.hpp +363 -0
- mqt/core/include/mqt-core/boost/multiprecision/logged_adaptor.hpp +834 -0
- mqt/core/include/mqt-core/boost/multiprecision/miller_rabin.hpp +221 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpc.hpp +1721 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpfi.hpp +2559 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpfr.hpp +3644 -0
- mqt/core/include/mqt-core/boost/multiprecision/number.hpp +2500 -0
- mqt/core/include/mqt-core/boost/multiprecision/random.hpp +23 -0
- mqt/core/include/mqt-core/boost/multiprecision/rational_adaptor.hpp +1289 -0
- mqt/core/include/mqt-core/boost/multiprecision/tommath.hpp +1034 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_backend.hpp +91 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_byte_container.hpp +51 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_complex.hpp +22 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/max_digits10.hpp +79 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/std_integer_traits.hpp +90 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
- mqt/core/include/mqt-core/boost/version.hpp +32 -0
- mqt/core/include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp +119 -0
- mqt/core/include/mqt-core/circuit_optimizer/mqt_core_circuit_optimizer_export.h +43 -0
- mqt/core/include/mqt-core/datastructures/DirectedAcyclicGraph.hpp +117 -0
- mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +158 -0
- mqt/core/include/mqt-core/datastructures/DisjointSet.hpp +50 -0
- mqt/core/include/mqt-core/datastructures/Layer.hpp +172 -0
- mqt/core/include/mqt-core/datastructures/SymmetricMatrix.hpp +57 -0
- mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +227 -0
- mqt/core/include/mqt-core/datastructures/mqt_core_ds_export.h +43 -0
- mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
- mqt/core/include/mqt-core/dd/CachedEdge.hpp +174 -0
- mqt/core/include/mqt-core/dd/Complex.hpp +165 -0
- mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +150 -0
- mqt/core/include/mqt-core/dd/ComplexValue.hpp +184 -0
- mqt/core/include/mqt-core/dd/ComputeTable.hpp +183 -0
- mqt/core/include/mqt-core/dd/DDDefinitions.hpp +139 -0
- mqt/core/include/mqt-core/dd/DDpackageConfig.hpp +104 -0
- mqt/core/include/mqt-core/dd/DensityNoiseTable.hpp +114 -0
- mqt/core/include/mqt-core/dd/Edge.hpp +416 -0
- mqt/core/include/mqt-core/dd/Export.hpp +438 -0
- mqt/core/include/mqt-core/dd/FunctionalityConstruction.hpp +75 -0
- mqt/core/include/mqt-core/dd/GateMatrixDefinitions.hpp +43 -0
- mqt/core/include/mqt-core/dd/LinkedListBase.hpp +45 -0
- mqt/core/include/mqt-core/dd/MemoryManager.hpp +193 -0
- mqt/core/include/mqt-core/dd/Node.hpp +223 -0
- mqt/core/include/mqt-core/dd/NoiseFunctionality.hpp +144 -0
- mqt/core/include/mqt-core/dd/Operations.hpp +306 -0
- mqt/core/include/mqt-core/dd/Package.hpp +2036 -0
- mqt/core/include/mqt-core/dd/Package_fwd.hpp +22 -0
- mqt/core/include/mqt-core/dd/RealNumber.hpp +255 -0
- mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +217 -0
- mqt/core/include/mqt-core/dd/Simulation.hpp +98 -0
- mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
- mqt/core/include/mqt-core/dd/StochasticNoiseOperationTable.hpp +88 -0
- mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +121 -0
- mqt/core/include/mqt-core/dd/UniqueTable.hpp +243 -0
- mqt/core/include/mqt-core/dd/mqt_core_dd_export.h +43 -0
- mqt/core/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp +84 -0
- mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +55 -0
- mqt/core/include/mqt-core/dd/statistics/Statistics.hpp +48 -0
- mqt/core/include/mqt-core/dd/statistics/TableStatistics.hpp +79 -0
- mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +31 -0
- mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
- mqt/core/include/mqt-core/ir/Definitions.hpp +108 -0
- mqt/core/include/mqt-core/ir/Permutation.hpp +213 -0
- mqt/core/include/mqt-core/ir/QuantumComputation.hpp +596 -0
- mqt/core/include/mqt-core/ir/Register.hpp +125 -0
- mqt/core/include/mqt-core/ir/mqt_core_ir_export.h +43 -0
- mqt/core/include/mqt-core/ir/operations/AodOperation.hpp +92 -0
- mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +212 -0
- mqt/core/include/mqt-core/ir/operations/Control.hpp +142 -0
- mqt/core/include/mqt-core/ir/operations/Expression.hpp +847 -0
- mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
- mqt/core/include/mqt-core/ir/operations/NonUnitaryOperation.hpp +118 -0
- mqt/core/include/mqt-core/ir/operations/OpType.hpp +120 -0
- mqt/core/include/mqt-core/ir/operations/OpType.inc +76 -0
- mqt/core/include/mqt-core/ir/operations/Operation.hpp +247 -0
- mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +140 -0
- mqt/core/include/mqt-core/ir/operations/SymbolicOperation.hpp +144 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
- mqt/core/include/mqt-core/na/NAComputation.hpp +185 -0
- mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
- mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
- mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
- mqt/core/include/mqt-core/na/entities/Atom.hpp +62 -0
- mqt/core/include/mqt-core/na/entities/Location.hpp +154 -0
- mqt/core/include/mqt-core/na/entities/Zone.hpp +95 -0
- mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
- mqt/core/include/mqt-core/na/mqt_core_na_export.h +43 -0
- mqt/core/include/mqt-core/na/operations/GlobalCZOp.hpp +38 -0
- mqt/core/include/mqt-core/na/operations/GlobalOp.hpp +58 -0
- mqt/core/include/mqt-core/na/operations/GlobalRYOp.hpp +42 -0
- mqt/core/include/mqt-core/na/operations/LoadOp.hpp +89 -0
- mqt/core/include/mqt-core/na/operations/LocalOp.hpp +56 -0
- mqt/core/include/mqt-core/na/operations/LocalRZOp.hpp +42 -0
- mqt/core/include/mqt-core/na/operations/LocalUOp.hpp +49 -0
- mqt/core/include/mqt-core/na/operations/MoveOp.hpp +66 -0
- mqt/core/include/mqt-core/na/operations/Op.hpp +62 -0
- mqt/core/include/mqt-core/na/operations/ShuttlingOp.hpp +51 -0
- mqt/core/include/mqt-core/na/operations/StoreOp.hpp +87 -0
- mqt/core/include/mqt-core/qasm3/Exception.hpp +85 -0
- mqt/core/include/mqt-core/qasm3/Gate.hpp +65 -0
- mqt/core/include/mqt-core/qasm3/Importer.hpp +192 -0
- mqt/core/include/mqt-core/qasm3/InstVisitor.hpp +145 -0
- mqt/core/include/mqt-core/qasm3/NestedEnvironment.hpp +41 -0
- mqt/core/include/mqt-core/qasm3/Parser.hpp +170 -0
- mqt/core/include/mqt-core/qasm3/Scanner.hpp +73 -0
- mqt/core/include/mqt-core/qasm3/Statement.hpp +486 -0
- mqt/core/include/mqt-core/qasm3/Statement_fwd.hpp +39 -0
- mqt/core/include/mqt-core/qasm3/StdGates.hpp +232 -0
- mqt/core/include/mqt-core/qasm3/Token.hpp +198 -0
- mqt/core/include/mqt-core/qasm3/Types.hpp +238 -0
- mqt/core/include/mqt-core/qasm3/Types_fwd.hpp +22 -0
- mqt/core/include/mqt-core/qasm3/mqt_core_qasm_export.h +43 -0
- mqt/core/include/mqt-core/qasm3/passes/CompilerPass.hpp +22 -0
- mqt/core/include/mqt-core/qasm3/passes/ConstEvalPass.hpp +102 -0
- mqt/core/include/mqt-core/qasm3/passes/TypeCheckPass.hpp +124 -0
- mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
- mqt/core/include/mqt-core/zx/FunctionalityConstruction.hpp +125 -0
- mqt/core/include/mqt-core/zx/Rational.hpp +318 -0
- mqt/core/include/mqt-core/zx/Rules.hpp +132 -0
- mqt/core/include/mqt-core/zx/Simplify.hpp +182 -0
- mqt/core/include/mqt-core/zx/Utils.hpp +212 -0
- mqt/core/include/mqt-core/zx/ZXDefinitions.hpp +93 -0
- mqt/core/include/mqt-core/zx/ZXDiagram.hpp +480 -0
- mqt/core/include/mqt-core/zx/mqt_core_zx_export.h +43 -0
- mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
- mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
- mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
- mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
- mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
- mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
- mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
- mqt/core/include/nlohmann/detail/hash.hpp +129 -0
- mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
- mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
- mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
- mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
- mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
- mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
- mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
- mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
- mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
- mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
- mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
- mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
- mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
- mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
- mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
- mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
- mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
- mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
- mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
- mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
- mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
- mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
- mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
- mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
- mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
- mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
- mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
- mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
- mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
- mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
- mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
- mqt/core/include/nlohmann/json.hpp +5306 -0
- mqt/core/include/nlohmann/json_fwd.hpp +75 -0
- mqt/core/include/nlohmann/ordered_map.hpp +359 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
- mqt/core/include/qdmi/qdmi/client.h +990 -0
- mqt/core/include/qdmi/qdmi/constants.h +1139 -0
- mqt/core/include/qdmi/qdmi/device.h +602 -0
- mqt/core/include/qdmi/qdmi/types.h +78 -0
- mqt/core/include/spdlog/async.h +99 -0
- mqt/core/include/spdlog/async_logger-inl.h +84 -0
- mqt/core/include/spdlog/async_logger.h +74 -0
- mqt/core/include/spdlog/cfg/argv.h +40 -0
- mqt/core/include/spdlog/cfg/env.h +36 -0
- mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
- mqt/core/include/spdlog/cfg/helpers.h +29 -0
- mqt/core/include/spdlog/common-inl.h +68 -0
- mqt/core/include/spdlog/common.h +406 -0
- mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
- mqt/core/include/spdlog/details/backtracer.h +45 -0
- mqt/core/include/spdlog/details/circular_q.h +115 -0
- mqt/core/include/spdlog/details/console_globals.h +28 -0
- mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
- mqt/core/include/spdlog/details/file_helper.h +61 -0
- mqt/core/include/spdlog/details/fmt_helper.h +141 -0
- mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
- mqt/core/include/spdlog/details/log_msg.h +40 -0
- mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
- mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
- mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
- mqt/core/include/spdlog/details/null_mutex.h +35 -0
- mqt/core/include/spdlog/details/os-inl.h +606 -0
- mqt/core/include/spdlog/details/os.h +127 -0
- mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
- mqt/core/include/spdlog/details/periodic_worker.h +58 -0
- mqt/core/include/spdlog/details/registry-inl.h +270 -0
- mqt/core/include/spdlog/details/registry.h +131 -0
- mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
- mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
- mqt/core/include/spdlog/details/tcp_client.h +127 -0
- mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
- mqt/core/include/spdlog/details/thread_pool.h +117 -0
- mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
- mqt/core/include/spdlog/details/udp_client.h +81 -0
- mqt/core/include/spdlog/details/windows_include.h +11 -0
- mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
- mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
- mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
- mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
- mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
- mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
- mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
- mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
- mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
- mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
- mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
- mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
- mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
- mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
- mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
- mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
- mqt/core/include/spdlog/fmt/chrono.h +23 -0
- mqt/core/include/spdlog/fmt/compile.h +23 -0
- mqt/core/include/spdlog/fmt/fmt.h +30 -0
- mqt/core/include/spdlog/fmt/ostr.h +23 -0
- mqt/core/include/spdlog/fmt/ranges.h +23 -0
- mqt/core/include/spdlog/fmt/std.h +24 -0
- mqt/core/include/spdlog/fmt/xchar.h +23 -0
- mqt/core/include/spdlog/formatter.h +17 -0
- mqt/core/include/spdlog/fwd.h +18 -0
- mqt/core/include/spdlog/logger-inl.h +198 -0
- mqt/core/include/spdlog/logger.h +379 -0
- mqt/core/include/spdlog/mdc.h +52 -0
- mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
- mqt/core/include/spdlog/pattern_formatter.h +118 -0
- mqt/core/include/spdlog/sinks/android_sink.h +137 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
- mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
- mqt/core/include/spdlog/sinks/base_sink.h +51 -0
- mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
- mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
- mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
- mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
- mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
- mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
- mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
- mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
- mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
- mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
- mqt/core/include/spdlog/sinks/null_sink.h +41 -0
- mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
- mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
- mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
- mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
- mqt/core/include/spdlog/sinks/sink.h +34 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
- mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
- mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
- mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
- mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
- mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
- mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
- mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
- mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
- mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
- mqt/core/include/spdlog/spdlog-inl.h +96 -0
- mqt/core/include/spdlog/spdlog.h +357 -0
- mqt/core/include/spdlog/stopwatch.h +66 -0
- mqt/core/include/spdlog/tweakme.h +148 -0
- mqt/core/include/spdlog/version.h +11 -0
- mqt/core/ir/__init__.pyi +2078 -0
- mqt/core/ir/operations.pyi +1011 -0
- mqt/core/ir/registers.pyi +91 -0
- mqt/core/ir/symbolic.pyi +177 -0
- mqt/core/ir.cp314t-win_amd64.pyd +0 -0
- mqt/core/lib/mqt-core-algorithms.lib +0 -0
- mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
- mqt/core/lib/mqt-core-dd.lib +0 -0
- mqt/core/lib/mqt-core-ds.lib +0 -0
- mqt/core/lib/mqt-core-fomac.lib +0 -0
- mqt/core/lib/mqt-core-ir.lib +0 -0
- mqt/core/lib/mqt-core-na-fomac.lib +0 -0
- mqt/core/lib/mqt-core-na.lib +0 -0
- mqt/core/lib/mqt-core-qasm.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-driver.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-na-device-gen.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-na-device.lib +0 -0
- mqt/core/lib/mqt-core-zx.lib +0 -0
- mqt/core/lib/pkgconfig/spdlog.pc +13 -0
- mqt/core/lib/spdlog.lib +0 -0
- mqt/core/na/__init__.py +12 -0
- mqt/core/na/fomac.cp314t-win_amd64.pyd +0 -0
- mqt/core/na/fomac.pyi +117 -0
- mqt/core/nlohmann_json.natvis +278 -0
- mqt/core/plugins/__init__.py +9 -0
- mqt/core/plugins/qiskit/__init__.py +19 -0
- mqt/core/plugins/qiskit/mqt_to_qiskit.py +420 -0
- mqt/core/plugins/qiskit/qiskit_to_mqt.py +562 -0
- mqt/core/py.typed +2 -0
- mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +55 -0
- mqt/core/share/cmake/mqt-core/Cache.cmake +33 -0
- mqt/core/share/cmake/mqt-core/FindGMP.cmake +103 -0
- mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +46 -0
- mqt/core/share/cmake/mqt-core/PreventInSourceBuilds.cmake +25 -0
- mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +87 -0
- mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +85 -0
- mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +52 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +141 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +445 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +110 -0
- mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
- mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
- mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
- mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
- mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
- mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
- mqt/core/share/cmake/spdlog/spdlogConfig.cmake +44 -0
- mqt/core/share/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
- mqt/core/share/cmake/spdlog/spdlogConfigTargets.cmake +121 -0
- mqt/core/share/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
- mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
- mqt_core-3.3.2.dist-info/DELVEWHEEL +2 -0
- mqt_core-3.3.2.dist-info/METADATA +210 -0
- mqt_core-3.3.2.dist-info/RECORD +537 -0
- mqt_core-3.3.2.dist-info/WHEEL +5 -0
- mqt_core-3.3.2.dist-info/entry_points.txt +4 -0
- mqt_core-3.3.2.dist-info/licenses/LICENSE.md +22 -0
- mqt_core.libs/msvcp140.dll +0 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
/*------------------------------------------------------------------------------
|
|
2
|
+
Copyright 2024 Munich Quantum Software Stack Project
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the
|
|
5
|
+
"License"); you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://github.com/Munich-Quantum-Software-Stack/QDMI/blob/develop/LICENSE
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
12
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
13
|
+
License for the specific language governing permissions and limitations under
|
|
14
|
+
the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
17
|
+
------------------------------------------------------------------------------*/
|
|
18
|
+
|
|
19
|
+
/** @file
|
|
20
|
+
* @brief Defines the @ref device_interface.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
#pragma once
|
|
24
|
+
|
|
25
|
+
#include "qdmi/constants.h" // IWYU pragma: export
|
|
26
|
+
#include "mqt_na_qdmi/types.h" // IWYU pragma: export
|
|
27
|
+
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
#include <cstddef>
|
|
30
|
+
|
|
31
|
+
extern "C" {
|
|
32
|
+
#else
|
|
33
|
+
#include <stddef.h>
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
// The following clang-tidy warning cannot be addressed because this header is
|
|
37
|
+
// used from both C and C++ code.
|
|
38
|
+
// NOLINTBEGIN(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
|
|
39
|
+
|
|
40
|
+
/** @defgroup device_interface QDMI Device Interface
|
|
41
|
+
* @brief Describes the functions to be implemented by a device or backend to
|
|
42
|
+
* be used with QDMI.
|
|
43
|
+
* @details This is an interface between the QDMI driver and the device.
|
|
44
|
+
* It includes functions to initialize and finalize a device, as well as to
|
|
45
|
+
* manage sessions between a QDMI driver and a device, query properties of the
|
|
46
|
+
* device, and submit jobs to the device.
|
|
47
|
+
*
|
|
48
|
+
* The device interface is split into three parts:
|
|
49
|
+
* - The @ref device_session_interface "device session interface" for managing
|
|
50
|
+
* sessions between a QDMI driver and a device.
|
|
51
|
+
* - The @ref device_query_interface "device query interface" for querying
|
|
52
|
+
* properties of the device.
|
|
53
|
+
* - The @ref device_job_interface "device job interface" for submitting jobs
|
|
54
|
+
* to the device.
|
|
55
|
+
*
|
|
56
|
+
* @{
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @brief Initialize a device.
|
|
61
|
+
* @details A device can expect that this function is called exactly once in
|
|
62
|
+
* the beginning and has returned before any other functions are invoked on that
|
|
63
|
+
* device.
|
|
64
|
+
* @return @ref QDMI_SUCCESS if the device was initialized successfully.
|
|
65
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
66
|
+
*/
|
|
67
|
+
int MQT_NA_QDMI_device_initialize(void);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @brief Finalize a device.
|
|
71
|
+
* @details A device can expect that this function is called exactly once at the
|
|
72
|
+
* end of using the device, and no other functions are invoked on that device
|
|
73
|
+
* afterward.
|
|
74
|
+
* @return @ref QDMI_SUCCESS if the device was finalized successfully.
|
|
75
|
+
* @return @ref QDMI_ERROR_FATAL if the finalization failed, this could, for
|
|
76
|
+
* example, be due to a job that is still running.
|
|
77
|
+
*/
|
|
78
|
+
int MQT_NA_QDMI_device_finalize(void);
|
|
79
|
+
|
|
80
|
+
/** @defgroup device_session_interface QDMI Device Session Interface
|
|
81
|
+
* @brief Provides functions to manage sessions between the driver and device.
|
|
82
|
+
* @details A device session is a connection between a driver and a device that
|
|
83
|
+
* allows the driver to interact with the device.
|
|
84
|
+
* Sessions are used to authenticate with the device and to manage resources
|
|
85
|
+
* required for the interaction with the device.
|
|
86
|
+
*
|
|
87
|
+
* The typical workflow for a device session is as follows:
|
|
88
|
+
* - Allocate a session with @ref MQT_NA_QDMI_device_session_alloc.
|
|
89
|
+
* - Set parameters for the session with @ref
|
|
90
|
+
* MQT_NA_QDMI_device_session_set_parameter.
|
|
91
|
+
* - Initialize the session with @ref MQT_NA_QDMI_device_session_init.
|
|
92
|
+
* - Run code to interact with the device using the @ref device_query_interface
|
|
93
|
+
* "device query interface" and the @ref device_job_interface
|
|
94
|
+
* "device job interface".
|
|
95
|
+
* - Free the session with @ref MQT_NA_QDMI_device_session_free when it is no longer
|
|
96
|
+
* needed.
|
|
97
|
+
*
|
|
98
|
+
* @{
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @brief A handle for a device session.
|
|
103
|
+
* @details An opaque pointer to a type defined by the device that encapsulates
|
|
104
|
+
* all information about a session between a driver and a device.
|
|
105
|
+
*/
|
|
106
|
+
typedef struct MQT_NA_QDMI_Device_Session_impl_d *MQT_NA_QDMI_Device_Session;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @brief Allocate a new device session.
|
|
110
|
+
* @details This is the main entry point for a driver to establish a session
|
|
111
|
+
* with a device. The returned handle can be used throughout the @ref
|
|
112
|
+
* device_session_interface "device session interface" to refer to the session.
|
|
113
|
+
* @param[out] session A handle to the session that is allocated. Must not be
|
|
114
|
+
* @c NULL. The session must be freed by calling @ref MQT_NA_QDMI_device_session_free
|
|
115
|
+
* when it is no longer used.
|
|
116
|
+
* @return @ref QDMI_SUCCESS if the session was allocated successfully.
|
|
117
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p session is @c NULL.
|
|
118
|
+
* @return @ref QDMI_ERROR_OUTOFMEM if memory space ran out.
|
|
119
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
120
|
+
* @see MQT_NA_QDMI_device_session_set_parameter
|
|
121
|
+
* @see MQT_NA_QDMI_device_session_init
|
|
122
|
+
*/
|
|
123
|
+
int MQT_NA_QDMI_device_session_alloc(MQT_NA_QDMI_Device_Session *session);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @brief Set a parameter for a device session.
|
|
127
|
+
* @param[in] session A handle to the session to set the parameter for. Must not
|
|
128
|
+
* be @c NULL.
|
|
129
|
+
* @param[in] param The parameter to set. Must be one of the values specified
|
|
130
|
+
* for @ref QDMI_Device_Session_Parameter.
|
|
131
|
+
* @param[in] size The size of the data pointed by @p value in bytes. Must not
|
|
132
|
+
* be zero, except when @p value is @c NULL, in which case it is ignored.
|
|
133
|
+
* @param[in] value A pointer to the memory location that contains the value of
|
|
134
|
+
* the parameter to be set. The data pointed to by @p value is copied and can be
|
|
135
|
+
* safely reused after this function returns. If this is @c NULL, it is ignored.
|
|
136
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified @ref
|
|
137
|
+
* QDMI_Device_Session_Parameter and, when @p value is not @c NULL, the value of
|
|
138
|
+
* the parameter was set successfully.
|
|
139
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the device does not support the
|
|
140
|
+
* parameter or the value of the parameter.
|
|
141
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
142
|
+
* - @p session is @c NULL,
|
|
143
|
+
* - @p param is invalid, or
|
|
144
|
+
* - @p value is not @c NULL and @p size is zero or not the expected size for
|
|
145
|
+
* the parameter (if specified by the @ref QDMI_Device_Session_Parameter
|
|
146
|
+
* documentation).
|
|
147
|
+
* @return @ref QDMI_ERROR_BADSTATE if the parameter cannot be set in the
|
|
148
|
+
* current state of the session, for example, because the session is already
|
|
149
|
+
* initialized.
|
|
150
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
151
|
+
* @see MQT_NA_QDMI_device_session_init
|
|
152
|
+
*
|
|
153
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
154
|
+
* allow checking if the device supports the specified parameter without
|
|
155
|
+
* setting a value. See the @ref QDMI_session_set_parameter documentation for
|
|
156
|
+
* an example.
|
|
157
|
+
*/
|
|
158
|
+
int MQT_NA_QDMI_device_session_set_parameter(MQT_NA_QDMI_Device_Session session,
|
|
159
|
+
QDMI_Device_Session_Parameter param,
|
|
160
|
+
size_t size, const void *value);
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @brief Initialize a device session.
|
|
164
|
+
* @details This function initializes the device session and prepares it for
|
|
165
|
+
* use.
|
|
166
|
+
* The session must be initialized before it can be used as part of the @ref
|
|
167
|
+
* device_query_interface "device query interface" or the @ref
|
|
168
|
+
* device_job_interface "device job interface". If a device requires
|
|
169
|
+
* authentication, the required authentication information must be set using
|
|
170
|
+
* @ref MQT_NA_QDMI_device_session_set_parameter before calling this function. A
|
|
171
|
+
* session may only be successfully initialized once.
|
|
172
|
+
* @param[in] session The session to initialize. Must not be @c NULL.
|
|
173
|
+
* @return @ref QDMI_SUCCESS if the session was initialized successfully.
|
|
174
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the session could not be
|
|
175
|
+
* initialized due to missing permissions. This could be due to missing
|
|
176
|
+
* authentication information that should be set using @ref
|
|
177
|
+
* MQT_NA_QDMI_device_session_set_parameter.
|
|
178
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p session is @c NULL.
|
|
179
|
+
* @return @ref QDMI_ERROR_BADSTATE if the session is not in a state allowing
|
|
180
|
+
* initialization, for example, because the session is already initialized.
|
|
181
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
182
|
+
* @see MQT_NA_QDMI_device_session_set_parameter
|
|
183
|
+
* @see MQT_NA_QDMI_device_session_query_device_property
|
|
184
|
+
* @see MQT_NA_QDMI_device_session_query_site_property
|
|
185
|
+
* @see MQT_NA_QDMI_device_session_query_operation_property
|
|
186
|
+
* @see MQT_NA_QDMI_device_session_create_device_job
|
|
187
|
+
*/
|
|
188
|
+
int MQT_NA_QDMI_device_session_init(MQT_NA_QDMI_Device_Session session);
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @brief Free a QDMI device session.
|
|
192
|
+
* @details This function frees the memory allocated for the session.
|
|
193
|
+
* Using a session handle after it was freed is undefined behavior.
|
|
194
|
+
* @param[in] session The session to free.
|
|
195
|
+
*/
|
|
196
|
+
void MQT_NA_QDMI_device_session_free(MQT_NA_QDMI_Device_Session session);
|
|
197
|
+
|
|
198
|
+
/** @} */ // end of device_session_interface
|
|
199
|
+
|
|
200
|
+
/** @defgroup device_query_interface QDMI Device Query Interface
|
|
201
|
+
* @brief Provides functions to query properties of a device.
|
|
202
|
+
* @brief The query interface enables to query static and dynamic properties of
|
|
203
|
+
* a device and its constituents in a unified fashion. It operates on @ref
|
|
204
|
+
* MQT_NA_QDMI_Device_Session handles created via the @ref device_session_interface
|
|
205
|
+
* "device session interface".
|
|
206
|
+
*
|
|
207
|
+
* @{
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @brief Query a device property.
|
|
212
|
+
* @param[in] session The session used for the query. Must not be @c NULL.
|
|
213
|
+
* @param[in] prop The property to query. Must be one of the values specified
|
|
214
|
+
* for @ref QDMI_Device_Property.
|
|
215
|
+
* @param[in] size The size of the memory pointed to by @p value in bytes. Must
|
|
216
|
+
* be greater or equal to the size of the return type specified for @p prop,
|
|
217
|
+
* except when @p value is @c NULL, in which case it is ignored.
|
|
218
|
+
* @param[out] value A pointer to the memory location where the value of the
|
|
219
|
+
* property will be stored. If this is @c NULL, it is ignored.
|
|
220
|
+
* @param[out] size_ret The actual size of the data being queried in bytes. If
|
|
221
|
+
* this is @c NULL, it is ignored.
|
|
222
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified property and,
|
|
223
|
+
* when @p value is not @c NULL, the property was successfully retrieved.
|
|
224
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the device does not support the
|
|
225
|
+
* property.
|
|
226
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
227
|
+
* - @p session is @c NULL,
|
|
228
|
+
* - @p prop is invalid, or
|
|
229
|
+
* - @p value is not @c NULL and @p size is less than the size of the data
|
|
230
|
+
* being queried.
|
|
231
|
+
* @return @ref QDMI_ERROR_BADSTATE if the property cannot be queried in the
|
|
232
|
+
* current state of the session, for example, because the session is not
|
|
233
|
+
* initialized.
|
|
234
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
235
|
+
*
|
|
236
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
237
|
+
* allow checking if the device supports the specified property without
|
|
238
|
+
* retrieving the property and without the need to provide a buffer for it.
|
|
239
|
+
* Additionally, the size of the buffer needed to retrieve the property is
|
|
240
|
+
* returned in @p size_ret if @p size_ret is not @c NULL.
|
|
241
|
+
* See the @ref QDMI_device_query_device_property documentation for an example.
|
|
242
|
+
*
|
|
243
|
+
* @attention May only be called after the session has been initialized with
|
|
244
|
+
* @ref MQT_NA_QDMI_device_session_init.
|
|
245
|
+
*/
|
|
246
|
+
int MQT_NA_QDMI_device_session_query_device_property(MQT_NA_QDMI_Device_Session session,
|
|
247
|
+
QDMI_Device_Property prop,
|
|
248
|
+
size_t size, void *value,
|
|
249
|
+
size_t *size_ret);
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @brief Query a site property.
|
|
253
|
+
* @param[in] session The session used for the query. Must not be @c NULL.
|
|
254
|
+
* @param[in] site The site to query. Must not be @c NULL.
|
|
255
|
+
* @param[in] prop The property to query. Must be one of the values specified
|
|
256
|
+
* for @ref QDMI_Site_Property.
|
|
257
|
+
* @param[in] size The size of the memory pointed to by @p value in bytes. Must
|
|
258
|
+
* be greater or equal to the size of the return type specified for @p prop,
|
|
259
|
+
* except when @p value is @c NULL, in which case it is ignored.
|
|
260
|
+
* @param[out] value A pointer to the memory location where the value of the
|
|
261
|
+
* property will be stored. If this is @c NULL, it is ignored.
|
|
262
|
+
* @param[out] size_ret The actual size of the data being queried in bytes. If
|
|
263
|
+
* this is @c NULL, it is ignored.
|
|
264
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified property and,
|
|
265
|
+
* when @p value is not @c NULL, the property was successfully retrieved.
|
|
266
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the device does not support the
|
|
267
|
+
* property.
|
|
268
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
269
|
+
* - @p session or @p site is @c NULL,
|
|
270
|
+
* - @p prop is invalid, or
|
|
271
|
+
* - @p value is not @c NULL and @p size is less than the size of the data
|
|
272
|
+
* being queried.
|
|
273
|
+
* @return @ref QDMI_ERROR_BADSTATE if the property cannot be queried in the
|
|
274
|
+
* current state of the session, for example, because the session is not
|
|
275
|
+
* initialized.
|
|
276
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
277
|
+
*
|
|
278
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
279
|
+
* allow checking if the device supports the specified property without
|
|
280
|
+
* retrieving the property and without the need to provide a buffer for it.
|
|
281
|
+
* Additionally, the size of the buffer needed to retrieve the property is
|
|
282
|
+
* returned in @p size_ret if @p size_ret is not @c NULL.
|
|
283
|
+
* See the @ref QDMI_device_query_site_property documentation for an example.
|
|
284
|
+
*
|
|
285
|
+
* @attention May only be called after the session has been initialized with
|
|
286
|
+
* @ref MQT_NA_QDMI_device_session_init.
|
|
287
|
+
*/
|
|
288
|
+
int MQT_NA_QDMI_device_session_query_site_property(MQT_NA_QDMI_Device_Session session,
|
|
289
|
+
MQT_NA_QDMI_Site site,
|
|
290
|
+
QDMI_Site_Property prop,
|
|
291
|
+
size_t size, void *value,
|
|
292
|
+
size_t *size_ret);
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @brief Query an operation property.
|
|
296
|
+
* @param[in] session The session used for the query. Must not be @c NULL.
|
|
297
|
+
* @param[in] operation The operation to query. Must not be @c NULL.
|
|
298
|
+
* @param[in] num_sites The number of sites that the operation is applied to.
|
|
299
|
+
* @param[in] sites A pointer to a list of handles where the sites that the
|
|
300
|
+
* operation is applied to are stored. If this is @c NULL, it is ignored.
|
|
301
|
+
* @param[in] num_params The number of parameters that the operation takes.
|
|
302
|
+
* @param[in] params A pointer to a list of parameters the operation takes. If
|
|
303
|
+
* this is @c NULL, it is ignored.
|
|
304
|
+
* @param[in] prop The property to query. Must be one of the values specified
|
|
305
|
+
* for @ref QDMI_Operation_Property.
|
|
306
|
+
* @param[in] size The size of the memory pointed to by @p value in bytes. Must
|
|
307
|
+
* be greater or equal to the size of the return type specified for the @ref
|
|
308
|
+
* QDMI_Operation_Property @p prop, except when @p value is @c NULL, in which
|
|
309
|
+
* case it is ignored.
|
|
310
|
+
* @param[out] value A pointer to the memory location where the value of the
|
|
311
|
+
* property will be stored. If this is @c NULL, it is ignored.
|
|
312
|
+
* @param[out] size_ret The actual size of the data being queried in bytes. If
|
|
313
|
+
* this is @c NULL, it is ignored.
|
|
314
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified property and,
|
|
315
|
+
* when @p value is not @c NULL, the property was successfully retrieved.
|
|
316
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the property is not supported by the
|
|
317
|
+
* device or if the queried property cannot be provided for the given sites or
|
|
318
|
+
* parameters.
|
|
319
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
320
|
+
* - @p session or @p operation are @c NULL,
|
|
321
|
+
* - @p prop is invalid, or
|
|
322
|
+
* - @p value is not @c NULL and @p size is less than the size of the data
|
|
323
|
+
* being queried.
|
|
324
|
+
* @return @ref QDMI_ERROR_BADSTATE if the property cannot be queried in the
|
|
325
|
+
* current state of the session, for example, because the session is not
|
|
326
|
+
* initialized.
|
|
327
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
328
|
+
*
|
|
329
|
+
* @remark Calling this function with @p sites set to @c NULL is expected to
|
|
330
|
+
* allow querying properties of the device that are independent of the sites.
|
|
331
|
+
* A device will return @ref QDMI_ERROR_NOTSUPPORTED if the queried property is
|
|
332
|
+
* site-dependent and @p sites is @c NULL.
|
|
333
|
+
*
|
|
334
|
+
* @remark Calling this function with @p params set to @c NULL is expected to
|
|
335
|
+
* allow querying properties of the device that are independent of the values
|
|
336
|
+
* of the parameters. A device will return @ref QDMI_ERROR_NOTSUPPORTED if the
|
|
337
|
+
* queried property is parameter-dependent and @p params is @c NULL.
|
|
338
|
+
*
|
|
339
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
340
|
+
* allow checking if the device supports the specified property without
|
|
341
|
+
* retrieving the property and without the need to provide a buffer for it.
|
|
342
|
+
* Additionally, the size of the buffer needed to retrieve the property is
|
|
343
|
+
* returned in @p size_ret if @p size_ret is not @c NULL.
|
|
344
|
+
* See the @ref QDMI_device_query_operation_property documentation for an
|
|
345
|
+
* example.
|
|
346
|
+
*
|
|
347
|
+
* @attention May only be called after the session has been initialized with
|
|
348
|
+
* @ref MQT_NA_QDMI_device_session_init.
|
|
349
|
+
*/
|
|
350
|
+
int MQT_NA_QDMI_device_session_query_operation_property(
|
|
351
|
+
MQT_NA_QDMI_Device_Session session, MQT_NA_QDMI_Operation operation, size_t num_sites,
|
|
352
|
+
const MQT_NA_QDMI_Site *sites, size_t num_params, const double *params,
|
|
353
|
+
QDMI_Operation_Property prop, size_t size, void *value, size_t *size_ret);
|
|
354
|
+
|
|
355
|
+
/** @} */ // end of device_query_interface
|
|
356
|
+
|
|
357
|
+
/** @defgroup device_job_interface QDMI Device Job Interface
|
|
358
|
+
* @brief Provides functions to manage jobs on a device.
|
|
359
|
+
* @details A job is a task submitted to a device for execution.
|
|
360
|
+
* Most jobs are quantum circuits to be executed on a quantum device.
|
|
361
|
+
* However, jobs can also be a different type of task, such as calibration.
|
|
362
|
+
*
|
|
363
|
+
* The typical workflow for a device job is as follows:
|
|
364
|
+
* - Create a job with @ref MQT_NA_QDMI_device_session_create_device_job.
|
|
365
|
+
* - Set parameters for the job with @ref MQT_NA_QDMI_device_job_set_parameter.
|
|
366
|
+
* - Submit the job with @ref MQT_NA_QDMI_device_job_submit.
|
|
367
|
+
* - Check the status of the job with @ref MQT_NA_QDMI_device_job_check.
|
|
368
|
+
* - Wait for the job to finish with @ref MQT_NA_QDMI_device_job_wait.
|
|
369
|
+
* - Retrieve the results of the job with @ref MQT_NA_QDMI_device_job_get_results.
|
|
370
|
+
* - Free the job with @ref MQT_NA_QDMI_device_job_free when it is no longer used.
|
|
371
|
+
*
|
|
372
|
+
* @{
|
|
373
|
+
*/
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @brief A handle for a device job.
|
|
377
|
+
* @details An opaque pointer to a type defined by the device that encapsulates
|
|
378
|
+
* all information about a job on a device.
|
|
379
|
+
* @remark Implementations of the underlying type will want to store the session
|
|
380
|
+
* handle used to create the job in the job handle to be able to access the
|
|
381
|
+
* session information when needed.
|
|
382
|
+
* @see QDMI_Job for the client-side job handle.
|
|
383
|
+
*/
|
|
384
|
+
typedef struct MQT_NA_QDMI_Device_Job_impl_d *MQT_NA_QDMI_Device_Job;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @brief Create a job.
|
|
388
|
+
* @details This is the main entry point for a driver to create a job for a
|
|
389
|
+
* device. The returned handle can be used throughout the @ref
|
|
390
|
+
* device_job_interface "device job interface" to refer to the job.
|
|
391
|
+
* @param[in] session The session to create the job on. Must not be @c NULL.
|
|
392
|
+
* @param[out] job A pointer to a handle that will store the created job.
|
|
393
|
+
* Must not be @c NULL. The job must be freed by calling @ref
|
|
394
|
+
* MQT_NA_QDMI_device_job_free when it is no longer used.
|
|
395
|
+
* @return @ref QDMI_SUCCESS if the job was successfully created.
|
|
396
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p session or @p job are @c NULL.
|
|
397
|
+
* @return @ref QDMI_ERROR_BADSTATE if the session is not in a state allowing
|
|
398
|
+
* the creation of a job, for example, because the session is not initialized.
|
|
399
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
400
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
401
|
+
* @return @ref QDMI_ERROR_FATAL if job creation failed due to a fatal error.
|
|
402
|
+
*
|
|
403
|
+
* @attention May only be called after the session has been initialized with
|
|
404
|
+
* @ref MQT_NA_QDMI_device_session_init.
|
|
405
|
+
*/
|
|
406
|
+
int MQT_NA_QDMI_device_session_create_device_job(MQT_NA_QDMI_Device_Session session,
|
|
407
|
+
MQT_NA_QDMI_Device_Job *job);
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* @brief Set a parameter for a job.
|
|
411
|
+
* @param[in] job A handle to a job for which to set @p param. Must not be @c
|
|
412
|
+
* NULL.
|
|
413
|
+
* @param[in] param The parameter whose value will be set. Must be one of the
|
|
414
|
+
* values specified for @ref QDMI_Device_Job_Parameter.
|
|
415
|
+
* @param[in] size The size of the data pointed to by @p value in bytes. Must
|
|
416
|
+
* not be zero, except when @p value is @c NULL, in which case it is ignored.
|
|
417
|
+
* @param[in] value A pointer to the memory location that contains the value of
|
|
418
|
+
* the parameter to be set. The data pointed to by @p value is copied and can be
|
|
419
|
+
* safely reused after this function returns. If this is @c NULL, it is ignored.
|
|
420
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified @ref
|
|
421
|
+
* QDMI_Device_Job_Parameter @p param and, when @p value is not @c NULL, the
|
|
422
|
+
* parameter was successfully set.
|
|
423
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the device does not support the
|
|
424
|
+
* parameter or the value of the parameter.
|
|
425
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
426
|
+
* - @p job is @c NULL,
|
|
427
|
+
* - @p param is invalid, or
|
|
428
|
+
* - @p value is not @c NULL and @p size is zero or not the expected size for
|
|
429
|
+
* the parameter (if specified by the @ref QDMI_Device_Job_Parameter
|
|
430
|
+
* documentation).
|
|
431
|
+
* @return @ref QDMI_ERROR_BADSTATE if the parameter cannot be set in the
|
|
432
|
+
* current state of the job, for example, because the job is already submitted.
|
|
433
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
434
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
435
|
+
* @return @ref QDMI_ERROR_FATAL if setting the parameter failed due to a fatal
|
|
436
|
+
* error.
|
|
437
|
+
*
|
|
438
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
439
|
+
* allow checking if the device supports the specified parameter without setting
|
|
440
|
+
* the parameter and without the need to provide a value.
|
|
441
|
+
* See the @ref QDMI_job_set_parameter documentation for an example.
|
|
442
|
+
*/
|
|
443
|
+
int MQT_NA_QDMI_device_job_set_parameter(MQT_NA_QDMI_Device_Job job,
|
|
444
|
+
QDMI_Device_Job_Parameter param, size_t size,
|
|
445
|
+
const void *value);
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* @brief Query a job property.
|
|
449
|
+
* @param[in] job A handle to a job for which to query @p prop. Must not be @c
|
|
450
|
+
* NULL.
|
|
451
|
+
* @param[in] prop The property to query. Must be one of the values specified
|
|
452
|
+
* for @ref QDMI_Device_Job_Property.
|
|
453
|
+
* @param[in] size The size of the memory pointed to by @p value in bytes. Must
|
|
454
|
+
* be greater or equal to the size of the return type specified for @p prop,
|
|
455
|
+
* except when @p value is @c NULL, in which case it is ignored.
|
|
456
|
+
* @param[out] value A pointer to the memory location where the value of the
|
|
457
|
+
* property will be stored. If this is @c NULL, it is ignored.
|
|
458
|
+
* @param[out] size_ret The actual size of the data being queried in bytes. If
|
|
459
|
+
* this is @c NULL, it is ignored.
|
|
460
|
+
* @return @ref QDMI_SUCCESS if the job supports the specified property and,
|
|
461
|
+
* when @p value is not @c NULL, the property was successfully retrieved.
|
|
462
|
+
* @return @ref QDMI_ERROR_NOTSUPPORTED if the job does not support the
|
|
463
|
+
* property.
|
|
464
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
465
|
+
* - @p job is @c NULL,
|
|
466
|
+
* - @p prop is invalid, or
|
|
467
|
+
* - @p value is not @c NULL and @p size is less than the size of the data
|
|
468
|
+
* being queried.
|
|
469
|
+
* @return @ref QDMI_ERROR_BADSTATE if the property cannot be queried in the
|
|
470
|
+
* current state of the job, for example, because the job failed or the property
|
|
471
|
+
* is not initialized because it has no default value and was not set.
|
|
472
|
+
* @return @ref QDMI_ERROR_FATAL if an unexpected error occurred.
|
|
473
|
+
*
|
|
474
|
+
* @remark Calling this function with @p value set to @c NULL is expected to
|
|
475
|
+
* allow checking if the job supports the specified property without
|
|
476
|
+
* retrieving the property and without the need to provide a buffer for it.
|
|
477
|
+
* Additionally, the size of the buffer needed to retrieve the property is
|
|
478
|
+
* returned in @p size_ret if @p size_ret is not @c NULL.
|
|
479
|
+
* See the @ref QDMI_device_query_device_property documentation for an example.
|
|
480
|
+
*/
|
|
481
|
+
int MQT_NA_QDMI_device_job_query_property(MQT_NA_QDMI_Device_Job job,
|
|
482
|
+
QDMI_Device_Job_Property prop, size_t size,
|
|
483
|
+
void *value, size_t *size_ret);
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @brief Submit a job to the device.
|
|
487
|
+
* @details This function can either be blocking until the job is finished or
|
|
488
|
+
* non-blocking and return while the job is running. In the latter case, the
|
|
489
|
+
* functions @ref MQT_NA_QDMI_device_job_check and @ref MQT_NA_QDMI_device_job_wait can be
|
|
490
|
+
* used to check the status and wait for the job to finish.
|
|
491
|
+
* @param[in] job The job to submit. Must not be @c NULL.
|
|
492
|
+
* @return @ref QDMI_SUCCESS if the job was successfully submitted.
|
|
493
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p job is @c NULL.
|
|
494
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
495
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
496
|
+
* @return @ref QDMI_ERROR_FATAL if the job submission failed.
|
|
497
|
+
*/
|
|
498
|
+
int MQT_NA_QDMI_device_job_submit(MQT_NA_QDMI_Device_Job job);
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* @brief Cancel an already submitted job.
|
|
502
|
+
* @details Remove the job from the queue of waiting jobs. This changes the
|
|
503
|
+
* status of the job to @ref QDMI_JOB_STATUS_CANCELED.
|
|
504
|
+
* @param[in] job The job to cancel. Must not be @c NULL.
|
|
505
|
+
* @return @ref QDMI_SUCCESS if the job was successfully canceled.
|
|
506
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p job is @c NULL or the job
|
|
507
|
+
* already has the status @ref QDMI_JOB_STATUS_DONE.
|
|
508
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
509
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
510
|
+
* @return @ref QDMI_ERROR_FATAL if the job could not be canceled.
|
|
511
|
+
*/
|
|
512
|
+
int MQT_NA_QDMI_device_job_cancel(MQT_NA_QDMI_Device_Job job);
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @brief Check the status of a job.
|
|
516
|
+
* @details This function is non-blocking and returns immediately with the job
|
|
517
|
+
* status. It is not required to call this function before calling @ref
|
|
518
|
+
* MQT_NA_QDMI_device_job_get_results.
|
|
519
|
+
* @param[in] job The job to check the status of. Must not be @c NULL.
|
|
520
|
+
* @param[out] status The status of the job. Must not be @c NULL.
|
|
521
|
+
* @return @ref QDMI_SUCCESS if the job status was successfully checked.
|
|
522
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p job or @p status is @c NULL.
|
|
523
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
524
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
525
|
+
* @return @ref QDMI_ERROR_FATAL if the job status could not be checked.
|
|
526
|
+
*/
|
|
527
|
+
int MQT_NA_QDMI_device_job_check(MQT_NA_QDMI_Device_Job job, QDMI_Job_Status *status);
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @brief Wait for a job to finish.
|
|
531
|
+
* @details This function blocks until the job has either finished, has been
|
|
532
|
+
* canceled, or the timeout has been reached.
|
|
533
|
+
* If @p timeout is not zero, this function returns latest after the specified
|
|
534
|
+
* number of seconds.
|
|
535
|
+
* @param[in] job The job to wait for. Must not be @c NULL.
|
|
536
|
+
* @param[in] timeout The timeout in seconds.
|
|
537
|
+
* If this is zero, the function waits indefinitely until the job has finished.
|
|
538
|
+
* @return @ref QDMI_SUCCESS if the job is finished or canceled.
|
|
539
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if @p job is @c NULL.
|
|
540
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
541
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
542
|
+
* @return @ref QDMI_ERROR_TIMEOUT if @p timeout is not zero and the job did not
|
|
543
|
+
* finish within the specified time.
|
|
544
|
+
* @return @ref QDMI_ERROR_FATAL if the job could not be waited for and this
|
|
545
|
+
* function returns before the job has finished or has been canceled.
|
|
546
|
+
*/
|
|
547
|
+
int MQT_NA_QDMI_device_job_wait(MQT_NA_QDMI_Device_Job job, size_t timeout);
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* @brief Retrieve the results of a job.
|
|
551
|
+
* @param[in] job The job to retrieve the results from. Must not be @c NULL.
|
|
552
|
+
* @param[in] result The result to retrieve. Must be one of the values specified
|
|
553
|
+
* for @ref QDMI_Job_Result.
|
|
554
|
+
* @param[in] size The size of the buffer pointed to by @p data in bytes. Must
|
|
555
|
+
* be greater or equal to the size of the return type specified for the @ref
|
|
556
|
+
* QDMI_Job_Result @p result, except when @p data is @c NULL, in which case it
|
|
557
|
+
* is ignored.
|
|
558
|
+
* @param[out] data A pointer to the memory location where the results will be
|
|
559
|
+
* stored. If this is @c NULL, it is ignored.
|
|
560
|
+
* @param[out] size_ret The actual size of the data being queried in bytes. If
|
|
561
|
+
* this is @c NULL, it is ignored.
|
|
562
|
+
* @return @ref QDMI_SUCCESS if the device supports the specified result and,
|
|
563
|
+
* when @p data is not @c NULL, the results were successfully retrieved.
|
|
564
|
+
* @return @ref QDMI_ERROR_INVALIDARGUMENT if
|
|
565
|
+
* - @p job is @c NULL,
|
|
566
|
+
* - @p job has not finished,
|
|
567
|
+
* - @p job was canceled,
|
|
568
|
+
* - @p result is invalid, or
|
|
569
|
+
* - @p data is not @c NULL and @p size is smaller than the size of the data
|
|
570
|
+
* being queried.
|
|
571
|
+
* @return @ref QDMI_ERROR_PERMISSIONDENIED if the device does not allow using
|
|
572
|
+
* the @ref device_job_interface "device job interface" for the current session.
|
|
573
|
+
* @return @ref QDMI_ERROR_FATAL if an error occurred during the retrieval.
|
|
574
|
+
*
|
|
575
|
+
* @remark Calling this function with @p data set to @c NULL is expected to
|
|
576
|
+
* allow checking if the device supports the specified result without
|
|
577
|
+
* retrieving the result and without the need to provide a buffer for the
|
|
578
|
+
* result.
|
|
579
|
+
* Additionally, the size of the buffer required to retrieve the result is
|
|
580
|
+
* returned in @p size_ret if @p size_ret is not @c NULL.
|
|
581
|
+
* See the @ref QDMI_job_get_results documentation for an example.
|
|
582
|
+
*/
|
|
583
|
+
int MQT_NA_QDMI_device_job_get_results(MQT_NA_QDMI_Device_Job job, QDMI_Job_Result result,
|
|
584
|
+
size_t size, void *data, size_t *size_ret);
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* @brief Free a job.
|
|
588
|
+
* @details Free the resources associated with a job. Using a job handle after
|
|
589
|
+
* it was freed is undefined behavior.
|
|
590
|
+
* @param[in] job The job to free.
|
|
591
|
+
*/
|
|
592
|
+
void MQT_NA_QDMI_device_job_free(MQT_NA_QDMI_Device_Job job);
|
|
593
|
+
|
|
594
|
+
/** @} */ // end of device_job_interface
|
|
595
|
+
|
|
596
|
+
/** @} */ // end of device_interface
|
|
597
|
+
|
|
598
|
+
// NOLINTEND(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
|
|
599
|
+
|
|
600
|
+
#ifdef __cplusplus
|
|
601
|
+
} // extern "C"
|
|
602
|
+
#endif
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*------------------------------------------------------------------------------
|
|
2
|
+
Copyright 2024 Munich Quantum Software Stack Project
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the
|
|
5
|
+
"License"); you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://github.com/Munich-Quantum-Software-Stack/QDMI/blob/develop/LICENSE
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
12
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
13
|
+
License for the specific language governing permissions and limitations under
|
|
14
|
+
the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
17
|
+
------------------------------------------------------------------------------*/
|
|
18
|
+
|
|
19
|
+
/** @file
|
|
20
|
+
* @brief Defines all types used within QDMI across the @ref client_interface
|
|
21
|
+
* and the @ref device_interface.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#pragma once
|
|
25
|
+
|
|
26
|
+
#ifdef __cplusplus
|
|
27
|
+
extern "C" {
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
// The following clang-tidy warning cannot be addressed because this header is
|
|
31
|
+
// used from both C and C++ code.
|
|
32
|
+
// NOLINTBEGIN(modernize-use-using)
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @brief A handle for a site.
|
|
36
|
+
* @details An opaque pointer to an implementation of the QDMI site concept.
|
|
37
|
+
* A site is a place that can potentially hold a qubit. In case of
|
|
38
|
+
* superconducting qubits, sites can be used synonymously with qubits. In case
|
|
39
|
+
* of neutral atoms, sites represent individual traps that can confine atoms.
|
|
40
|
+
* Those atoms are then used as qubits. To this end, sites are generalizations
|
|
41
|
+
* of qubits that denote locations where qubits can be placed on a device.
|
|
42
|
+
* Each implementation of the @ref device_interface "QDMI Device Interface"
|
|
43
|
+
* defines the actual implementation of the concept.
|
|
44
|
+
*
|
|
45
|
+
* A simple example of an implementation is a struct that merely contains the
|
|
46
|
+
* site ID, which can be used to identify the site.
|
|
47
|
+
* ```
|
|
48
|
+
* struct MQT_NA_QDMI_Site_impl_d {
|
|
49
|
+
* size_t id;
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
typedef struct MQT_NA_QDMI_Site_impl_d *MQT_NA_QDMI_Site;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @brief A handle for an operation.
|
|
57
|
+
* @details An opaque pointer to an implementation of the QDMI operation
|
|
58
|
+
* concept. An operation generally represents any instruction that can be
|
|
59
|
+
* executed on a device. This includes gates, measurements, classical control
|
|
60
|
+
* flow elements, movement of qubits, pulse-level instructions, etc.
|
|
61
|
+
* Each implementation of the @ref device_interface "QDMI Device Interface"
|
|
62
|
+
* defines the actual implementation of the concept.
|
|
63
|
+
*
|
|
64
|
+
* A simple example of an implementation is a struct that merely contains the
|
|
65
|
+
* name of the operation, which can be used to identify the operation.
|
|
66
|
+
* ```
|
|
67
|
+
* struct MQT_NA_QDMI_Operation_impl_d {
|
|
68
|
+
* std::string name;
|
|
69
|
+
* };
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
typedef struct MQT_NA_QDMI_Operation_impl_d *MQT_NA_QDMI_Operation;
|
|
73
|
+
|
|
74
|
+
// NOLINTEND(modernize-use-using)
|
|
75
|
+
|
|
76
|
+
#ifdef __cplusplus
|
|
77
|
+
} // extern "C"
|
|
78
|
+
#endif
|