Releases: TeamGraphix/graphix
Releases · TeamGraphix/graphix
Release 0.2.16
[0.2.16] - 2024-08-26
This version introduces several important interface changes, aimed at secure data manipulation and improved code maintainability.
More changes are expected in version 0.3.0
, to reach a milestone of stable and reliable MBQC pattern expression, manipulation and simulation library around which other packages can be built.
Added
- Added classes for a standardized definition of pattern commands and circuit instructions (
graphix.commands
,graphix.instructions
). This is for data validation, readability and maintainability purposes. Preiously, the commands and instructions were represented as raw data inside lists, which are prone to errors and not readable. by @thierry-martinez - The following changes were made (#155):
- Added
class Command
and all its child classes that represent all the pattern commands. - Added
class Instruction
for the gate network expression in quantum circuit model. Every instruction can be instanciated using this class by passing its name as defined in the EnumInstructionName
.
- Added
class graphix.OpenGraph
to transpile between graphix patterns and pyzx graphs.class graphix.pauli.PauliMeasurement
as a new Pauli measurement checks (used inpattern.perform_pauli_measurements
).
Fixed
- Typos and bugs in docs fixed.
Changed
- Entire package was updated to follow the new data classes, e.g.
pattern.add(["M", 0, "XY", 0, [], []])
->pattern.add(M(node=0))
. - Measure commands do no longer carry vertex operators (
vop
): Clifford gates can still be applied to measures with the methodM.clifford
, which returns a new measure commands where plane, angle and domains has been updated. - X- and Z-domains for measures and domain for correction commands are now set of nodes (instead of lists).
- Migrated style checks to
ruff
, and corresponding CI is set up. - Codecov is now set up for coverage report on each PR and CI is set up.
Contributors
Release 0.2.15
Added
- python 3.12 support
- Arbitrary states now allowed for initializing input nodes in state vector
and density matrix backends. useinput_state
optional argument inStatevector
andDensityMatrix
backends. - Simple planar state class
graphix.states.PlanarState
for states on one of the three planes (XY, XZ, YZ).
Fixed
Changed
- Basic states such as |0>, |+> states are now defined in
states.BasicStates
and no longer
inops.States
.
Release 0.2.14
Fix Build issue
Release 0.2.13
Fixed
- Build configuration for PyPI (54eb821)
Release 0.2.12
[0.2.12] - 2024-05-11
Added
- Transpiled circuits can now have "measure" gates, introduced with
thecirc.m(qubit, plane, angle)
method. The measured qubit cannot
be used in any subsequent gate. - Added
gflow.find_pauliflow
,gflow.verify_pauliflow
andpauliflow_from_pattern
methods (#117) - Pauli-flow finding algorithm (#117)
- workflow for isort, codecov (#148, #147)
Fixed
- Fix output node order sorting bug in Pauli preprocessing
measure_pauli
(#145)
Changed
- The transpiler now returns a
TranspileResult
dataclass: the
pattern is available in thepattern
field, and the field
classical_outputs
contains the index where the classical measures
can be found in theresults
array of the simulator. - The circuit simulator now returns a
SimulateResult
dataclass: the
state vector is available in thestatevec
field, and the field
classical_measures
contains the results of the measure gates. - Patterns are now allowed to measure all their nodes, and have an
empty output set. - Completely migrated to pytest, no
unittest
usage remains (#134)
Contributors
Release 0.2.11
[0.2.11] - 2024-03-16
Added
- Added flow and gflow verifiers (#99).
- Added
gflow.flow_from_pattern
method.
Fixed
- Fixed bug in index permutation within
linalg.MatGF2
andgflow.find_gflow
. - Fixed
gflow.gflow_from_pattern
method.
Changed
- Renamed
flow
-related methodsgflow.flow
andgflow.gflow
are nowgflow.find_flow
andgflow.find_gflow
, respectively.
Pattern
class stability upgrade:Pattern.seq
is renamed into a private fieldPattern.__seq
and
Pattern.Nnode
is now a read-only property.Pattern
constructor
now only takes an optional list ofinput_nodes
, and can only be
updated viaadd
andextend
.Pattern
are now iterable andlen
is now defined for patterns: we should writefor command in pattern:
instead offor command in pattern.seq:
andlen(pattern)
instead
oflen(pattern.seq)
.N
commands are no longer added byPattern
constructor and should be added explicitly after the instantiation.
GraphVisualizer
upgrade to offer more options for inspecting correction sets.- Changed the behavior of visualization in the
GraphVisualizer
class.
Prepared avisualize
method that visualizes based on the graph only,
and avisualize_from_pattern
that visualizes based on the pattern.
Both search for gflow or flow, and if found, plot them. If not found,
in the case of from the graph, only the graph is drawn, and in the case
of from the pattern, both the graph and all correction sets are drawn.
- Changed the behavior of visualization in the
Contributors
@thierry-martinez @d1ssk @mgarnier59 @masa10-f @king-p3nguin
Release 0.2.10
Added
- Added
rustworkx
as a backend for the graph state simulator- Only
networkx
backend was available for pattern optimization.
By setting theuse_rustworkx
option to True while usingPattern.perform_pauli_measurements()
,
graphix will run pattern optimization usingrustworkx
(#98)
- Only
- Added
.ccx
and.swap
methods tographix.Circuit
.
Fixed
- Fixed gflow-based graph visualization (#107)
Release 0.2.9
Added
- internal updates of gflow and linear algebra functionalities:
- Added benchmarking page on docs (#89).
- Added graphix-perceval to
[extra]
option of thepip
installation.
Changed
- Removed
z3-solver
and addedgalois
andsympy
inrequirements.txt
(#80)
Removed
- Removed
timeout
optional arguments fromgflow.flow
andgflow.gflow
.
Fixed
- Bugfix conditional branch in
gflow.gflowaux
(#80)
Release 0.2.8
Added
- Add support for python 3.11