pyqpanda.utils
QPanda Utilities
Copyright (C) Origin Quantum 2017-2018
Licensed Under Apache Licence 2.0
Functions
|
Apply single gates to all qubits in qubit_list |
|
Apply a single gate to a qubit |
|
Measure qubits mapping to cbits |
|
get quantum state fidelity |
Module Contents
- pyqpanda.utils.single_gate_apply_to_all(gate, qubit_list)[源代码]
Apply single gates to all qubits in qubit_list QGate(callback), list<Qubit> -> QCircuit
- Args:
gate : the quantum gate need to apply to all qubits qubit_list : qubit list
- Returns:
quantum circuit
- pyqpanda.utils.single_gate(gate, qubit, angle=None)[源代码]
Apply a single gate to a qubit
Gate(callback), Qubit, angle(optional) -> QGate
- Args:
gate : the quantum gate need to apply qubit qubit : single qubit angle : theta for rotation gate
- Returns:
quantum circuit
Raises:
- "
run_fail: An error occurred in construct single gate node