qiskit/test/python/circuit
Kevin Hartman 8ec4c9cf58
Unify identifer handling of `Var` and `Stretch` in `DAGCircuit` (#14000)
* s

* Rename BitData to ObjectRegistry.

* s

* Update tests for new error string.

This is only really a user-facing error message when
working with DAGCircuit, since QuantumCircuit first
checks if the bits being added to it are duplicates.
And, in the case of DAGCircuit, the previous error
message was already unfriendly:

ValueError: Existing bit ShareableQubit(Owned { register: OwningRegisterInfo { name: "q16", size: 2, subclass: QUBIT }, index: 0 }) cannot be re-added in strict mode.

* Fix comment in commutation checker.

* Fix lint.

* Address review comments.

* Unify identifier handling in DAG.

Tracks stretches the same way we track vars.
Also happens to fix a bug in DAG equality where
order mattered between stretch captures (it should
never have). And, fixes a serialization bug with
stretches.

* Fix tests.

* Improve testing and fix bug.

* Add pickle and deepcopy tests for stretches.

Also fix lint.

* Undo breaking name change.

* Add release note.

* Fix lint.

* Fix Python lint.

* Address review comments.
2025-04-10 18:38:46 +00:00
..
classical Don't reject non-const duration in constructors. (#14009) 2025-03-27 12:54:52 +00:00
library use XXPlusYYGate in excitation_preserving (#14128) 2025-04-06 12:49:30 +00:00
__init__.py Remove coding: utf-8 per PEP 3120 (#4914) 2020-08-12 08:29:16 -04:00
gate_utils.py Use singletons for standard library unparameterized, non-controlled gates (#10314) 2023-09-19 19:41:30 +00:00
test_annotated_operation.py Improve annotated plugin (#13916) 2025-04-03 12:32:49 +00:00
test_bit.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_circuit_data.py Refactor `BitData` to `ObjectRegistry`. (#13985) 2025-03-11 18:16:41 +00:00
test_circuit_find_bit.py Add missing `__getitem__` and other attributes to `BitLocations` (#13997) 2025-03-12 18:26:40 +00:00
test_circuit_load_from_qpy.py Fix qpy for `MCMTGate` (#14096) 2025-03-28 08:34:47 +00:00
test_circuit_multi_registers.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_circuit_operations.py Create a secure internal path for custom prefixes in registers. (#14005) 2025-03-18 15:22:33 +00:00
test_circuit_properties.py Remove calibrations APIs and related functionality (#13861) 2025-03-02 16:40:07 +00:00
test_circuit_qasm.py Minor fixes/improvements to some MCX synthesis methods (#14093) 2025-03-27 12:39:05 +00:00
test_circuit_registers.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_circuit_vars.py Unify identifer handling of `Var` and `Stretch` in `DAGCircuit` (#14000) 2025-04-10 18:38:46 +00:00
test_commutation_checker.py Use average gate fidelity in the commutation checker (#13874) 2025-03-06 00:03:15 +00:00
test_compose.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_control_flow.py [Stretch] Add `stretch` variable support to `QuantumCircuit`. (#13852) 2025-03-06 06:50:44 +00:00
test_control_flow_builders.py [Stretch] Support stretch and duration expressions for `Delay` instruction. (#13853) 2025-03-06 19:39:42 +00:00
test_controlled_gate.py Add explicit tests for MCX synthesis algorithms (#13961) 2025-03-20 07:58:14 +00:00
test_delay.py Fix pickle and repr for Duration. (#14174) 2025-04-07 23:38:42 +00:00
test_diagonal_gate.py Remove `assemble` and `assembler` module (#13748) 2025-02-05 09:26:42 +00:00
test_equivalence.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_extensions_standard.py Remove the `classical_function` module and all `tweedledum`-related code (#13815) 2025-02-27 15:54:54 +00:00
test_gate_definitions.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_gate_power.py Adding annotated argument to power methods (#12101) 2024-04-23 18:56:37 +00:00
test_hamiltonian_gate.py Remove deprecated `BackendV1` elements, including base class, `providers.models` and `qobj` modules (#13793) 2025-03-05 23:11:24 +00:00
test_identifiers_circuits.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_initializer.py Remove `assemble` and `assembler` module (#13748) 2025-02-05 09:26:42 +00:00
test_instruction_repeat.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_instructions.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_isometry.py Fix `UnitaryGate.repeat()` method (#12986) 2024-08-26 08:17:49 +00:00
test_operation.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_parameters.py Remove calibrations APIs and related functionality (#13861) 2025-03-02 16:40:07 +00:00
test_piecewise_polynomial.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_random_circuit.py Add random circuit with graph (#12474) 2025-04-08 20:10:15 +00:00
test_register.py Move `Bit` and `Register` to live in Rust space (#13860) 2025-03-07 21:31:52 +00:00
test_registerless_circuit.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_rust_equivalence.py Add inverse function to StandardGate in rust (#13168) 2024-10-08 17:24:18 +00:00
test_scheduled_circuit.py Fix checking for deprecation warnings to use `assertWarns()` (#14145) 2025-04-01 08:46:22 +00:00
test_singleton.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_store.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_templates.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_tensor.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_tools.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_twirling.py Fix registering `global_phase` parameters when creating `CircuitData` (#13538) 2024-12-09 12:34:15 +00:00
test_uc.py Quantum Multiplexer Simplification (#13099) 2024-11-14 07:52:32 +00:00
test_ucx_y_z.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_uniform_superposition_gate.py Add Uniform State Preparation (#12112) 2024-07-03 06:47:55 +00:00
test_unitary.py Remove `assemble` and `assembler` module (#13748) 2025-02-05 09:26:42 +00:00