About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
qiskit.converters.circuit_to_gate
circuit_to_gate(circuit, parameter_map=None, equivalence_library=None, label=None)
Build a Gate
object from a QuantumCircuit
.
The gate is anonymous (not tied to a named quantum register), and so can be inserted into another circuit. The gate will have the same string name as the circuit.
Parameters
- circuit (QuantumCircuit) – the input circuit.
- parameter_map (dict) – For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the gate. If None, existing circuit parameters will also parameterize the Gate.
- equivalence_library (EquivalenceLibrary) – Optional equivalence library where the converted gate will be registered.
- label (str) – Optional gate label.
Raises
QiskitError – if circuit is non-unitary or if parameter_map is not compatible with circuit
Returns
a Gate equivalent to the action of the input circuit. Upon decomposition, this gate will yield the components comprising the original circuit.
Return type
Was this page helpful?
Report a bug or request content on GitHub.