Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lambeq/backend/pennylane.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def to_pennylane(diagram: Diagram,
Probabilities can be used with more PennyLane backpropagation
methods.
backend_config : dict, default: None
A dictionary of PennyLane backend configration options,
A dictionary of PennyLane backend configuration options,
including the provider (e.g. IBM or Honeywell), the device,
the number of shots, etc. See the `PennyLane plugin
documentation <https://pennylane.ai/plugins/>`_
Expand Down
6 changes: 3 additions & 3 deletions lambeq/backend/quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,13 @@ def to_pennylane(self, probabilities=False, backend_config=None,

Parameters
----------
probabilties : bool, default: False
probabilities : bool, default: False
If True, the PennylaneCircuit will return the normalized
probabilties of measuring the computational basis states
probabilities of measuring the computational basis states
when run. If False, it returns the unnormalized quantum
states in the computational basis.
backend_config : dict, default: None
A dictionary of PennyLane backend configration options,
A dictionary of PennyLane backend configuration options,
Comment thread
sburton84 marked this conversation as resolved.
including the provider (e.g. IBM or Honeywell), the device,
the number of shots, etc. See the `PennyLane plugin
documentation <https://pennylane.ai/plugins/>`_
Expand Down
6 changes: 3 additions & 3 deletions lambeq/experimental/discocirc/coref_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


class CoreferenceResolver(ABC):
"""Class implementing corefence resolution."""
"""Class implementing coreference resolution."""

@abstractmethod
def tokenise_and_coref(
Expand Down Expand Up @@ -98,7 +98,7 @@ def dict_from_corefs(


class MaverickCoreferenceResolver(CoreferenceResolver):
"""Corefence resolution and tokenisation based on Maverick
"""Coreference resolution and tokenisation based on Maverick
(https://github.com/sapienzanlp/maverick-coref)."""

def __init__(
Expand Down Expand Up @@ -167,7 +167,7 @@ def tokenise_and_coref(self, text: str) -> tuple[TokenisedTextT,


class SpacyCoreferenceResolver(CoreferenceResolver):
"""Corefence resolution and tokenisation based on spaCy."""
"""Coreference resolution and tokenisation based on spaCy."""

def __init__(self):
# Create basic tokenisation pipeline, for POS
Expand Down
4 changes: 2 additions & 2 deletions lambeq/training/numpy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def diagram_output(x: Iterable[ArrayLike]) -> ArrayLike:
tn.DefaultBackend('jax')):
sub_circuit = self._fast_subs([diagram], x)[0]
result = tn.contractors.auto(*sub_circuit.to_tn()).tensor
# square amplitudes to get probabilties for pure circuits
# square amplitudes to get probabilities for pure circuits
assert isinstance(sub_circuit, Circuit)
if not sub_circuit.is_mixed:
result = backend.abs(result) ** 2
Expand Down Expand Up @@ -141,7 +141,7 @@ def get_diagram_output(
for d in diagrams:
assert isinstance(d, Circuit)
result = tn.contractors.auto(*d.to_tn()).tensor
# square amplitudes to get probabilties for pure circuits
# square amplitudes to get probabilities for pure circuits
if not d.is_mixed:
result = np.abs(result) ** 2
results.append(self._normalise_vector(result))
Expand Down
Loading