Skip to content

Commit

Permalink
insert note into api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Aug 10, 2023
1 parent e5dd365 commit 8465662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/qibo/gates/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,16 @@ def matrix(self, backend=None):
Args:
backend (:class:`qibo.backends.abstract.Backend`, optional): backend
to be used in the execution. If ``None``, it uses
:class:`qibo.backends.GlobalBackend`. Defaults to ``None``.
to be used in the execution. If ``None``, it uses
:class:`qibo.backends.GlobalBackend`. Defaults to ``None``.
Returns:
ndarray: Matrix representation of gate.
.. note::
``Gate.matrix`` was an defined as an atribute in ``qibo`` versions prior to ``0.2.0``.
From ``0.2.0`` on, it has been converted into a method and has replaced the ``asmatrix`` method.
"""
if backend is None: # pragma: no cover
backend = GlobalBackend()
Expand Down
1 change: 0 additions & 1 deletion src/qibo/gates/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def apply_density_matrix(self, backend, state, nqubits):

class FusedGate(SpecialGate):
"""Collection of gates that will be fused and applied as single gate during simulation.
This gate is constructed automatically by :meth:`qibo.models.circuit.Circuit.fuse`
and should not be used by user.
"""
Expand Down

0 comments on commit 8465662

Please sign in to comment.