mindquantum.core.gates.QuantumGate

View Source On Gitee
class mindquantum.core.gates.QuantumGate(name, n_qubits, obj_qubits=None, ctrl_qubits=None)[source]

Base class for quantum gates.

Parameters
  • name (str) – the name of this gate.

  • n_qubits (int) – how many qubits is this gate.

  • obj_qubits (int, list[int]) – Specific which qubits the gate act on.

  • ctrl_qubits (int, list[int]) – Specific the control qubits. Default, None.