Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Rust representation for most controlled gates (Qiskit#12659)
* Add C3X (MCX), extend rust tests to multi-controlled gates. * Add macro to generate multi-controlled gates. Add CU, CU1, CU3, C3SX, C4X, CCZ. * Kill C4XGate * Finish adding gates, add circuit construction methods when possible. * Add import paths, fix drawer test. * Establish CGates with non-default control states as non-standard in circuit_instruction.rs. Add unit test. * Fix merge conflicts * Apply macro on missing gates * Add RCCX gate and RC3X (RCCCX) gate. * Make equivalence tests more explicit * Fix lint * Modify circuit methods for consistency * Fix default ctrl state for 3q+ gates, add test for CCZ * Apply comments from Matt's code review * Fix ctrl_state logic * Rename c3x to mcx? * Brackets didn't match explanation * Make sure controlled test doesn't use custom ControlledGate instances. * Rename c4x to mcx in Rust space. * Return PyResult rather than panic on error * Add suggestion from Matt's code review Co-authored-by: Matthew Treinish <[email protected]> --------- Co-authored-by: John Lapeyre <[email protected]> Co-authored-by: Matthew Treinish <[email protected]>
- Loading branch information