torchquantum.operators#

Classes#

WiresEnum(value)

Integer enumeration class to represent the number of wires an operation acts on.

NParamsEnum(value)

Integer enumeration class to represent the number of wires an operation acts on

AllWires

Integer enumeration class to represent the number of wires an operation acts on.

AnyWires

Integer enumeration class to represent the number of wires an operation acts on.

Operator([has_params, trainable, ...])

The class for quantum operators.

Observable([has_params, trainable, ...])

Class for Observables.

Operation([has_params, trainable, ...])

_summary_

DiagonalOperation([has_params, trainable, ...])

Class for Diagonal Operation.

Hadamard([has_params, trainable, ...])

Class for Hadamard Gate.

SHadamard([has_params, trainable, ...])

Class for SHadamard Gate.

PauliX([has_params, trainable, init_params, ...])

Class for Pauli X Gate.

PauliY([has_params, trainable, init_params, ...])

Class for Pauli Y Gate.

PauliZ([has_params, trainable, init_params, ...])

Class for Pauli Z Gate.

I([has_params, trainable, init_params, ...])

Class for Identity Gate.

S([has_params, trainable, init_params, ...])

Class for S Gate.

T([has_params, trainable, init_params, ...])

Class for T Gate.

SX([has_params, trainable, init_params, ...])

Class for SX Gate.

CNOT([has_params, trainable, init_params, ...])

Class for CNOT Gate.

CZ([has_params, trainable, init_params, ...])

Class for CZ Gate.

CY([has_params, trainable, init_params, ...])

Class for CY Gate.

RX([has_params, trainable, init_params, ...])

Class for RX Gate.

RY([has_params, trainable, init_params, ...])

Class for RY Gate.

RZ([has_params, trainable, init_params, ...])

Class for RZ Gate.

RXX([has_params, trainable, init_params, ...])

Class for RXX Gate.

RYY([has_params, trainable, init_params, ...])

Class for RYY Gate.

RZZ([has_params, trainable, init_params, ...])

Class for RZZ Gate.

RZX([has_params, trainable, init_params, ...])

Class for RZX Gate.

SWAP([has_params, trainable, init_params, ...])

Class for SWAP Gate.

SSWAP([has_params, trainable, init_params, ...])

Class for SSWAP Gate.

CSWAP([has_params, trainable, init_params, ...])

Class for CSWAP Gate.

Toffoli([has_params, trainable, ...])

Class for Toffoli Gate.

PhaseShift([has_params, trainable, ...])

Class for PhaseShift Gate.

Rot([has_params, trainable, init_params, ...])

Class for Rotation Gate.

MultiRZ([has_params, trainable, ...])

Class for Multi-qubit RZ Gate.

CRX([has_params, trainable, init_params, ...])

Class for Controlled Rotation X gate.

CRY([has_params, trainable, init_params, ...])

Class for Controlled Rotation Y gate.

CRZ([has_params, trainable, init_params, ...])

Class for Controlled Rotation Z gate.

CRot([has_params, trainable, init_params, ...])

Class for Controlled Rotation gate.

U1([has_params, trainable, init_params, ...])

Class for Controlled Rotation Y gate.

U2([has_params, trainable, init_params, ...])

Class for U2 gate.

U3([has_params, trainable, init_params, ...])

Class for U3 gate.

CU1([has_params, trainable, init_params, ...])

Class for controlled U1 gate.

CU2([has_params, trainable, init_params, ...])

Class for controlled U2 gate.

CU3([has_params, trainable, init_params, ...])

Class for Controlled U3 gate.

QubitUnitary([has_params, trainable, ...])

Class for controlled Qubit Unitary gate.

QubitUnitaryFast([has_params, trainable, ...])

Class for fast implementation of controlled Qubit Unitary gate.

TrainableUnitary([has_params, trainable, ...])

Class for TrainableUnitary Gate.

TrainableUnitaryStrict([has_params, ...])

Class for Strict Unitary matrix gate.

MultiCNOT([has_params, trainable, ...])

Class for Multi qubit CNOT gate.

MultiXCNOT([has_params, trainable, ...])

Class for Multi qubit XCNOT gate.

Reset([has_params, trainable, init_params, ...])

Class for Reset gate.

SingleExcitation([has_params, trainable, ...])

Class for SingleExcitation gate.

ECR([has_params, trainable, init_params, ...])

Class for Echoed Cross Resonance Gate.