Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
[0.5.0] - 2026-11-10¶
Added¶
QMBackend.quantum_circuit_to_qua(..., table_by_ref=...)—param_tablestill copies each binding into a new QUA variable.table_by_refpasses declaredParameter/ParameterTablevariables through qm-qasminputs_by_refso the circuit uses them directly. Tables passed by reference must be declared and match each input’s dtype; the same exported input in both arguments raisesValueError. Sampler and Estimator programs alias their per-PUB tables this way (unless the circuit stores into one of its inputs), so they no longer copy every input on every shot.qiskit_qm_provider.random— Python counterpart of QUA’srandomlibrary.Randommirrorsqm.qua.Random(set_seed,rand_int,rand_fixed), reproducing the controller’s draws on the host when they are made in the same number and order. It addsrand_int_sequence/rand_fixed_sequence,skip(n)jump-ahead,copy(),state/drawsinspection, anddeclare_qua()to create a QUARandomfrom the current Python state inside a program.rand_fixed()returns aFixedPoint.Box-Muller Gaussian sampling — a utility that turns uniform
rand_fixed()draws into samples from a Gaussian distribution:rand_gauss_box_muller(QUA macro) andbox_muller_pair(host replay), sharing lookup values throughBoxMullerTables.FixedPointOverflowWarning(inqiskit_qm_provider.fixed_point) — emitted byFixedPointwhenever an operation or float conversion leaves the representable range.FixedPointApproximationWarning(inqiskit_qm_provider.fixed_point) — emitted byFixedPointdivision, which is only approximate on the controller.FixedPoint.__float__—float(x)now delegates toto_float().Docs — new “Random numbers” guide and API page; the classical-effect instructions design note gains a section on the host mirror as an entry point for Qiskit integration.
Changed¶
get_qua_script/dump_qua_scriptneed no bindings. They compile outside any QUA program, where tables cannot be declared (passing one always failed insidedeclare()). Circuit inputs now start from typed zeros unlessparam_tablegives a plain Python value, and a table raises a clearTypeError.Require
qm-qasm>=1.10. The backend OpenQASM 3 exporter setsdisable_constants=False, so named constants such aspiare exported instead of being inlined as floats.Require
qm-qua>=1.5.0. Circuit-input array lengths are read fromQuaArrayVariable.creation_lengthinstead of the private_sizeattribute.FixedPointoverflow wraps around instead of saturating, matching QUA’sfixedarithmetic (checked on hardware:7 + 3 = -6,3 * 3 = -7in 4.28). AFixedPointOverflowWarningis emitted whenever it happens (including for out-of-range float constants). Host replays of controller computations, e.g.box_muller_pair, are now bit-exact on overflow too; previously the host clamped to the range limits while the controller wrapped. Checked bit for bit on hardware for+,-,*,<<,>>,&and|; division on the controller is only approximate (relative error up to about 1e-6), soFixedPointdivision is not bit-exact. Out-of-range float constants wrap likeassign(x, constant)does on the controller (declare(fixed, value=constant)is rejected by the controller instead).FixedPoint(value)rounds to nearest instead of truncating toward zero, matching QUA’sdeclare(fixed, value=...)(checked on hardware). Results ofFixedPointarithmetic are unchanged; only float-to-fixed conversion can move by one LSB (2⁻²⁸). Host code that replicates controller computations from float inputs previously disagreed with the controller by one LSB on some values.
[0.4.1] - 2026-11-03¶
Added¶
QMBackend.get_qubit_pairqubit pair name —get_qubit_pairaccepts a single string (the QuAM qubit pair name) in addition to a tuple of two qubit indices, names, orQubitobjects;FluxTunableTransmonBackend.get_qubit_pairfollows the same signature.QMInstructionProperties.fidelity_dictand Target extra properties — mapping-valued QuAMfidelity(typical of two-qubit gate macros) is exposed asfidelity_dictwithout setting scalarerror.propertiesfeeds Qiskit’s Target extra-properties printout with a compactquam_macrorepr or callable qualified name, and unrolls each fidelity benchmark as its own extra property. The RustInstructionPropertiesbase still stores onlydurationanderror.
Fixed¶
Primitive /
backend.runmax_circuitswas ignored for QUA chunking —run_options["max_circuits"]andbackend.run(..., max_circuits=N)were stored on the job but chunking always readbackend.options.max_circuits. They now override the backend default for that job only and leavebackend.optionsunchanged. Qiskit Experiments still splits its own jobs frombackend.max_circuits.
[0.4.0] - 2026-10-29¶
Added¶
Support for the
full_real_time_exprQiskit branch — the provider now works with classical arrays from the author’s Qiskit brancharthurostrauss/qiskit@full_real_time_expr, which is not merged upstream. The branch adds dynamicfor-loop ranges (expr.Range), 1-D classical arrays (types.Array, indexed withexpr.index), and a fix that letsfor-loop bodies with aVarcounter capture variables from the enclosing scope. See the new Real-Time Classical Expressions guide in the docs, which includes a two-qubit randomized-benchmarking example. On the branch,expr.Rangeuses OpenQASM 3 inclusive-stop semantics. Array inputs need qm-qasm ≥ 1.8.0. Everything below is inactive on stock Qiskit.export_vector_as_arraybackend option (defaultTrue) — the backend’s OpenQASM 3 exporter emits eachParameterVectoras one full-lengthinput array[float[64], N], through thefull_real_time_exprbranch’sqiskit.qasm3.ExperimentalFeatures.PARAMETER_VECTORS_AS_ARRAYS. Ignored on stock Qiskit, which has no such feature and exports one scalar input per used element. Set it toFalseto export vectors as scalar inputs on the branch too (e.g. to read the program back with Qiskit’s OpenQASM 3 importer, which cannot readinputarrays).ParameterTable.from_qiskitarray inputs — a classical input of typetypes.Array(Uint | Bool | Float, n)becomes a single array-valuedParameter(a QUAint/bool/fixedarray of lengthn). Earlier versions misread it as a scalarfixed.Unsupported classical types rejected — Duration/Stretch variables, stores and inputs,
Array(Duration, n)and zero-size arrays now raise one consistentValueErrorinParameterTable.from_qiskitandquantum_circuit_to_qua(durations are compile-time only in QUA; use them in delays). Previously a Duration input silently became afixed.Conditional pulse plays (
conditional_play) — apply a fixed QuAM pulse conditionally on a real-time Boolean Qiskit expression (expr.Expr), lowered directly to QUApulse.play(condition=...)without a Qiskitif_testor QUA branching. UseQuantumCircuit.conditional_play(pulse_name, condition, qubit)or the standaloneadd_conditional_play(qc, pulse_name, condition, qubit), after registering the pulse(s) on the backend withbackend.register_conditional_play(*pulse_names)(several pulses in one call are resolved all-or-nothing and synchronized once). Each play is wrapped in a Qiskitboxso that the condition’s classical dependencies are tracked by the DAG and cannot be reordered bytranspile(); the OpenQASM 3 exporter rejects a conditional-play box whose contents were altered. Registering two pulse labels that map to the same operation name (e.g."-y90"and"minus_y90") emits a warning.yandsxdgbasis gates —add_basic_macros()now also mapsyto they180pulse andsxdgto the-x90pulse (both standard in the flux-tunable transmon pipeline it targets).barrierandstorein the backendTarget— QM backend Targets now define both as global, variable-width operations (like control flow), so native-operation checks treat them as genuinely supported rather than special-casing them. Neither enters the qm-qasm operations mapping: qm-qasm lowersstoreto a QUA assignment andbarrierto a QUAalign.missing_operation_names(qc, target)(qiskit_qm_provider.utils.circuit.target_support) — returns the operation names in a circuit, including those nested in control flow, that aTargetdoes not define; used byensure_native_operationsand the private conditional-play registration check.
Changed¶
Backend helpers live under
qiskit_qm_provider.utils— circuit checks, measurement helpers, QUA-script dumps, calibration keys, gate-name aliases, QuAM validation, and Quarc struct assignment each have their own submodule.get_measurement_outcomes,assign_struct_with_table,get_qua_script,dump_qua_script, andpack_register_to_intare still exported fromqiskit_qm_providerandqiskit_qm_provider.backend. Unregistered conditional-play pulses are still reported byensure_native_operations; the check itself is the private_raise_for_unregistered_conditional_playsinqiskit_qm_provider.conditional_play.Measurement-outcome docs — user guides and the backend API index describe only
comp.outputsonQuaCircuitCompilation; the dict helperget_measurement_outcomesis no longer documented as a parallel path.add_basic_macrosimport frombackend.backend_utilsis deprecated — import it fromqiskit_qm_providerorqiskit_qm_provider.quam_macros.superconducting. That old path warns and still returns the function; other names that used to live onbackend_utilsare not re-exported.Circuit inputs are bound by Qiskit object, with clear errors —
quantum_circuit_to_quanow reads theinputdeclarations the exporter actually emitted (QMOpenQASM3Exporter.exportreturns them) and binds each one to its table field or dictionary entry by Qiskit object, instead of predicting identifiers. Inputs the exporter renames now compile, on stock Qiskit as well as on the branch: a parameter whose name is not an identifier (theta.1, exported as_theta_1), and, on the branch, a vector named like a gate or keyword (a vectorxnext to thexgate — e.g.zz_feature_map’s — exported asx_0; alsorx,U,input). A missing binding, or one of the wrong shape (scalar vs. array, array length), raisesValueErrornaming each input; qm-qasm otherwise failed with an opaqueQua1GenerationPass failed, or silently broadcast a scalar into every element of an array input. Fields that match no input are still ignored, so a shared table can be passed whole.Array binding consistency — sampler/estimator PUBs bind vector values by parameter identity for compile-time assignment, local streaming and IQCC hooks, zero-filling unused vector entries. Ambiguous input names are rejected, string dictionary keys such as
"t[2]"or"t"follow the same rules as the objects, and singleton array row copies now work.Dense parameter rows for primitives — with
INPUT_STREAM/IO1/IO2, each binding now travels as one raw row oflen(circuit.parameters)floats (one push and one advance per binding instead of one per parameter), scattered in QUA into the circuit’s fields; only used entries are assigned. On stock Qiskit, vector fields are created only for elements the circuit uses (matching the exporter).Execution plans for both primitives —
QMSamplerJobandQMEstimatorJobbuild one plan per PUB (SamplerPlan/EstimatorPlaninqiskit_qm_provider.job.primitive_plan, sharing aPrimitivePlanbase), exposed onjob.runtime_pubs. The QUA builders (sampler_program,estimator_program,plan_*_programs) now take plans. The private_ExecutionPlanand the unusedobservables_to_indicesare removed.EstimatorPlan.from_pubrequires the estimator readout thatQMEstimatorV2.validate_estimator_pubsadds (a__cregister and oneobs_jbasis input per measured qubit) and raisesValueErrorwithout it and for observables acting on a qubit outside__c.Packed estimator observables — per-qubit basis codes are packed 2 bits per qubit (15 qubits per word) into one int row per binding,
[n_groups, words...], unpacked in QUA with shifts and masks. This replaces one push per qubit per observable plus the sharedobs_length_var; IO1/IO2 exchange only the used part of a row, and a row shared by every binding is sent once.QMEstimatorOptions(input_type=OPNIC)(or setting it beforerun()) now raisesNotImplementedErrorup front.Single sync-hook generator —
post_hook_sampler.generate_sync_hook_samplerandpost_hook_estimator.generate_sync_hook_estimatorare replaced byqiskit_qm_provider.job.sync_hook.generate_sync_hook(plans), shared by both primitives. Each push target is listed once (SPECS) and every push refers to it by index, so the hook grows by one short entry per binding.Estimator measured qubits — circuits and observables are taken as ISA, and the estimator measures exactly the qubits on which some observable of the PUB acts non-trivially (the union over the observables array), including qubits no gate touches and ancillas, instead of every qubit carrying a gate. New helper
job.primitive_plan.estimator_measured_qubits(observables), returning qubit indices.Identity terms are evaluated exactly —
<I> = 1with zero variance, so identity terms are no longer measured: they contribute their coefficient in post-processing. A PUB whose terms are all identities is not compiled, sent or run (Qiskit’sBackendEstimatorV2measures one qubit for it instead).Breaking: estimator readout names reserved under
__— the per-qubit basis inputs added byQMEstimatorV2.validate_estimator_pubsare now__obs_j(wereobs_j), next to the__creadout register, and a PUB circuit with a classical register, variable or stretch whose name starts with__is rejected with aValueErrornaming them (previously only__cwas checked, and a user input namedobs_0failed with Qiskit’s name-conflict error). Circuits prepared by hand forEstimatorPlan.from_pubmust use the new names.Final measurements are kept, as in
BackendEstimatorV2—QMEstimatorV2.validate_estimator_pubsno longer removes a PUB circuit’s final measurements; it only appends the__creadout, like Qiskit’sBackendEstimatorV2. Pass estimator circuits without final measurements (qc.remove_final_measurements(inplace=False)): a finalmeasure_allnow collapses the state before the basis rotations. This also removes the “Trying to add QuantumRegister to a QuantumCircuit having a layout” warning thatremove_final_measurementsraised on every ISA PUB.Non-Pauli observables rejected clearly —
SparseObservableprojector terms (0,1,+,-,r,l) now raise aValueErrorpointing toSparseObservable.as_paulis(), instead of an opaqueQiskitErrorfromPauliList.Parameter values must fit QUA
fixed—QMSamplerV2andQMEstimatorV2now reject, at job creation, any PUB with a bound parameter value outside the 4.28 fixed-point range [-8, 8) or not finite (ValueErrornaming the PUB, parameter and binding). Such values were previously sent or preloaded unchecked and could not be represented on the controller. The primitives guide now warns that expressions over parameters are evaluated in real-time fixed-point arithmetic and can still overflow, and points to QUA’sCastutilities for rescaled kernels.Parameter.push_io_values— the IO pause/set/resume loop now lives in one place;push_to_opxand the estimator’s partial observable rows both use it.job/_pub_parameters.pyrenamed tojob/pub_parameters.py(internal; not exported).ParameterVectorhandling inParameterTable.from_qiskit— when the installed Qiskit has thePARAMETER_VECTORS_AS_ARRAYSexporter feature (thefull_real_time_exprbranch), aParameterVectorbecomes one arrayParameternamed after the vector, of the vector’s full length; the full vector is declared whenever thefilter_functionkeeps any of its used elements. That field binds either export of the vector: the full-lengthinput array[float[64], N](export_vector_as_array=True) or one scalar input per used element (option off), whose inputs are bound to the array’s cells. Stock Qiskit keeps per-element_name_i_fields. Dictionary bindings toquantum_circuit_to_quatake a whole vector (or its name) in both exports; a single-element key binds only an element exported as a scalar input.Breaking (stock Qiskit):
ParameterTable.from_qiskitcreates fields only for used vector elements — matching what the exporter declares. Previously every element of aParameterVectorgot a_name_i_field even if the circuit never used it, so code that pushes or assigns values for unused elements by name (e.g.table.push_to_opx({"_theta_3_": ...})) now fails on the missing field; drop those entries.Breaking:
quantum_circuit_to_qua()only accepts circuits transpiled for the backend — the OpenQASM 3 lowering needs circuits expressed in native operations on physical qubits, soquantum_circuit_to_qua()(and everything built on it, such asbackend.run()and the primitives) now raisesValueErrorunless the circuit:has been laid out on the backend’s physical qubits: it carries a
TranspileLayoutand a single canonicalqregister of exactlybackend.num_qubitsqubits (ensure_circuit_physicalinqiskit_qm_provider.utils.circuit.physical_layout);uses only operations supported by
backend.targeton the qubits they act on, as checked by Qiskit’sGatesInBasispass (ensure_native_operationsinqiskit_qm_provider.utils.circuit.target_support). Errors name what is wrong: unregistered conditional-play pulses, then operation names the Target does not define, then the first operation used on unsupported qubits or parameters.
Circuits that previously compiled without transpilation (hand-built
QuantumCircuit(n), ortranspile(..., basis_gates=...)without the backend) must now be transpiled against the backend first. Both checks only inspect the circuit and never modify it.Barriers now compile to QUA
align—quantum_circuit_to_qua()no longer stripsbarrierstatements from the exported OpenQASM 3; qm-qasm lowers each one to analignover every element of the barrier’s qubits. Circuits containing barriers (including thosetranspileormeasure_allinsert) now synchronize those qubits at that point.Minimum Qiskit version is now 2.2 — the OpenQASM 3 exporter relies on
qiskit.qasm3.DefcalInstruction/implicit defcals and the physical-circuit form introduced in Qiskit 2.2.TLS-secured QM SaaS connection —
QmSaasProvider.get_backend()now builds itsQuantumMachinesManagerwithQuantumMachinesManager(**instance.qmm_connection_params), which adds the TLS credentials required by the QM cloud simulator from QOP 3.8.1 onwards (connections without them fail after the October 8th, 2026 server update). Replaces the deprecatedhost/port/default_connection_headersform.qm-saasextra now requiresqm-saas>=1.2.0,<2(first release exposingqmm_connection_params).
Fixed¶
Chunked jobs with streamed inputs no longer deadlock on hardware — when
max_circuitssplits a sampler or estimator job into several queued programs, each chunk is now waited on and fed its inputs before the next one: previously every chunk had to be running before any input was pushed, but a queued program only starts once the previous one has finished, so the first chunk waited forever for its inputs (INPUT_STREAM,IO1,IO2; compile-time inputs and IQCC were not affected).await_running_jobstakes anon_running(job, chunk)callback for this.Identity-only estimator jobs — when every term of every PUB is the identity, the job sends nothing to the QM (it previously still opened a connection), and an IQCC job returns its result instead of raising
RuntimeError: IQCC job has not been submitted yet.Scalar named like a vector element — with vector arrays, a scalar input named
_t_2_next toParameterVectortis now rejected as ambiguous; whent[2]was exported as a scalar input it silently bound to that scalar instead of the vector’s array cell.PUBs without parameters or without bindings — a PUB whose circuit has no parameters gets no parameter table and no binding loop: the sampler enters the shot loop directly (running
ktimes the shots, in binding order, for a(k, 0)bindings array, which previously returned the wrong number of shots), and the estimator loops only over its observable groups. A PUB with zero bindings (e.g.np.zeros((0, n))) is valid: it is not compiled, sent or run, and its result is empty with the PUB’s shape ((0,)), as with Qiskit’s reference primitives. It previously failed with an opaqueQUA2DArrayerror (sampler) or aValueError(estimator); a job whose PUBs are all such sends nothing to the QM.Deprecated
CircuitInstructionunpacking —logically_active_qubitsno longer iterates circuit instructions as tuples, which Qiskit deprecated in 1.2 and removes in 3.0 (every estimator PUB emitted theDeprecationWarning).Out-of-range parameter error on NumPy 2 — the message of the
[-8, 8)fixed-point check printednp.float64(12.5)instead of12.5.Estimator expectation values on multi-qubit observables — three ordering errors combined to give wrong results whenever an observable acted on more than one qubit:
get_non_trivial_observablesreversed the qubit order of the basis rotations,counts_from_estimator_streamread__cbig-endian, and measured Paulis were compacted with Qiskit’s per-basis measurement indices although__cholds every measured qubit. Grouping now happens once per distinct set of Pauli terms (shared by the bindings that request it), so metadata, basis codes and the__cstream share one order (abelian_grouping=Falseno longer misreads or crashes).Estimator result shape — parameter indices are broadcast against the observables before post-processing, as in Qiskit; PUBs with more observables than bindings (e.g. several observables, no parameters) no longer fail in
result().Estimator run options —
simulateandcompiler_optionsnested under the estimator’srun_optionsnow reach program submission.IQCC estimator sync hook — attached whenever a PUB streams inputs, including PUBs that stream observables but have no circuit parameters.
Estimator table names — tables are named by PUB index, fixing duplicate pool registration when two PUBs share a circuit name.
QMBackend.qubit_mappingelement names — the base backend mapped each qubit to itschannelsdict keys ("xy","z", …) instead of the channels’ QUA element names ("q0.xy", …), so everyalignqm-qasm emitted targeted non-existent elements.FluxTunableTransmonBackendalready overrode this correctly.
[0.3.5] - 2026-09-23¶
Added¶
GPIGate/GPI2Gate— IonQ-native single-qubit gates (matching Qibo’sGPI/GPI2convention) added toadditional_gates.pyalongside the existingSY/SYdg/CR/FSimgates, withQuantumCircuit.gpi()/QuantumCircuit.gpi2()convenience methods and"gpi"/"gpi2"entries inget_extended_gate_name_mapping().
Changed¶
look_for_standard_opgate-name aliases —"rx90"now maps to"sx", alongside the existing"x90"/"x/2"aliases.QuantumCircuit.sy()/sydg()/cr()/fsim()/gpi()/gpi2()— all now accept an optionallabelargument, forwarded to the underlying gate’s constructor.Optional Qiskit Pulse —
QISKIT_PULSE_AVAILABLEis probed withimportlib.util.find_specand no longer emits anImportWarningon Qiskit 2.x (where Pulse was removed). Pulse classes are imported only inside Pulse-gated methods;QiskitChannelis a type hint (Anyat runtime) forchannel_mapping. Circuit-only import andbackend.run()paths no longer loadqiskit.pulse.requires_qiskit_pulseis unchanged.
Fixed¶
Value-hashable
operation_key—qm_qasm.OperationIdentifierhas no__eq__/__hash__, so using it directly as adict/setkey treated logically identical operations as distinct and silently duplicated them. Introducedoperation_key(name, number_of_params, qubits)— a plain, value-equal tuple — used across backend operation mappings andhas_conflicting_calibrationsfor correct deduplication/overwriting. RealOperationIdentifierinstances are now built only once, when constructing theCompiler/HardwareConfig. No public API changes.
[0.3.4] - 2026-08-13¶
Changed¶
Canonical IQCC cloud path —
backend.run()on IQCC backends always usesCloudQuantumMachine.executeviaQMJob/CloudQMJob. Removed the undocumented legacyIQCCJobpath that treatedIQCC_Clouditself as the quantum machine. PreferIQCCProvider.get_backend()so QuAMconnect()yieldsCloudQuantumMachinesManager.Unified QM program submission — cloud and simulation always use
qm.execute(simulation viasimulate=SimulationConfig); real hardware enqueues via OPX1000add_to_queuewith OPX+queue.addfallback, replacingcompile+queue.add_compiled. Shared helpers live inqm_execution_options.quamlower bound raised to>=0.4.2so the provider stays importable with currentqm-qua(0.4.1 imported a removedAmpValuesType).
Fixed¶
QMJob.submit()cloud execution — trimcompiler_options(and route throughCloudQuantumMachine.execute(options=…)) when the backend usesCloudQuantumMachinesManager, matching the IQCC cloud client API and avoidingTypeErroron every cloud job submission.
[0.3.3] - 2026-08-07¶
Fixed¶
add_basic_macrosdefault CZ gate — passflux_pulse_qubit=(not the obsoleteflux_pulse_control=) when constructing quam-builder’sCZGate, so default two-qubit macros seed correctly instead of failing silently behind the existing warning.
[0.3.2] - 2026-07-22¶
Changed¶
add_basic_macrosrelocated toqiskit_qm_provider.quam_macros.superconducting(re-exported fromqiskit_qm_provider). Prefers single-qubit macros fromquam-builder, with a fallback to the provider’s local copies, and accepts**reset_macro_kwargsforResetMacro. Importing it fromqiskit_qm_provider.backend.backend_utilsis deprecated.
Fixed¶
QUAArray.push_to_opx/QUA2DArray.push_to_opx— signatures now match the baseParameterAPI:jobmay be aRunningQmJoborJobApi(optional). The optionalqmargument is retained only for legacy back-compat; current QUA drives IO through the job interface.
[0.3.1] - 2026-07-02¶
Fixed¶
Duplicate
INPUT_STREAMdeclarations —Parameter.declare()reuses an existing same-named stream in the current QUA program scope when type/length match (emitsUserWarning), instead of raising “Variable already declared”. Common with chunked estimator/sampler plans that share streamed field names. Incompatible collisions still raiseValueError.estimator_programobs_length_var— declared once at program scope and onlyrcv()’d per plan, avoiding per-plan re-declaration in multi-plan programs.
[0.3.0] - 2026-07-02¶
Added¶
Chunked execution (max_circuits_spec)¶
max_circuitsbackend option —QMBackend,QMSamplerV2, andQMEstimatorV2accept amax_circuitsoption. When the circuit/PUB count exceeds it, execution is automatically split into consecutive QUA programs; results are stitched back transparently.compute_chunk_layout()inqua_programs.py— plans the per-program circuit/PUB grouping for a givenmax_circuitslimit.compute_locator()inqua_programs.py— inverts a chunk layout into aglobal_index → (chunk_idx, local_idx)mapping used during result assembly. Previously inlined as a dict comprehension in three separate places.stream_assembly.py— shared helpersbit_array_from_stream()andbit_array_from_measurement_stream()that assembleBitArrayresults from QUA streams, handling both standard QM (flat output) and IQCC cloud (may carry an extra leading dimension) via areshapenormalisation step.IQCCJobMixin.status()— IQCC-aware status check: sinceCloudJob.statusis unconditionally"completed"(IQCC execution is synchronous), this method inspects_run_data["stderr"]instead. ReturnsJobStatus.ERRORwhen the cloud stderr contains a Python traceback,JobStatus.DONEotherwise. Inherited by bothIQCCSamplerJobandIQCCEstimatorJob.aggregate_job_statuses()iniqcc_job_mixin.py— shared status-aggregation helper (worst-case across all chunk jobs) used by bothQMJob.status()andQMPrimitiveJob.status().QMJob.program— backward-compatible property alias forprograms[0].
Fixed¶
Chunked execution (max_circuits_spec)¶
IQCCJob.submit()— was executing onlyprograms[0], silently dropping all chunks beyond the first for IQCCbackend.run()calls with chunking; now loops over all programs.QMSamplerJob.submit()simulate path — was always submitting onlyprograms[0]; now iterates all chunks so multi-program simulation works correctly.IO1/IO2 parameter push on
QmPendingJob—wait_until_job_is_pausedrequires aRunningQmJob; the compile+add_compiled refactor passed a pending job. BothQMSamplerJob.submit()andQMEstimatorJob.submit()now callpending.wait_for_execution()before pushing parameters and store the resultingRunningQmJobin_qm_jobs.Result(results=…)single-circuit — was passing a bareExperimentResult(not a list) for single-circuit runs, causingTypeErroronresult.results[0]; always passes a list now.IQCC partial execution —
IQCCSamplerJobandIQCCEstimatorJobnow initializeself._qm_jobs = []before the execute loop and append incrementally; a mid-loop failure no longer leaves_qm_jobs = None, making partial state visible.IQCCJobMixin.status()/result()empty-list false DONE —self._qm_jobs = [](set before the loop, never appended to when the firstexecute()raises) previously passed theis Noneguard and returnedJobStatus.DONE; guard now uses a falsy check covering bothNoneand[].wait_for_execution()mid-loop failure — a failure on chunk k previously left a partial_qm_jobslist and caused a crypticIndexErrorin_result_function; now raisesRuntimeErrornaming the chunk index and the circuit/PUB indices in that chunk so the user knows which job to isolate.QMJob.submit()dead cloud kwargs — removed aCloudQuantumMachinekwargs block (timeout / terminal_output) that silently dropped the user-specified timeout on multi-program cloud jobs;IQCCJoboverridessubmit()entirely so the path was unreachable.Status mapping duplication —
QMJob.status()andQMPrimitiveJob.status()had identical status-string →JobStatusmapping dicts inlined separately; both now delegate to the sharedaggregate_job_statuses()helper.
Quarc hybrid integration (quarc-support)¶
Quarc integration for OPNIC stream assignment —
ParameterPool.prepare_opnic_quarc_hybrid_packets()deterministically attaches incoming/outgoing stream IDs toParameterTableand standaloneParameterobjects before QUA variable declaration, replacing the legacyopnic_wrapper-based path.default_quarc_struct_name()— helper to keep struct naming consistent between this provider and the Quarc build system.quarc_emit.py— translation helpers from QUA types to Quarc annotations (quarc_atomic_for,quarc_annotation_for,quarc_direction_for,build_quarc_struct) without prematurely consuming global stream IDs.Dual Quarc emission pipelines in
ParameterPool:Module-first —
ParameterPool.from_quarc_module(module)rebuilds OPNIC-backedParameterTable/Parameterobjects from an existing QuarcBaseModule.Parameter-first —
ParameterPool.to_quarc_module()lazily binds (or creates) a Quarc module and defers struct emission until explicitly requested.
Optional
[quarc]extra inpyproject.tomlfor installing Quarc as a peer dependency.Lazy Quarc import — top-level
import qiskit_qm_providerno longer requiresquarc;QiskitQMModuleis loaded via__getattr__andQUARC_AVAILABLEprobes availability at import time.
OPNIC host↔OPX transport (formerly DGX_Q)¶
InputType.OPNIC— rebranded fromInputType.DGX_Qfor classical host packet communication over the OP Network Interface Card.Quarc-managed struct handles —
ParameterTableandParameterdelegatepush_to_opx,fetch_from_opx, andstream_backto QuarcQuaStructHandleendpoints instead of manual packet assembly.Standalone OPNIC parameters — synthetic
ParameterTableadapter lets OPNICParameterinstances perform I/O without explicit table binding; lazy promotion on first transport call.Bidirectional stream resolution —
incoming_stream_idandoutgoing_stream_idproperties onParameterandParameterTable, resolved from Quarc handle metadata.Parameter.assign_from_io(io_index)— non-blocking assignment of global IO registers (IO1/IO2) to scalar variables without pausing QUA execution.
QiskitQMModule¶
QiskitQMModule—quarc.BaseModuleextension unifying OPNIC and non-OPNIC parameter declaration, persistence, and reconstruction:Automatic registration with
ParameterPoolat construction.Sweeps pre-existing OPNIC tables and pending standalone parameters onto the module.
parameter_specsfield for serialising non-OPNIC parameters.reconstruct_non_opnic()anditer_all_params()for round-trip module state.
QiskitQMModule.bind_connection(qmm)— serialises QMM host/port into module JSON; invoked automatically on firstQMBackend.qmaccess.QiskitQMModule.get_running_job()— retrieves the active QM job in both local backend mode and IQCC sync-hook mode.Default module allocation —
ParameterPool.quarc_module()/to_quarc_module()lazily allocate aQiskitQMModule(instead of a plainquarc.BaseModule) and sweep pending parameters on first access.
Parameter and ParameterTable API¶
Unified interface —
ParameterandParameterTableshare canonical method names (declare,rcv,declare_stream,reset_qua) so callers never branch on concrete type.1-field struct promotion —
ParameterPool.from_quarc_module()promotes Quarc structs with exactly one field to a standaloneParameter.QuaFieldTablemixin — shared field-access pattern for table-like QUA objects.QUA program scope guards —
is_inside_scope(),require_qua_program(), and@requires_qua_programenforce that QUA variable accessors are used insidewith program():.assign_struct_with_table()— QUA macro copying declaredParameterTablevalues into a QuarcQuaStructHandlewith runtime validation and shape checks.pack_register_to_int()— helper for bit-packing classical register values into a QUA integer scalar.Zero-argument
push_to_opx()—Parameter.push_to_opx()andParameterTable.push_to_opx()default to streaming current values when called without arguments.
Circuit compilation and measurement outputs¶
QuaCircuitCompilation— first-class wrapper for qm-qasm compilation results returned byQMBackend.quantum_circuit_to_qua().MeasurementOutcomeTable(comp.outputs) — compilation-local measurement handles wired from qm-qasmresult_program:comp.outputs["c"]/comp.outputs.get_parameter("c")for bool vars and field handles.comp.outputs.state_ints["c"]for lazy-packed integer scalars.comp.outputs.streams["c"]for per-fielddeclare_stream()handles.
MeasurementRegisterField— per-register handle exposing measurement outcome accessors without polluting the runtimeParameterPool.Loose QASM3 classical bits —
_LooseBitRegisterand extendedget_measurement_outcomes()surface unassigned classical bits under synthetic_bitNkeys.
Gates and backend utilities¶
FSimGate— parameterized fSim gate (θ, φ) withQuantumCircuit.fsim()monkey-patch.Expanded additional gates —
SYGate,SYdgGate, andCRGateretained and registered inget_extended_gate_name_mapping().add_basic_macros(backend)— exported utility to populate backends with standard single-qubit gate, measure, and reset macros; syncs the backend target automatically.quam_macrosmodule — dedicated home for superconducting qubit macros (MeasureMacro,ResetMacro,VirtualZMacro,DelayMacro,IdMacro), extracted fromiqcc_calibration_tools.Non-destructive macro injection —
add_basic_macrosonly fills emptyqubit.macrosdicts and absent pair-levelczentries, preserving user-defined macros.Improved flux-tunable channel mapping —
FluxTunableTransmonBackendqubit→element mapping returns variable-length channel tuples including TWPA pump channels when present.QMInstructionPropertiesquam_macrosupport — explicit QuAM macro input takes priority overqua_pulse_macrofor property inference.
Runtime and cross-environment job access¶
qiskit_qm_provider.runtime— helpers for hybrid classical/QUA workflows:Sync-hook job reconstruction from IQCC CLI args (
-j/-q/-i/-p).Running-job polling compatible with QOP 3.x (
get_jobs(status=["Running"])) and QOP 2.x (list_open_qms()fallback).
Self-contained IQCC sync hooks¶
Dependency-free sync-hook generation —
generate_sync_hook_sampler()andgenerate_sync_hook_estimator()now emit a sync hook that runs on any IQCC user’s cloud runtime: the generated code imports onlyfrom iqcc_cloud_client.runtime import get_qm_joband no longer requiresqiskit_qm_providerornumpyto be installed on the sync-hook side. Parameter tables and observable indices are serialised to plain-Python data; the push logic is rendered from Jinja templates (qiskit_qm_provider/job/templates/).INPUT_STREAMandIO1/IO2over IQCC — both delivery mechanisms are fully runnable from the sync hook.INPUT_STREAMpushes viajob.push_to_input_stream(name, value);IO1/IO2setjob.set_io_values(...)with an inlined pause/resume loop (an in-template equivalent ofqualang_tools.results.wait_until_job_is_paused), soqualang_toolsis not required in the cloud runtime either.Per-parameter type coercion — streamed values are coerced according to each parameter’s QUA type (
int/fixed/bool) instead of a blanketfloat()cast.jinja2added to the[iqcc]optional extra.
Documentation¶
Primitives guide — Running on IQCC Cloud — explains the self-contained sync-hook behavior, supported
input_typemechanisms (INPUT_STREAM,IO1/IO2), and theOPNIClimitation on IQCC jobs.Measurement outputs guide — locality model, accessor contract, RL reward and QEC worked examples.
Error-correction workflow guide — expanded hybrid QEC patterns (syndrome streaming, detection events, decoder integration).
Parameter table and backend API docs — updated Sphinx stubs, scope-guard reference, and OPNIC workflow documentation.
Changed¶
IQCC sync-hook generation rewritten — the previously emitted hook re-declared
ParameterTable/Parameterobjects and calledpush_to_opx()(requiringqiskit_qm_provider+numpyin the cloud runtime). It now injects plain data into a Jinja template that talks to the QM job directly.QMSamplerV2.run()/QMEstimatorV2.run()raiseNotImplementedErrorwheninput_type=InputType.OPNICis combined with an IQCC job (IQCCSamplerJob/IQCCEstimatorJob), since OPNIC transport is not yet available over the cloud sync hook — useINPUT_STREAMorIO1/IO2.QMBackend.quantum_circuit_to_qua()now returnsQuaCircuitCompilationinstead of a raw qm-qasmCompilationResult.InputType.DGX_Qrenamed toInputType.OPNICthroughout the codebase, primitives options, and documentation. OPNIC is presented as a QUARC-backed host↔OPX transport; the legacy “DGX Quantum” naming is fully retired from code and docs.Parameter.dgx_struct/opnic_structreplaced byParameter.struct_type(and equivalent onParameterTable); theopnic_structname was removed outright (see Removed).ParameterPool.prepare_dgx_quarc_hybrid_packets()renamed toprepare_opnic_quarc_hybrid_packets().Internal callers migrated to canonical names — library code (
qua_programs,qm_backend,pulse_support_utils) now callsdeclare()/rcv()instead of the deprecateddeclare_variable(s)/load_input_value(s), so building sampler/estimator programs no longer self-emitsDeprecationWarning.get_measurement_outcomes()sources every entry fromcomp.outputsand exposesis_array/lengthkeys (Parameterconvention). Loose clbits are returned under per-bit keys_bit0,_bit1, … (one entry each) instead of a single packed_bitregister — loose bits are independent and are no longer packed into one integer.state_intis always lazily available (no construction-time gate).MeasurementRegisterFieldnow follows theParametershape convention — it carrieslength(0for a scalar loose clbit, the register width otherwise) and exposesis_array(length > 0) andlengthas part of the sharedTableFieldProtocol. Dropped the bespokeregister_size/var_is_arraystate;pack_register_to_intremains the single place that adapts packing to the wired QUA variable.MeasurementRegisterField/MeasurementOutcomeTable.from_compilation/QuaCircuitCompilationdropped thecompute_state_intconstructor argument —state_intis a lazy property computed only on access.ParameterINPUT_STREAM declaration uses the current qm-qua API (declare_input_stream(type, name=..., value=...)); output streams still usedeclare_stream(). A QUA 1.3 client/stream_idpath is scaffolded inparameter.pybut remains commented until qm-qua ≥ 1.3 (note:declare_output_streamis not exported in qm-qua 1.2.x).ParameterTable.fetch_from_opx()uses bulkrecv(size, index)instead of per-element iteration.QMBackend.compile()param_tabletyping broadened fromList[...]toSequence[...].IQCCProvideralways defaults toFluxTunableQuamwhenquam_clsis not supplied (removed conditional fallback import).add_basic_macrosstores pulse references by name (string) in QuAM macro definitions.Deprecation aliases — historical method names (
declare_variable(s),load_input_value(s),reset_var(s),declare_streams) preserved via_DeprecatedAliasdescriptor; access emitsDeprecationWarning(scheduled removal in v1.2).
Deprecated¶
declare_variables/declare_variable→ usedeclare.load_input_values/load_input_value→ usercv.reset_vars/reset_var→ usereset_qua.declare_streams→ usedeclare_stream.
Removed¶
Legacy
opnic_wrapper-based OPNIC transport insideParameterPool.OpnicPacketBindingprotocol and internal OPNIC orchestration modules (quarc_naming,quarc_live_module).ParameterPoolmanual stream-ID rebinding methods (rebind_parameter_table_id, etc.) in favor of Quarc-managed handles.@opnic_checkdecorator (relaxed via standalone OPNIC adapter pattern).opnic_structalias onParameter/ParameterTable— removed outright (no deprecation cycle); OPNIC transport never shipped working, so it had no usable callers. Usestruct_typefor the Quarc struct type andvarfor the bound handle._LooseBitRegisterhelper class and the monotonic output-table name counter (reset_output_table_name_registry) — table names are now derived from currently-live tables, so they no longer grow unboundedly across a long-lived process.Dependency on
iqcc_calibration_toolsfor single-qubit macros (replaced byquam_macros).
Fixed¶
Input stream declarations — aligned with the installed qm-qua
declare_input_streamsignature (legacy(type, name=..., value=...)path active; QUA 1.3 client-target syntax prepared but not enabled).ResetMacro pi_12 pulse forwarding — corrected argument pass-through in single-qubit reset macro.
Quarc packet naming collision — synthetic table names avoid matching single-parameter field names that trigger Quarc complaints.
Ill-defined Quarc
recv()bypass — workaround for incomplete Quarc receive API.QUA array constructors —
QUAArrayandQUA2DArrayoverride__new__to preventqua_typedouble-binding during positional init.Backend utils docstring cleanup in
add_basic_macros.QuAM macros folder location corrected after module extraction.