Skip to content

Conversation

@arnavk23
Copy link

  • Add Toffoli/CCZ identifiers ("Tof", "Too", "Toffoli", "CCX", "CCZ") to MULTI_CONTROLLED_GATES in gates.jl
  • Allow multi-qubit elementary gate strings (>=3 qubits) in _catch_input_gate_errors in data.jl when the gate type is a recognized multi-controlled gate
  • Handle multi-qubit elementary names in unitary(...) by delegating to QCO.multi_controlled_gate:
    map Toffoli/CCX/Tof/Too -> controlled X (multi-controlled X)
    map CCZ -> controlled Z (multi-controlled Z)
  • Add tests in gates_tests.jl validating Tof_1_2_3 and Toffoli_1_2_3 produce the Toffoli matrix

Closes #70

@arnavk23
Copy link
Author

@harshangrjn please review this pr.

@harshangrjn
Copy link
Owner

@harshangrjn please review this pr.

Thank you @arnavk23! There are a few PRs pending, but I’ll get to this one soon.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.91%. Comparing base (1b66c56) to head (c3fd2df).

Files with missing lines Patch % Lines
src/data.jl 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
- Coverage   96.06%   95.91%   -0.16%     
==========================================
  Files          13       13              
  Lines        1752     1761       +9     
==========================================
+ Hits         1683     1689       +6     
- Misses         69       72       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arnavk23
Copy link
Author

arnavk23 commented Dec 2, 2025

@harshangrjn please review this pr.

Thank you @arnavk23! There are a few PRs pending, but I’ll get to this one soon.

A reminder for the same.

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

Successfully merging this pull request may close these issues.

Toffoli gates as elementary gates

2 participants