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, QProg arg0) |
init(*args, **kwargs) Overloaded function. | |
None | __init__ (self, str originir_src, bool is_file=...) |
init(*args, **kwargs) Overloaded function. | |
None | __init__ (self, QCircuit node) |
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 | append (self, QProg prog) |
append(*args, **kwargs) Overloaded function. | |
None | append (self, measure) |
append(*args, **kwargs) Overloaded function. | |
list[int] | cbits (self) |
cbits(self: core.QProg) -> list[int] | |
int | cbits_num (self) |
cbits_num(self: core.QProg) -> int | |
None | clear (self) |
clear(self: core.QProg) -> None | |
dict[str, int] | count_ops (self, bool only_q2=...) |
count_ops(self: core.QProg, only_q2: bool = False) -> dict[str, int] | |
int | depth (self, bool only_q2=...) |
depth(self: core.QProg, only_q2: bool = False) -> int | |
QProg | flatten (self) |
flatten(self: core.QProg) -> core.QProg | |
list[QGate] | gate_operations (self, bool only_q2=...) |
gate_operations(self: core.QProg, only_q2: bool = False) -> list[core.QGate] | |
get_measure_nodes (self, *args, **kwargs) | |
get_measure_nodes(self: core.QProg) -> list[Union[core.QGate, core.QCircuit, QPanda::Karus, QPanda::QMeasure, core.QProg]] | |
str | name (self) |
name(self: core.QProg) -> str | |
Any | operations (self, QProgNode) |
operations(self: core.QProg) -> list[Union[core.QGate, core.QCircuit, QPanda::Karus, QPanda::QMeasure, core.QProg]] | |
list[int] | qubits (self) |
qubits(self: core.QProg) -> list[int] | |
int | qubits_num (self) |
qubits_num(self: core.QProg) -> int | |
QCircuit | to_circuit (self) |
to_circuit(self: core.QProg) -> core.QCircuit | |
QProg | __lshift__ (self, QGate arg0) |
lshift(*args, **kwargs) Overloaded function. | |
QProg | __lshift__ (self, QCircuit arg0) |
lshift(*args, **kwargs) Overloaded function. | |
QProg | __lshift__ (self, QProg arg0) |
lshift(*args, **kwargs) Overloaded function. | |
QProg | __lshift__ (self, arg0) |
lshift(*args, **kwargs) Overloaded function. | |
None pyqpanda3.core.QProg.__init__ | ( | self | ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QProg.
Constructor for QProg with a specified number of qubits.
qubits_num | Number of qubits in the program. |
Copy constructor for QProg.
prog | The QProg instance to copy. |
Constructor for QProg from a source string or file.
originir_src | The source string or file path. |
is_file | Boolean indicating if the source is a file. |
Constructor for QProg from a QCircuit.
node | The QCircuit instance to append to the program. |
None pyqpanda3.core.QProg.__init__ | ( | self, | |
int | qubits_num ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QProg.
Constructor for QProg with a specified number of qubits.
qubits_num | Number of qubits in the program. |
Copy constructor for QProg.
prog | The QProg instance to copy. |
Constructor for QProg from a source string or file.
originir_src | The source string or file path. |
is_file | Boolean indicating if the source is a file. |
Constructor for QProg from a QCircuit.
node | The QCircuit instance to append to the program. |
None pyqpanda3.core.QProg.__init__ | ( | self, | |
QProg | arg0 ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QProg.
Constructor for QProg with a specified number of qubits.
qubits_num | Number of qubits in the program. |
Copy constructor for QProg.
prog | The QProg instance to copy. |
Constructor for QProg from a source string or file.
originir_src | The source string or file path. |
is_file | Boolean indicating if the source is a file. |
Constructor for QProg from a QCircuit.
node | The QCircuit instance to append to the program. |
None pyqpanda3.core.QProg.__init__ | ( | self, | |
str | originir_src, | ||
bool | is_file = ... ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QProg.
Constructor for QProg with a specified number of qubits.
qubits_num | Number of qubits in the program. |
Copy constructor for QProg.
prog | The QProg instance to copy. |
Constructor for QProg from a source string or file.
originir_src | The source string or file path. |
is_file | Boolean indicating if the source is a file. |
Constructor for QProg from a QCircuit.
node | The QCircuit instance to append to the program. |
None pyqpanda3.core.QProg.__init__ | ( | self, | |
QCircuit | node ) |
init(*args, **kwargs) Overloaded function.
Default constructor for QProg.
Constructor for QProg with a specified number of qubits.
qubits_num | Number of qubits in the program. |
Copy constructor for QProg.
prog | The QProg instance to copy. |
Constructor for QProg from a source string or file.
originir_src | The source string or file path. |
is_file | Boolean indicating if the source is a file. |
Constructor for QProg from a QCircuit.
node | The QCircuit instance to append to the program. |
QProg pyqpanda3.core.QProg.__lshift__ | ( | self, | |
arg0 ) |
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
lshift(*args, **kwargs) Overloaded function.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
Use << to append a node to the prog.
None pyqpanda3.core.QProg.append | ( | self, | |
measure ) |
append(*args, **kwargs) Overloaded function.
None pyqpanda3.core.QProg.append | ( | self, | |
QCircuit | circuit ) |
append(*args, **kwargs) Overloaded function.
None pyqpanda3.core.QProg.append | ( | self, | |
QGate | gate ) |
append(*args, **kwargs) Overloaded function.
None pyqpanda3.core.QProg.append | ( | self, | |
QProg | prog ) |
append(*args, **kwargs) Overloaded function.
list[int] pyqpanda3.core.QProg.cbits | ( | self | ) |
cbits(self: core.QProg) -> list[int]
Get the classical bit indices used in the program.
int pyqpanda3.core.QProg.cbits_num | ( | self | ) |
cbits_num(self: core.QProg) -> int
Get the number of classical bits used in the program.
None pyqpanda3.core.QProg.clear | ( | self | ) |
clear(self: core.QProg) -> None
Clear all operations in the program.
dict[str, int] pyqpanda3.core.QProg.count_ops | ( | self, | |
bool | only_q2 = ... ) |
count_ops(self: core.QProg, only_q2: bool = False) -> dict[str, int]
Count the operations in the program.
only_q2 | Boolean to consider only 2-qubit gates. |
int pyqpanda3.core.QProg.depth | ( | self, | |
bool | only_q2 = ... ) |
depth(self: core.QProg, only_q2: bool = False) -> int
Get the depth of the program.
only_q2 | Boolean to consider only 2-qubit gates. |
QProg pyqpanda3.core.QProg.flatten | ( | self | ) |
flatten(self: core.QProg) -> core.QProg
Flatten the program into a linear representation.
list[QGate] pyqpanda3.core.QProg.gate_operations | ( | self, | |
bool | only_q2 = ... ) |
gate_operations(self: core.QProg, only_q2: bool = False) -> list[core.QGate]
Get all gate operations in the program.
only_q2 | Boolean to filter only 2-qubit gates. |
pyqpanda3.core.QProg.get_measure_nodes | ( | self, | |
* | args, | ||
** | kwargs ) |
get_measure_nodes(self: core.QProg) -> list[Union[core.QGate, core.QCircuit, QPanda::Karus, QPanda::QMeasure, core.QProg]]
Get all measurement nodes in the program.
str pyqpanda3.core.QProg.name | ( | self | ) |
Any pyqpanda3.core.QProg.operations | ( | self, | |
QProgNode ) |
operations(self: core.QProg) -> list[Union[core.QGate, core.QCircuit, QPanda::Karus, QPanda::QMeasure, core.QProg]]
Get all operations in the program.
list[int] pyqpanda3.core.QProg.qubits | ( | self | ) |
qubits(self: core.QProg) -> list[int]
Get the qubit indices used in the program.
int pyqpanda3.core.QProg.qubits_num | ( | self | ) |
qubits_num(self: core.QProg) -> int
Get the number of qubits used in the program.
QCircuit pyqpanda3.core.QProg.to_circuit | ( | self | ) |
to_circuit(self: core.QProg) -> core.QCircuit
Convert the program to a QCircuit.