| 152 | static const long dims = gate_traits<uf_gate>::dims; |
| 153 | |
| 154 | const qc_scalar_type operator() (long r, long c) const |
| 155 | { |
| 156 | unsigned long output = c; |
| 157 | // if the input control bit is set |
| 158 | if (is_key(output>>1)) |
| 159 | { |
| 160 | output = output^0x1; |
| 161 | } |
| 162 | |
| 163 | if ((unsigned long)r == output) |
| 164 | return 1; |
| 165 | else |
| 166 | return 0; |
| 167 | } |
| 168 | |
| 169 | template <typename exp> |
| 170 | qc_scalar_type compute_state_element ( |