In several places in the OpenQL compiler, gates are created by calling the gate-specific built-in constructor directly instead of using the gate() interface. The latter is more general and allows configuring the gate in the configuration file. As last resort, gate() allocates the gate using the default constructor inside the kernel functionadd_default_gate_if_available when the option use_default_gates is on using the old method (such as c.push_back(new ql::rz(qubit,angle))).
But to make creating gates using gate() possible, the respective gates should be defined in the configuration file or the option use_default_gates should be on.
I propose: adding gates such as rx, ry and rz to the configuration files that are used to configure tests using rx, ry, rz; similarly for other gates.
Replace code such as (but not in add_default_gate_if_available since that is the default way):
In several places in the OpenQL compiler, gates are created by calling the gate-specific built-in constructor directly instead of using the gate() interface. The latter is more general and allows configuring the gate in the configuration file. As last resort, gate() allocates the gate using the default constructor inside the kernel function
add_default_gate_if_available
when the option use_default_gates is on using the old method (such asc.push_back(new ql::rz(qubit,angle))
).But to make creating gates using gate() possible, the respective gates should be defined in the configuration file or the option use_default_gates should be on.
I propose: adding gates such as rx, ry and rz to the configuration files that are used to configure tests using rx, ry, rz; similarly for other gates.
Replace code such as (but not in
add_default_gate_if_available
since that is the default way):by