mindquantum.core.gates.BarrierGate#
- class mindquantum.core.gates.BarrierGate(show=True)#
Barrier gate will separate two gate in two different layer.
- Parameters:
show (bool) – whether show the barrier gate. Default:
True.
- get_cpp_obj()#
Get cpp obj.
- on(obj_qubits, ctrl_qubits=None)#
Define which qubits the gate act on.
The control qubits should always be none, since this gate can never be controlled by other qubits.
- Parameters:
obj_qubits (int, list[int]) – Specific which qubits the gate act on, can be a single qubit or a set of consecutive qubits.
ctrl_qubits (int, list[int]) – Specific the control qubits. Default,
None.
- Returns:
Gate, Return a new gate.