There is a newer version of the record available.

Published August 18, 2026 | Version v0.4

Graphix

Description

Added

  • #476: Introduced new methods OpenGraph.extract_circuit, CliffordMap.to_tableau and new function graphix.circ_ext.compilation.cm_berg_pass. Circuit extraction can be done natively in Graphix.

  • #484: J & CZ transpilation.

    • Replaced Circuit.transpile() with a new approach based decomposing circuits into J & CZ gates.
    • Added Circuit.transpile_to_causal_flow() to produce CausalFlow using the same decomposition.
    • Added instruction.J class.
    • Added Circuit.transpile_j_to_rzh() method to prepare circuits with J gates for export to OpenQASM.
    • Added transpile argument to qasm3_exporter.circuit_to_qasm3 and qasm3_exporter.circuit_to_qasm3_lines, which defaults to true and applies Circuit.transpile_j_to_rzh and Circuit.transpile_measurements_to_z_axis methods.
    • The transpiler now returns TranspiledPattern or TranspiledFlow, instead of TranspileResult.
  • #490: Introduced new Instruction and Command namespace classes for instruction and command instantiation.

  • #505:

    • Added new methods XZCorrections.to_causal_flow and XZCorrections.to_gflow which subsume StandardizedPattern.extract_causal_flow and StandardizedPattern.extract_gflow.
    • Added new methods XZCorrections.to_bloch and XZCorrections.downcast_bloch.
  • #507: Introduced new methods PauliString.__str__, PauliString.from_str, PauliString.to_tableau, and PauliString.from_tableau.

  • #510

    • Added new attribute OpenGraph.output_cliffords
    • Added clifford abstract method to AbstractMeasurement. Implemented it for Plane and Axis.
  • #515:

    • Pattern.remove_local_clifford_commands transpiles MBQC+LC patterns into pure MBQC patterns.
    • Clifford.to_opengraph returns an open graph without local Cliffords that implements the given single-qubit Clifford gate.
  • #515, #519:

    • Pattern.reindex returns a pattern whose nodes have been re-indexed either by a supplied mapping or, by default, consecutively starting at 0.
    • Pattern.node_mapping returns a mapping that can be passed to Pattern.reindex, with flexibility for specifying how nodes are mapped.
  • #524: Added Statevec.draw and DensityMatrix.draw methods (and the underlying statevec_to_str and density_matrix_to_str functions) for pretty-printing states and density matrices in ASCII, Unicode, and LaTeX.

  • #526: Added new method XZCorrections.to_pauli_flow, which reconstructs a Pauli flow directly from XZ-corrections by solving the per-node correction sets over GF(2). Added FlowGenericErrorReason.NoPauliFlow, raised when the XZ-corrections admit no compatible Pauli flow.

  • #497, #540: Added an amplitude damping noise model. Introduces amplitude_damping_channel / two_qubit_amplitude_damping_channel, the AmplitudeDampingNoise / TwoQubitAmplitudeDampingNoise noise elements, and AmplitudeDampingNoiseModel.

  • #556, #563: Added a context variable default_output_format to unify the default output format for displaying PauliFlow, XZCorrections, Pattern, and StateVec.

  • #568:

    • Added the following methods to Pattern. By default, they modify the pattern in place, with an optional copy parameter. If copy=True, a modified copy is returned instead.
      • apply, an in-place variant of map,
      • blochify, an in-place variant of to_bloch.
    • All classes that have subs and xreplace methods (Pattern, Circuit, OpenGraph, Measurement, PauliFlow, XZCorrections, DensityMatrix) now derive from the Parameterizable class, which exposes the method with_parameter and with_parameters, with subs and xreplace as their respective aliases.
    • Pattern and Circuit now derive from the InplaceParameterizable subclass, which additionally provides the following methods:
      • replace_parameter, an in-place variant of with_parameter (or subs),
      • replace_parameters, an in-place variant of with_parameters (or xreplace).
  • #585: Added rand_outcome.

Fixed

  • #454, #481: Ensure Pattern.minimize_space only reduces max-space and does not increase it.

  • #482, #483: Ensure that to_space_optimal_pattern reorders output nodes

  • #510

    • Pattern.extract_opengraph returns the same open graph before and after standardization.
    • The round trip Pattern -> OpenGraph -> Flow -> XZCorrections -> Pattern is guaranteed for deterministic patterns in the LC fragment.
  • #549: Fixed #531.

    • Empty outputs layer removed from flow's partial order.
    • Flow well-formedness check does not trigger false negative for flows on open graphs without outputs.
  • #554, #560: Legends accompanying open graph visualizations only include elements present in the graph.

  • #562: Fixed #553. Handle visualization of empty graphs.

  • #561: Fixed #555. Method Pattern.draw computes Pauli flow from pattern.

  • #569: Keyword arguments for simulate_pattern are now type-checked.

  • #576: Clifford gates are now properly printed, and their QASM3 decompositions are now optimal.

  • #583, #585: Compatibility with numpy 2.5.

  • #586: Fixed #584 Swap transpilation of measured qubits.

