Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an operator based unit test #10

Open
adekusar-drl opened this issue May 29, 2024 · 0 comments
Open

Add an operator based unit test #10

adekusar-drl opened this issue May 29, 2024 · 0 comments

Comments

@adekusar-drl
Copy link
Collaborator

What is the expected enhancement?

Add a unit test that validates the output of the algorithm by comparing the original matrix of a circuit and the matrix of the transpiled circuit.
Pseudo code of the test

qc = QuantumCircuit(10)
qc.mcx(range(8), 9)

tqc = transpile(qc)

# apply qubit permutations based on layouts of the transpiled circuit
# .....

np.assert_almost_equal(Operator(qc).data, Operator(tqc).data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant