Skip to content

Unsupported Circuits ​

MENOS refuses what it cannot represent rather than approximating it. Each entry is a symptom, its cause, and a solution; the messages are quoted from real runs.

Measurement followed by an operation ​

SymptomUnsupportedFeatureError: operation 1: qubit 0 has a non-terminal measurement (an operation follows a measurement of this qubit)
CauseMeasurements must be terminal
SolutionMove the measurement to the end. Mid-circuit measurement is not supported

reset ​

SymptomUnsupportedFeatureError: operation 1 (reset): not a MENOS-supported named gate and has no matrix representation; unsupported. Try transpile(qc, backend) first.
Causereset is not a unitary
SolutionRestructure the circuit to avoid it

Classical control ​

SymptomUnsupportedFeatureError: operation 2 (if_else): not a MENOS-supported named gate and has no matrix representation; unsupported.
CauseConditional gates need mid-circuit classical feedback
SolutionNot supported. Use deferred measurement where the algorithm allows it

A gate on more than five qubits ​

SymptomUnsupportedFeatureError: operation 0 (qft): acts on 6 qubits, exceeding kMaxUnitaryQubits=5, and is not a MENOS-supported named gate. Try transpile(qc, backend) first.
CauseUnitaries are limited to five qubits
Solutiontranspile(qc, backend) lowers it into native gates

Unbound parameters ​

SymptomInvalidCircuitError: operation 0 (rx): unbound parameter(s) [Parameter(t)]; bind all parameters before running (QuantumCircuit.assign_parameters)
CauseA circuit still contains Parameters
Solutionqc.assign_parameters({...}) before running

Parameterized circuits in the estimator ​

SymptomUnsupportedFeatureError: MENOSEstimator does not currently support parameterized circuits …
CauseMENOSEstimator rejects any circuit with parameters, even when parameter_values are given in the pub
SolutionBind first, as the EstimatorV2 example does

Shots without a measurement ​

SymptomInvalidCircuitError: shots > 0 was requested but the circuit has no Measure operation
CauseThere is nothing to sample
SolutionAdd measure, or set shots=0 and ask for a statevector

Nothing to produce ​

SymptomInvalidCircuitError: request asks for neither counts (shots=0) nor a statevector nor an expectation; nothing to produce
Causeshots=0 and want_statevector=False
SolutionRequest an output

An unsupported observable ​

SymptomInternalError: Tableau: num_qubits must be at least 1 from an expectation request
CauseEvery term of the observable was the identity, which MENOS does not currently handle
SolutionAdd the constant yourself after the run. See Pauli Observables

An unsupported gate in one engine only ​

SymptomA candidate is listed as infeasible with operation N (…) is not a Clifford gate or is not supported by Pauli propagation
CauseNot an error: that engine does not support the gate, and another engine ran the job
SolutionNone needed. See Execution Plans

Silently dropped instructions ​

barrier, id and delay are dropped without error because they cannot change any output.

See also ​

Circuits and Gates · Supported Gates

Released under the Apache-2.0 license. GitHub · PyPI