diff --git a/graphix_qasm_parser/parser.py b/graphix_qasm_parser/parser.py index 754f0e0..74ff7d9 100644 --- a/graphix_qasm_parser/parser.py +++ b/graphix_qasm_parser/parser.py @@ -459,7 +459,7 @@ def _u3( "cz": # https://openqasm.com/language/standard_library.html#cz _Gate( qubit_count=2, - instructions=(Instruction.CZ(targets=(0, 1)),), + instructions=(Instruction.CZ(control=0, target=1),), ), "swap": # https://openqasm.com/language/standard_library.html#swap _Gate( diff --git a/tests/test_parser.py b/tests/test_parser.py index 4fbcf2a..a0f389d 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -95,7 +95,8 @@ def test_parse_all_instructions() -> None: # noqa: PLR0915 assert instruction.control == 0 instruction = next(iterator) assert isinstance(instruction, Instruction.CZ) - assert instruction.targets == (0, 1) + assert instruction.target == 1 + assert instruction.control == 0 instruction = next(iterator) assert isinstance(instruction, Instruction.SWAP) assert instruction.targets == (0, 1)