UnitaryGate¶
- class UnitaryGate(data, label=None)[소스]¶
기반 클래스:
qiskit.circuit.gate.Gate
Class quantum gates specified by a unitary matrix.
예제
We can create a unitary gate from a unitary matrix then add it to a quantum circuit. The matrix can also be directly applied to the quantum circuit, see
unitary()
.Create a gate from a numeric unitary matrix.
- 매개변수
data (matrix or Operator) – unitary operator.
label (str) – unitary name for backend [Default: None].
- 예외 발생
ExtensionError – if input data is not an N-qubit unitary operator.
Methods
Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Return the adjoint of the unitary.
Assemble a QasmQobjInstruction
Validation and handling of the arguments and its relationship.
Set a classical equality condition on this instruction between the register or cbit
classical
and valueval
.Return the conjugate of the unitary.
Return controlled version of gate
Copy of the instruction.
Return the adjoint of the unitary.
Return True .IFF.
Creates a unitary gate as gate^exponent.
The qasm for a custom unitary gate This is achieved by adding a custom gate that corresponds to the definition of this gate.
Creates an instruction with gate repeated n amount of times.
For a composite instruction, reverse the order of sub-instructions.
Soft comparison between gates.
Return a Numpy.array for the gate unitary matrix.
Return the transpose of the unitary.
Unitary gate parameter has to be an ndarray.
Attributes
- decompositions¶
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
- definition¶
Return definition in terms of other basic gates.
- duration¶
Get the duration.
- label¶
Return instruction label
- 반환 형식
str
- name¶
Return the name.
- num_clbits¶
Return the number of clbits.
- num_qubits¶
Return the number of qubits.
- params¶
return instruction params.
- unit¶
Get the time unit of duration.