torchquantum.layers#
Layers#
|
Initializes a QuantumModuleFromOps instance. |
|
Rotation rx on all qubits The rotation angle is a parameter of each rotation gate One potential optimization is to compute the unitary of all gates together. |
|
Quantum module that applies the same quantum operation to all wires of a quantum device, where the parameters of the operation are obtained from a classical input. |
|
Quantum module that applies the same fixed quantum operation to all wires of a quantum device. |
|
Quantum module that applies a two-qubit quantum operation to adjacent pairs of wires in a quantum device. |
|
Quantum module that represents a random layer of quantum operations applied to specified wires. |
|
Random layer with a wide range of quantum gate types. |
|
Quantum layer applying the same single-qubit operation to all wires. |
|
|
|
Quantum layer applying the same two-qubit operation to all pairs of adjacent wires. |
|
Quantum layer applying the same two-qubit operation in a butterfly pattern. |
alias of |
|
|
Quantum layer with a controlled-X (CX) gate applied to two specified wires. |
|
Quantum layer with a sequence of CX gates applied to three specified wires. |
|
Quantum layer with a sequence of SWAP gates applied to two specified pairs of wires. |
|
Layer template with RXYZCX blocks. |
|