From caff1aa1680dc07865a087c831f2152770911094 Mon Sep 17 00:00:00 2001 From: Charles Moussa Date: Wed, 8 Jan 2025 13:31:13 +0100 Subject: [PATCH 1/3] Update horqrux/utils_noise.py Co-authored-by: RolandMacDoland <9250798+RolandMacDoland@users.noreply.github.com> --- horqrux/utils_noise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horqrux/utils_noise.py b/horqrux/utils_noise.py index 59c69b1..7d56a00 100644 --- a/horqrux/utils_noise.py +++ b/horqrux/utils_noise.py @@ -119,7 +119,7 @@ def PauliChannel(error_probability: tuple[float, ...]) -> tuple[Array, ...]: raise ValueError("The sum of probabilities can't be greater than 1.0") for probability in error_probability: if (probability > 1.0) or (probability < 0.0): - raise ValueError("The probability values are not correct probabilities") + raise ValueError(f"The error probability values are incorrect. Got {probability}.") px, py, pz = ( error_probability[0], error_probability[1], From 8e75715babb22302dd03dec5de55e090e383859c Mon Sep 17 00:00:00 2001 From: Charles Moussa Date: Wed, 8 Jan 2025 13:31:34 +0100 Subject: [PATCH 2/3] Update horqrux/primitive.py Co-authored-by: RolandMacDoland <9250798+RolandMacDoland@users.noreply.github.com> --- horqrux/primitive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/horqrux/primitive.py b/horqrux/primitive.py index c8c3948..fa6952c 100644 --- a/horqrux/primitive.py +++ b/horqrux/primitive.py @@ -106,7 +106,9 @@ def I( def X( target: TargetQubits, control: ControlQubits = (None,), noise: NoiseProtocol = None ) -> Primitive: - """X gate. This function returns an instance of 'Primitive' and does *not* apply the gate. + """The definition for the X gate. + + This function returns an instance of 'Primitive' and does *not* apply the gate. By providing tuple of ints to 'control', it turns into a controlled gate. Example usage: X(1) represents the instruction to apply X to qubit 1. From 6155c7896bc5a714f383ef6fb20e6bfe61f381be Mon Sep 17 00:00:00 2001 From: Charles Moussa Date: Wed, 8 Jan 2025 13:33:26 +0100 Subject: [PATCH 3/3] Update horqrux/shots.py Co-authored-by: RolandMacDoland <9250798+RolandMacDoland@users.noreply.github.com> --- horqrux/shots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horqrux/shots.py b/horqrux/shots.py index 5dc69fa..4cc238d 100644 --- a/horqrux/shots.py +++ b/horqrux/shots.py @@ -49,7 +49,7 @@ def probs_from_eigenvectors_state(state: Any, eigvecs: Array) -> Array: Returns: Array: The probabilities. """ - raise NotImplementedError("prod_eigenvectors_state is not implemented") + raise NotImplementedError(f"prod_eigenvectors_state is not implemented for the state type {type(state)}.") @probs_from_eigenvectors_state.register