Asserts two circuits have the same unitary up to a final permuation of qubits.

actual A circuit computed by some code under test.
expected The circuit that should have been computed.
qubit_map the permutation of qubits from the beginning to the end of the circuit.

ValueError if 'qubit_map' is not a mapping from the qubits in 'actual' to themselves.
ValueError if 'qubit_map' does not have the same set of keys and values.