Simulator.transpile constructor
Simulator.transpile()
Implementation
Simulator.transpile(this.qc) {
_dim = pow(2, qc.qbits).toInt();
unitary = Matrix.identity(_dim, _dim);
for (Gate gate in qc.gates) {
Matrix unitaryForGate = _getUnitaryForGate(gate.getQbits(), gate.getUnitary());
unitary = unitaryForGate.mul(unitary);
}
}