QPanda3
0.1.0
Supported by OriginQ
|
Public Member Functions | |
None | __init__ (self) |
init(*args, **kwargs) Overloaded function. | |
None | __init__ (self, int qubits_num) |
init(*args, **kwargs) Overloaded function. | |
None | __init__ (self, QCircuit arg0) |
init(*args, **kwargs) Overloaded function. | |
None | append (self, QGate gate) |
append(*args, **kwargs) Overloaded function. | |
None | append (self, QCircuit circuit) |
append(*args, **kwargs) Overloaded function. | |
None | clear (self) |
clear(self: core.QCircuit) -> None | |
None | clear_control (self) |
clear_control(self: core.QCircuit) -> None | |
QCircuit | control (self, list[int] qubits) |
control(self: core.QCircuit, qubits: list[int]) -> core.QCircuit | |
list[int] | control_qubits (self) |
control_qubits(self: core.QCircuit) -> list[int] | |
dict[str, int] | count_ops (self, bool only_q2=...) |
count_ops(self: core.QCircuit, only_q2: bool = False) -> dict[str, int] | |
QCircuit | dagger (self) |
dagger(self: core.QCircuit) -> core.QCircuit | |
int | depth (self, bool only_q2=...) |
depth(self: core.QCircuit, only_q2: bool = False) -> int | |
QCircuit | expand (self) |
expand(self: core.QCircuit) -> core.QCircuit | |
list[QGate] | gate_operations (self, bool only_q2=...) |
gate_operations(self: core.QCircuit, only_q2: bool = False) -> list[core.QGate] | |
int | get_register_size (self) |
get_register_size(self: core.QCircuit) -> int | |
bool | is_dagger (self) |
is_dagger(self: core.QCircuit) -> bool | |
str | name (self) |
name(self: core.QCircuit) -> str | |
int | num_2q_gate (self) |
num_2q_gate(self: core.QCircuit) -> int | |
list[QGate|QCircuit] | operations (self) |
operations(self: core.QCircuit) -> list[Union[core.QGate, core.QCircuit]] | |
Any | operations (self, QGateorQCircuit) |
operations(self: core.QCircuit) -> list[Union[core.QGate, core.QCircuit]] | |
list[int] | qubits (self) |
qubits(self: core.QCircuit) -> list[int] | |
None | set_name (self, str name) |
set_name(self: core.QCircuit, name: str) -> None | |
int | size (self) |
size(self: core.QCircuit) -> int | |
list[int] | target_qubits (self) |
target_qubits(self: core.QCircuit) -> list[int] | |
QCircuit | __lshift__ (self, QGate arg0) |
lshift(*args, **kwargs) Overloaded function. | |
QCircuit | __lshift__ (self, QCircuit arg0) |
lshift(*args, **kwargs) Overloaded function. | |
None pyqpanda3.core.QCircuit.__init__ | ( | self | ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QCircuit.
Constructor for QCircuit with a specified number of qubits.
qubits_num | Number of qubits in the circuit. |
Copy constructor for QCircuit.
circuit | The QCircuit instance to copy. |
None pyqpanda3.core.QCircuit.__init__ | ( | self, | |
int | qubits_num ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QCircuit.
Constructor for QCircuit with a specified number of qubits.
qubits_num | Number of qubits in the circuit. |
Copy constructor for QCircuit.
circuit | The QCircuit instance to copy. |
None pyqpanda3.core.QCircuit.__init__ | ( | self, | |
QCircuit | arg0 ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QCircuit.
Constructor for QCircuit with a specified number of qubits.
qubits_num | Number of qubits in the circuit. |
Copy constructor for QCircuit.
circuit | The QCircuit instance to copy. |
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the circuit.
Use << to append a node to the circuit.
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the circuit.
Use << to append a node to the circuit.
None pyqpanda3.core.QCircuit.append | ( | self, | |
QCircuit | circuit ) |
append(*args, **kwargs) Overloaded function.
Append a gate to the circuit.
The | QGate to append. |
Append a circuit to the circuit.
The | QCircuit to append. |
None pyqpanda3.core.QCircuit.append | ( | self, | |
QGate | gate ) |
append(*args, **kwargs) Overloaded function.
Append a gate to the circuit.
The | QGate to append. |
Append a circuit to the circuit.
The | QCircuit to append. |
None pyqpanda3.core.QCircuit.clear | ( | self | ) |
clear(self: core.QCircuit) -> None
Clear all operations in the circuit.
None pyqpanda3.core.QCircuit.clear_control | ( | self | ) |
clear_control(self: core.QCircuit) -> None
Clear all control qubits from this circuit.
QCircuit pyqpanda3.core.QCircuit.control | ( | self, | |
list[int] | qubits ) |
control(self: core.QCircuit, qubits: list[int]) -> core.QCircuit
Get the controlled version of this circuit.
qubits | A vector of control qubit indices. |
list[int] pyqpanda3.core.QCircuit.control_qubits | ( | self | ) |
control_qubits(self: core.QCircuit) -> list[int]
Get the control qubit indices.
dict[str, int] pyqpanda3.core.QCircuit.count_ops | ( | self, | |
bool | only_q2 = ... ) |
count_ops(self: core.QCircuit, only_q2: bool = False) -> dict[str, int]
Count the operations in the circuit.
only_q2 | Boolean to consider only 2-qubit gates. |
QCircuit pyqpanda3.core.QCircuit.dagger | ( | self | ) |
dagger(self: core.QCircuit) -> core.QCircuit
Get the dagger of the circuit.
int pyqpanda3.core.QCircuit.depth | ( | self, | |
bool | only_q2 = ... ) |
depth(self: core.QCircuit, only_q2: bool = False) -> int
Get the depth of the circuit.
only_q2 | Boolean to consider only 2-qubit gates. |
QCircuit pyqpanda3.core.QCircuit.expand | ( | self | ) |
list[QGate] pyqpanda3.core.QCircuit.gate_operations | ( | self, | |
bool | only_q2 = ... ) |
gate_operations(self: core.QCircuit, only_q2: bool = False) -> list[core.QGate]
Get all gate operations in the circuit.
only_q2 | Boolean to filter only 2-qubit gates. |
int pyqpanda3.core.QCircuit.get_register_size | ( | self | ) |
get_register_size(self: core.QCircuit) -> int
Get the size of the register.
bool pyqpanda3.core.QCircuit.is_dagger | ( | self | ) |
is_dagger(self: core.QCircuit) -> bool
Check if the circuit is a dagger circuit.
str pyqpanda3.core.QCircuit.name | ( | self | ) |
int pyqpanda3.core.QCircuit.num_2q_gate | ( | self | ) |
num_2q_gate(self: core.QCircuit) -> int
Get the number of 2-qubit gates in the circuit.
operations(self: core.QCircuit) -> list[Union[core.QGate, core.QCircuit]]
Get all operations in the circuit.
Any pyqpanda3.core.QCircuit.operations | ( | self, | |
QGateorQCircuit ) |
operations(self: core.QCircuit) -> list[Union[core.QGate, core.QCircuit]]
Get all operations in the circuit.
list[int] pyqpanda3.core.QCircuit.qubits | ( | self | ) |
qubits(self: core.QCircuit) -> list[int]
Get the qubit indices used in the circuit.
None pyqpanda3.core.QCircuit.set_name | ( | self, | |
str | name ) |
set_name(self: core.QCircuit, name: str) -> None
Set the name of the circuit.
name | The name to set. |
int pyqpanda3.core.QCircuit.size | ( | self | ) |
size(self: core.QCircuit) -> int
Get the number of operations in the circuit.
list[int] pyqpanda3.core.QCircuit.target_qubits | ( | self | ) |
target_qubits(self: core.QCircuit) -> list[int]
Get the target qubit indices.