Notes on using Qamomile together with external libraries and quantum platforms.
Browse by tag¶
In this section: integration optimization variational
In other sections: algorithm chemistry encoding error-correction finance machine-learning oracle-based primitive resource-estimation sample-based simulation tutorial usage
Transpile native Braket circuits and run local or AWS-backed execution.
Transpile MaxCut QAOA to CUDA-Q and run sampling and expectation-value workflows.
Using OMMX Quantum Benchmarks: Implementing and Benchmarking Quantum Algorithms with Qamomile
Drive QAOA on a LABS instance loaded from the OMMX Quantum Benchmarks dataset and compare against SCIP.
Run Qiskit circuits on qBraid-supported devices.
Transpile to Qiskit, run local simulators, and inspect native Qiskit circuit features.
Transpile to QURI Parts and run on a Qulacs state-vector simulator.
HUGR: measuring quantum integers¶
With the hugr extra installed, HugrTranspiler supports qmc.measure(qmc.cast(register, qmc.QInt)) for registers with a concrete width from 0 through 64 bits. QInt registers can also be arguments and results of direct calls between quantum kernels. Use HugrTranspiler().transpile(kernel, bindings=...) to obtain a HugrExecutable with run() and sample(), then execute locally with HugrExecutor(target="selene"). Use compile() when you need the HUGR graph and its input/output description as a CompiledProgram.
Measurement consumes the register and returns UInt. Bit 0 is the least significant bit, so the decoded value is the sum of bit[i] * 2**i; for a slice, bit 0 is the first qubit in the slice. run() exposes the value as a Python int, and sample() counts the decoded integers. Supported tuple and dictionary returns retain that integer type. An empty register yields 0. Decoding uses integer operations inside the HUGR graph and preserves all 64 bits, including bit 63 and 2**64 - 1, without conversion through Float.
Supply compile-time bindings for arguments that determine register widths. Programs may be serialized before supplying those bindings: symbolic widths remain connected through direct calls and are resolved when the restored program is compiled.