List of all members | Public Member Functions | Public Attributes
quantum_costs Struct Reference

Calculates the quantum costs. More...

Public Member Functions

 quantum_costs ()
 Standard constructor. More...
 
cost_t operator() (const gate &g, unsigned lines) const
 Returns the quantum costs for gate g. More...
 

Public Attributes

int controls_offset
 Offset for control lines. More...
 

Detailed Description

Calculates the quantum costs.

This costs class calculates the quantum costs. Thereby known optimizations for gates with few control lines or for gates with empty lines are considered.

See Also
Cost Functions
Author
RevKit
Since
1.0

Constructor & Destructor Documentation

Standard constructor.

Initializes default values

Author
RevKit
Since
1.1

Member Function Documentation

cost_t operator() ( const gate g,
unsigned  lines 
) const

Returns the quantum costs for gate g.

Parameters
gGate
linesNumber of lines in the circuit
Returns
Quantum Costs for gate g
Author
RevKit
Since
1.0

Member Data Documentation

int controls_offset

Offset for control lines.

With this parameter the number of controls can be modified without changing the gate. This enables hypothetical costs calculations.

Note, that the offset is adjusted if it leads to impossible gates such as negative number of control lines or too many control lines for the existing gates.

The default value is 0

Author
RevKit
Since
1.1

The documentation for this struct was generated from the following file:

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1