qml.labs.resource_estimation

This module contains experimental features for resource estimation.

Warning

This module is experimental. Frequent changes will occur, with no guarantees of stability or backwards compatibility.

Resource Estimation Base Classes:

Resources([num_wires, num_gates, gate_types])

Contains attributes which store key resources such as number of gates, number of wires, and gate types.

CompressedResourceOp(op_type, params[, name])

Instantiate the light weight class corresponding to the operator type and parameters.

ResourceOperator()

Abstract class that defines the methods a PennyLane Operator must implement in order to be used for resource estimation.

Resource Object Functions:

add_in_series(first, other[, in_place])

Add two resources assuming the circuits are executed in series.

add_in_parallel(first, other[, in_place])

Add two resources assuming the circuits are executed in parallel.

mul_in_series(first, scalar[, in_place])

Multiply the resources by a scalar assuming the circuits are executed in series.

mul_in_parallel(first, scalar[, in_place])

Multiply the resources by a scalar assuming the circuits are executed in parallel.

substitute(initial_resources, gate_name, ...)

Replaces a specified gate in a Resources object with the contents of another Resources object.

Operators

ResourceCCZ(wires[, id])

Resource class for the CCZ gate.

ResourceCH(wires[, id])

Resource class for the CH gate.

ResourceCNOT(wires[, id])

Resource class for the CNOT gate.

ResourceControlledPhaseShift(phi, wires[, id])

Resource class for the ControlledPhaseShift gate.

ResourceCRot(phi, theta, omega, wires[, id])

Resource class for the CRot gate.

ResourceCRX(phi, wires[, id])

Resource class for the CRX gate.

ResourceCRY(phi, wires[, id])

Resource class for the CRY gate.

ResourceCRZ(phi, wires[, id])

Resource class for the CRZ gate.

ResourceCSWAP(wires[, id])

Resource class for the CSWAP gate.

ResourceCY(wires[, id])

Resource class for the CY gate.

ResourceCZ(wires[, id])

Resource class for the CZ gate.

ResourceDoubleExcitation(phi, wires[, id])

Resource class for the DoubleExcitation gate.

ResourceFermionicSWAP(phi, wires[, id])

Resource class for the FermionicSWAP gate.

ResourceGlobalPhase(phi[, wires, id])

Resource class for the GlobalPhase gate.

ResourceHadamard(wires[, id])

Resource class for the Hadamard gate.

ResourceIdentity([wires, id])

Resource class for the Identity gate.

ResourceIsingXX(phi, wires[, id])

Resource class for the IsingXX gate.

ResourceIsingXY(phi, wires[, id])

Resource class for the IsingXY gate.

ResourceIsingYY(phi, wires[, id])

Resource class for the IsingYY gate.

ResourceIsingZZ(phi, wires[, id])

Resource class for the IsingZZ gate.

ResourceMultiControlledX([control_wires, ...])

Resource class for the MultiControlledX gate.

ResourceMultiRZ(theta, wires[, id])

Resource class for the MultiRZ gate.

ResourcePauliRot(theta, pauli_word, wires[, id])

Resource class for the PauliRot gate.

ResourcePhaseShift(phi, wires[, id])

Resource class for the PhaseShift gate.

ResourcePSWAP(phi, wires[, id])

Resource class for the PSWAP gate.

ResourceRot(phi, theta, omega, wires[, id])

Resource class for the Rot gate.

ResourceRX(phi, wires[, id])

Resource class for the RX gate.

ResourceRY(phi, wires[, id])

Resource class for the RY gate.

ResourceRZ(phi, wires[, id])

Resource class for the RZ gate.

ResourceS(*params[, wires, id])

Resource class for the S gate.

ResourceSingleExcitationMinus(phi, wires[, id])

Resource class for the SingleExcitationMinus gate.

ResourceSingleExcitationPlus(phi, wires[, id])

Resource class for the SingleExcitationPlus gate.

ResourceSWAP(*params[, wires, id])

Resource class for the SWAP gate.

ResourceT(*params[, wires, id])

Resource class for the T gate.

ResourceToffoli(wires[, id])

Resource class for the Toffoli gate.

ResourceX(wires[, id])

Resource class for the X gate.

ResourceY(wires[, id])

Resource class for the Y gate.

ResourceZ(wires[, id])

Resource class for the Z gate.

Symbolic Operators

ResourceAdjoint([base, id])

Resource class for the Adjoint symbolic operation.

ResourceControlled(base, control_wires[, ...])

Resource class for the Controlled symbolic operation.

ResourcePow([base, z, id])

Resource class for the Pow symbolic operation.

Templates

ResourceQFT(wires[, id])

Resource class for QFT.

Tracking Resources

get_resources(obj[, gate_set, config])

Obtain the resources from a quantum circuit or operation in terms of the gates provided in the gate_set.

Exceptions

ResourcesNotDefined

Exception to be raised when a ResourceOperator does not implement _resource_decomp