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... | |
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.
quantum_costs | ( | ) |
Standard constructor.
Initializes default values
Returns the quantum costs for gate g
.
g | Gate |
lines | Number of lines in the circuit |
g
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