Changed

  • #452: Use uv for dependency management

  • #476

    • Added new field dim to PauliString to represent the dimension of the Hilbert space.
    • Define PauliString on qubit indices and remove all remap methods.
    • Represent x_map and z_map attributes of CliffordMap as sequences of PauliString instead of mappings.
    • Rename PauliFlow.pauli_strings property as PauliFlow.extraction_pauli_strings.
  • #479:

    • Added new methods OpenGraph.draw, PauliFlow.draw and XZCorrections.draw.
    • Method Pattern.draw_graph subsumed by two different methods: Pattern.draw_flow and Pattern.draw_xzcorrections.
  • #454, #481: New space minimization API that allows users to select or define custom heuristics.

  • #484: The dense back‑ends now perform the finalisation step by reordering the output qubits with a new permute method, replacing the old sort_qubits.

  • #490: Exposed more common classes and methods to top level __init__.py.

    • Renamed Instruction, InstructionWithoutRZZ and Command to InstructionType, InstructionTypeWithoutRZZ and CommandType respectively.
    • Moved InstructionType, InstructionTypeWithoutRZZ, CommandType, Correction and CommandOrNoise to TYPE_CHECKING blocks.
    • Renamed DrawAnnotations to DrawPatternAnnotations.
  • #168, #498: Pattern.remove_pauli_measurements replaces Pattern.perform_pauli_measurements. The new algorithm removes all non-input Pauli nodes from patterns that have a flow and returns a pattern that is equivalent for every input state.

    • Field Pattern.results and function incorporate_pauli_results removed.
  • #507: Static method PauliString.from_measured_node is subsumed by the function extraction_ps_from_corrected_node.

  • #510:

    • Pattern.extract_opengraph standardizes the pattern first.
    • XZCorrections.to_pattern applies Cliffords in OpenGraph.output_cliffords at the end of the pattern.
    • OpenGraph.isclose and OpenGraph.is_equal_structurally check equality of OpenGraph.output_cliffords.
    • OpenGraph.compose merges Clifford decorations with measurements or other Clifford decorations on outputs if required.
    • .draw methods allow to show Clifford commands in the outputs.
    • PauliFlow.extract_circuit raises NotImplementedError if the open graph has Clifford decorations.
  • #468, #511: The pyzx module has been moved to a separate plugin: https://github.com/thierry-martinez/graphix-pyzx/ Consequently, the pyproject.toml no longer defines an extra dependency group for the pyzx package.

  • #512: Method Circuit.simulate (formerly Circuit.simulate_statevector, see #567) accepts a backend: DenseStateBackend[_DenseStateT] | Literal["statevector", "densitymatrix"] parameter.

  • #567:

    • Method Circuit.simulate_statevector has been renamed Circuit.simulate.

    • Method Pattern.simulate_pattern has been renamed Pattern.simulate.

    • Field SimulateResult.statevec has been renamed SimulateResult.state.

  • #557: Homogeneize namespace. See commit text or COMPATIBILITY.md for a detailed renaming list. Fixed the following convention:

    • .to_<object> for transformations that can only return object or raise an exception. Equivalently, we use .from_<object> for constructors.
    • .to_<object>_or_none for transformations that can return object or None. Equivalently, we use .from_<object>_or_none for constructors.
    • accessor methods use nouns instead of verb + noun. Example: Pattern.max_degree instead of Pattern.compute_max_degree.
  • #518: Numba-jit statevector backend.

    • Changed statevector representation from a tensor to a flat array.
    • Added .with_capacity method to StatevectorBackend to preallocate a given space in memory.
    • Added module constant NUM_QUBIT_PARALLEL to determine at which qubit count jit-compiled functions are parallelized.
    • Dropped support for symbolic simulation and removed Statevector.xreplace and Statevector.subs methods.
    • Added method DenseState.project_qubit which defaults to calling evolve_single and remove_qubit. Added specialized code for this method in Statevector class.
    • Unified test_statevec.py and test_statevec_backend.py into a single file.
  • #568: Method Pattern.infer_pauli_measurements and function transpile_swaps now operate in place by default, with an optional copy parameter. If copy=True, a modified copy is returned instead.

  • #571: Removed method Pattern.graph

Notes

If you use this software, please cite it as below.

Files

TeamGraphix/graphix-v0.4.zip

Files (1.4 MB)

Name Size
md5:b709226116e05b2e66cb5845f5b0783b
1.4 MB Preview Download

Additional details

Related works