QCTraceSimulator.GetMetric Method

Definition

Overloads

GetMetric<TOperation,TCaller>(String, OperationFunctor, OperationFunctor)

Returns the value of a given metric associated with an edge of the call graph.

GetMetric<TOperation>(String, OperationFunctor)

Returns the value of a given metric for a top level operation.

GetMetric<TOperation,TCaller>(String, OperationFunctor, OperationFunctor)

Returns the value of a given metric associated with an edge of the call graph.

public double GetMetric<TOperation,TCaller> (string metric, Microsoft.Quantum.Simulation.Core.OperationFunctor functor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body, Microsoft.Quantum.Simulation.Core.OperationFunctor callerFunctor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body);
override this.GetMetric : string * Microsoft.Quantum.Simulation.Core.OperationFunctor * Microsoft.Quantum.Simulation.Core.OperationFunctor -> double
Public Function GetMetric(Of TOperation, TCaller) (metric As String, Optional functor As OperationFunctor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body, Optional callerFunctor As OperationFunctor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body) As Double

Type Parameters

TOperation

The C# type corresponding to Q# operation for which the metric is requested.

TCaller

The C# type corresponding to the caller of the Q# operation for which the metric is requested.

Parameters

metric
System.String

The name of the metric requested for the specified call graph edge.

functor
Microsoft.Quantum.Simulation.Core.OperationFunctor

The functor specialization of the operation for which the metric is requested. If not specified, this defaults to the "body" variant.

callerFunctor
Microsoft.Quantum.Simulation.Core.OperationFunctor

The functor specialization of the caller of the operation for which the metric is requested. If not specified, this defaults to the "body" variant.

Returns

System.Double

Exceptions

System.Exception

Thrown when a given metric is not well-defined.

Remarks

For a more detailed discussion of metrics, statistics, call graph edges and operation specializations, see the Remarks section of the QCTraceSimulator class documentation.

Applies to

GetMetric<TOperation>(String, OperationFunctor)

Returns the value of a given metric for a top level operation.

public double GetMetric<TOperation> (string metric, Microsoft.Quantum.Simulation.Core.OperationFunctor functor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body);
override this.GetMetric : string * Microsoft.Quantum.Simulation.Core.OperationFunctor -> double
Public Function GetMetric(Of TOperation) (metric As String, Optional functor As OperationFunctor = Microsoft.Quantum.Simulation.Core.OperationFunctor.Body) As Double

Type Parameters

TOperation

The C# type corresponding to the Q# operation for which the metric is requested.

Parameters

metric
System.String

The name of the metric requested for the top level operation specified by TOperation

functor
Microsoft.Quantum.Simulation.Core.OperationFunctor

The functor (also called variant) of the operation for which the metric is requested. If not specified, this defaults to the "body" specialization.

Returns

System.Double

Exceptions

System.Exception

Thrown when a given metric is not well-defined.

Remarks

For a more detailed discussion of metrics, statistics, call graph edges and operation specializations, see the Remarks section of the QCTraceSimulator class documentation.

Applies to