Skip to content

Commit

Permalink
add error rates to test_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasLF committed Dec 15, 2023
1 parent 04c3fd2 commit 0686811
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/python/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ def test_calibration_from_file(example_circuit: QuantumCircuit) -> None:

def test_parameters(example_circuit: QuantumCircuit) -> None:
"""Test that parameters to compile are properly parsed and passed to the backend."""
arch = qmap.Architecture(3, {(0, 1), (1, 0), (1, 2), (2, 1)})
properties = qmap.Architecture.Properties()
properties.set_single_qubit_error(0, 'x', 0.01)
properties.set_single_qubit_error(1, 'x', 0.01)
properties.set_single_qubit_error(2, 'x', 0.01)
properties.set_two_qubit_error(0, 1, 0.02, 'cx')
properties.set_two_qubit_error(1, 0, 0.02, 'cx')
properties.set_two_qubit_error(1, 2, 0.02, 'cx')
properties.set_two_qubit_error(2, 1, 0.02, 'cx')
arch = qmap.Architecture(3, {(0, 1), (1, 0), (1, 2), (2, 1)}, properties)
visualizer = qmap.visualization.SearchVisualizer()
_, results = qmap.compile(
example_circuit,
Expand Down

0 comments on commit 0686811

Please sign in to comment.