![]() |
QPanda3
Supported by OriginQ
|
Public 成员函数 | |
None | __init__ (self, *args, **kwargs) |
Initialize self. | |
None | clear_control (self) |
clear_control(self: core.core.QGate) -> None | |
QGate | control (self, int qubit) |
control(*args, **kwargs) Overloaded function. | |
QGate | control (self, list[int] qubits) |
control(*args, **kwargs) Overloaded function. | |
list[int] | control_qubits (self) |
control_qubits(self: core.core.QGate) -> list[int] | |
QGate | dagger (self) |
dagger(self: core.core.QGate) -> core.core.QGate | |
GateType | gate_type (self) |
gate_type(self: core.core.QGate) -> core.core.GateType | |
bool | is_dagger (self) |
is_dagger(self: core.core.QGate) -> bool | |
numpy.ndarray[numpy.complex128[m, n]] | matrix (self, bool expanded=...) |
matrix(self: core.core.QGate, expanded: bool = False) -> numpy.ndarray[numpy.complex128[m, n]] | |
str | name (self) |
name(self: core.core.QGate) -> str | |
list[float] | parameters (self) |
parameters(self: core.core.QGate) -> list[float] | |
QGate | power (self, float k) |
power(self: core.core.QGate, k: float) -> core.core.QGate | |
list[int] | qubits (self) |
qubits(self: core.core.QGate) -> list[int] | |
int | qubits_num (self) |
qubits_num(self: core.core.QGate) -> int | |
QGate | remap (self, list[int] arg0) |
remap(self: core.core.QGate, arg0: list[int]) -> core.core.QGate | |
None | set_parameters (self, list[float] params) |
set_parameters(self: core.core.QGate, params: list[float]) -> None | |
list[int] | target_qubits (self) |
target_qubits(self: core.core.QGate) -> list[int] | |
![]() | |
None | __init__ (self) |
init(self: core.core.Operation) -> None | |
bool | is_controlled (self) |
is_controlled(self: core.core.Operation) -> bool | |
额外继承的成员函数 | |
![]() | |
list | m_control_qubits [int] |
list | m_measure_cbits [int] |
list | m_target_qubits [int] |
None pyqpanda3.core.core.QGate.__init__ | ( | self, | |
* | args, | ||
** | kwargs ) |
Initialize self.
See help(type(self)) for accurate signature.
None pyqpanda3.core.core.QGate.clear_control | ( | self | ) |
clear_control(self: core.core.QGate) -> None
Clear all control qubits from this gate.
QGate pyqpanda3.core.core.QGate.control | ( | self, | |
int | qubit ) |
control(*args, **kwargs) Overloaded function.
Add a control qubit.
qubit | The control qubit index to add. |
Add control qubits.
qubit | The control qubit index to add. |
QGate pyqpanda3.core.core.QGate.control | ( | self, | |
list[int] | qubits ) |
control(*args, **kwargs) Overloaded function.
Add a control qubit.
qubit | The control qubit index to add. |
Add control qubits.
qubit | The control qubit index to add. |
list[int] pyqpanda3.core.core.QGate.control_qubits | ( | self | ) |
control_qubits(self: core.core.QGate) -> list[int]
Get the control qubits for this gate.
QGate pyqpanda3.core.core.QGate.dagger | ( | self | ) |
dagger(self: core.core.QGate) -> core.core.QGate
Get the adjoint (dagger) of this gate.
GateType pyqpanda3.core.core.QGate.gate_type | ( | self | ) |
gate_type(self: core.core.QGate) -> core.core.GateType
Get the type of this gate.
bool pyqpanda3.core.core.QGate.is_dagger | ( | self | ) |
is_dagger(self: core.core.QGate) -> bool
Check if this gate is a dagger.
numpy.ndarray[numpy.complex128[m, n]] pyqpanda3.core.core.QGate.matrix | ( | self, | |
bool | expanded = ... ) |
matrix(self: core.core.QGate, expanded: bool = False) -> numpy.ndarray[numpy.complex128[m, n]]
Get the matrix representation of this gate.
expanded | Whether to return the expanded matrix. |
str pyqpanda3.core.core.QGate.name | ( | self | ) |
list[float] pyqpanda3.core.core.QGate.parameters | ( | self | ) |
parameters(self: core.core.QGate) -> list[float]
Get the parameters of this gate.
QGate pyqpanda3.core.core.QGate.power | ( | self, | |
float | k ) |
power(self: core.core.QGate, k: float) -> core.core.QGate
Get this gate raised to a power.
k | The exponent to raise this gate to. |
list[int] pyqpanda3.core.core.QGate.qubits | ( | self | ) |
qubits(self: core.core.QGate) -> list[int]
Get the target qubits.
int pyqpanda3.core.core.QGate.qubits_num | ( | self | ) |
qubits_num(self: core.core.QGate) -> int
Get the number of qubits that this gate acts on.
QGate pyqpanda3.core.core.QGate.remap | ( | self, | |
list[int] | arg0 ) |
remap(self: core.core.QGate, arg0: list[int]) -> core.core.QGate
remap the qubits of this gate.
None pyqpanda3.core.core.QGate.set_parameters | ( | self, | |
list[float] | params ) |
set_parameters(self: core.core.QGate, params: list[float]) -> None
Set the parameters for this gate.
params | A vector of parameters to set. |
list[int] pyqpanda3.core.core.QGate.target_qubits | ( | self | ) |
target_qubits(self: core.core.QGate) -> list[int]
Get the target qubits for this gate.