quantum.gate.CompositeGate Class
Namespace: quantum.gate
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
A CompositeGate
object contains a set of inner gates acting on a small
set of qubits, and a mapping from this small set of qubits to the qubits of the circuit that
contains the composite gate. The CompositeGate
object fulfills the purpose
of a subfunction in classical programming, where a set of inner gates can be packaged as a
subcircuit to be used to construct an outer quantum circuit.
You can assign CompositeGate
objects to the Gates
property of a quantumCircuit
object (as a vector of gates).
Creation
Use the compositeGate
creation function to construct a CompositeGate
object.
You can also use the qftGate
and
mcxGate
functions
to construct CompositeGate
objects. These functions construct specialized
gates that applies the quantum Fourier transform and multi-controlled X gates,
respectively.
Properties
Methods
Examples
Version History
Introduced in R2023a