Fixed bug in 1-qubit basis determination
Fixed bug in circuit resolution