Preprint
Article

This version is not peer-reviewed.

Neutrosophic Quantum Algorithms: Neutrosophic Shor’s and Grover’s Algorithms

Submitted:

25 September 2026

Posted:

29 September 2026

You are already at the latest version

Abstract
Quantum computation provides algorithms that exploit superposition, interference, and entanglement to solve certain computational problems more efficiently than known classical algorithms. Two fundamental examples are Shor’s factoring algorithm and Grover’s search algorithm. In practical computational settings, however, information associated with quantum states, oracle responses, and measurements may be uncertain or indeterminate. In this paper, we introduce a mathematical framework for neutrosophic quantum algorithms in which quantum states are supplemented by three independent information components representing truth, indeterminacy, and falsity. We define neutrosophic quantum states, neutrosophic quantum measurements, neutrosophic quantum oracles, and scalarization functions. Using these concepts, we formulate neutrosophic versions of Grover’s search algorithm and Shor’s factoring algorithm. For Grover’s algorithm, the classical binary oracle is generalized to an oracle whose response may carry truth, indeterminacy, and falsity degrees. For Shor’s algorithm, neutrosophic information is incorporated into modular exponentiation, quantum Fourier transformation, measurement, and period estimation. We prove that the proposed construction contains the ordinary quantum algorithms as a special case. We also discuss complexity and indeterminacy propagation. The proposed theory is an information-theoretic mathematical extension of quantum algorithms. It is not intended to modify the physical postulates of quantum mechanics.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Quantum computation is a computational paradigm based on quantum mechanical principles such as superposition, interference, and entanglement. Since the development of Shor’s factoring algorithm, quantum computation has become an important area of mathematical physics, computer science, and information theory [1,2,3].
Shor’s algorithm gives a quantum procedure for integer factorization and discrete logarithms with polynomial-time quantum complexity [1,2]. The central idea is to transform the factoring problem into a period-finding problem.
Another fundamental quantum algorithm is Grover’s search algorithm, which provides a quadratic improvement for searching an unstructured database [4]. If the database contains N elements and one element is marked, Grover’s algorithm requires approximately O ( N ) oracle queries. A detailed analysis of quantum searching was given by Boyer, Brassard, Hoyer, and Tapp [5].
A conventional pure quantum state has the form
∑ x = 0 N − 1 α x | x 〉 ,
where
The complex numbers α x are quantum amplitudes, and their squared absolute values determine measurement probabilities.
In applications involving incomplete information, uncertainty, or indeterminate computational data, it can be useful to supplement the quantum state with an additional information structure. Neutrosophic set theory, introduced by Smarandache, represents information using three independent components corresponding to truth, indeterminacy, and falsity [6].
Applications of neutrosophic ideas to quantum computation have also been considered. In particular, neutrosophic quantum states, transformation gates, Hadamard matrices, superposition, entanglement, and measurement have been investigated [7].
The purpose of this paper is to develop a systematic framework for neutrosophic quantum algorithms and to apply it to Shor’s and Grover’s algorithms.
The main contributions are:
(i)
a definition of neutrosophic quantum states;
(ii)
a neutrosophic measurement model;
(iii)
a scalarization mechanism for neutrosophic information;
(iv)
a neutrosophic oracle for quantum search;
(v)
a neutrosophic version of Grover’s algorithm;
(vi)
a neutrosophic version of Shor’s algorithm;
(vii)
a proof that the classical quantum algorithms are recovered in a deterministic special case.

2. Preliminaries on Neutrosophic Sets

We begin with the basic neutrosophic representation.
Definition 1.
A neutrosophic information value is a triple
η = ( T , I , F ) ,
where
T , I , F ∈ [ 0 , 1 ] .
The components T, I, and F represent, respectively, truth, indeterminacy, and falsity.
In general, the three components are independent. Therefore one does not necessarily impose the classical normalization condition
T + I + F = 1 .
This independence distinguishes neutrosophic information from an ordinary probability distribution [6].
Definition 2.
Let Ω be a finite set. A neutrosophic information distribution on Ω is a function
ν : Ω ⟶ [ 0 , 1 ] 3
such that
( T x , I x , F x )
for every x ∈ Ω .
Remark 1.
The triple ( T x , I x , F x ) should not be confused with the probability of observing the quantum state | x 〉 . The quantum probability is determined by the quantum amplitude, whereas the neutrosophic triple represents an additional layer of information concerning the state.

3. Neutrosophic Quantum States

Let
H n = ( C 2 ) ⊗ n
be the Hilbert space of an n-qubit system.
A conventional quantum state is
∑ x = 0 2 n − 1 α x | x 〉 ,
where
We now associate a neutrosophic information triple with every computational basis state.
Definition 3.
A neutrosophic quantum state is a pair
| ψ 〉 , N ,
where
∑ x α x | x 〉
is a normalized quantum state and
{ ( T x , I x , F x ) ∈ 0 , … , 2 n − 1 }
is a neutrosophic information distribution.
We use the notation
∑ x α x | x 〉 [ T x , I x , F x ] .
Here the expression
| x 〉 [ T x , I x , F x ]
means that the computational basis state | x 〉 is associated with the neutrosophic information triple ( T x , I x , F x ) .

4. Scalarization of Neutrosophic Information

To use neutrosophic information in an algorithm, it is useful to introduce a scalarization function.
Definition 4.
A scalarization function is a mapping
S : [ 0 , 1 ] 3 ⟶ [ 0 , 1 ]
that assigns a scalar confidence value to a neutrosophic triple.
One possible scalarization is T T + I + F , provided that T + I + F > 0 .
Another possible linear scalarization is
λ T T λ I I λ F F ,
where
λ T , λ I , λ F ≥ 0 .
The choice of scalarization depends on the application.
Remark 2.
Different scalarization functions may produce different numerical behaviour. Therefore a particular neutrosophic quantum algorithm must specify the scalarization function used in its implementation.

5. Neutrosophic Quantum Gates

Let U : H n ⟶ H n be a unitary quantum operator.
A neutrosophic quantum operation can be represented by ( U , Φ U ) , where U acts on the quantum amplitudes and Φ U propagates the associated neutrosophic information. For
| ψ 〉 , N .
we define
U | ψ 〉 , Φ U ( N ) .
Thus the quantum and neutrosophic components are treated as two related but distinct layers.

6. Neutrosophic Measurement

The expression
〈 ψ | M m † M m | ψ 〉
represents the probability of obtaining the measurement outcome m when the quantum system is in the state | ψ 〉 .
Here,
| ψ 〉
denotes the quantum state before measurement, M m is the measurement operator associated with the outcome m, and M m † denotes the Hermitian adjoint of M m . Thus, according to the Born rule, the probability of obtaining the outcome m is
p ( m ∣ ψ ) = 〈 ψ | M m † M m | ψ 〉 .
The measurement operators satisfy the completeness relation
∑ m ∈ M M m † M m = I ,
which guarantees that the probabilities are normalized:
∑ m ∈ M p ( m ∣ ψ ) = 1 .
In particular,
0 ≤ 〈 ψ | M m † M m | ψ 〉 ≤ 1 .
The completeness relation guarantees that the probabilities are normalized:
∑ m ∈ M p ( m ∣ ψ ) = 1 .
In the neutrosophic model, the outcome m is also associated with ( T m , I m , F m ) .
Definition 5.
A neutrosophic measurement is a collection
{ ( M m , T m , I m , F m ) : m ∈ M } .
Using a scalarization function S, define the effective probability
p m S ( T m , I m , F m ) .
After normalization, the neutrosophic measurement probability is
p m S ( T m , I m , F m ) ∑ j ∈ M p j S ( T j , I j , F j ) .
This construction preserves the ordinary quantum probability as the basic probabilistic quantity while using the neutrosophic component as an information-weighting mechanism.

7. Neutrosophic Quantum Oracles

Consider a Boolean function
f : { 0 , 1 } n ⟶ { 0 , 1 } .
The usual phase oracle is
( − 1 ) f ( x ) | x 〉 .
We generalize this construction by assigning a neutrosophic triple to each input.
( T x , I x , F x ) .
Let
S ( T x , I x , F x ) .
We define the neutrosophic phase oracle by
e i π s x | x 〉 .
Thus
∑ x e i π s x | x 〉 〈 x | .
When
s x = 1 , x ∈ M , 0 , x ∉ M ,
we obtain
− | x 〉 , x ∈ M , | x 〉 , x ∉ M .
Therefore the ordinary Grover oracle is obtained as a special case.

8. Neutrosophic Grover’s Algorithm

Grover’s algorithm searches an unstructured space by repeatedly applying an oracle and an amplitude-amplification operator [4,5].
Let
N = 2 n
and let M denote the set of marked states.
The initial uniform state is
1 N ∑ x = 0 N − 1 | x 〉 .
The corresponding neutrosophic state is
1 N ∑ x = 0 N − 1 | x 〉 [ T x , I x , F x ] .

8.1. Neutrosophic Oracle

For every x, define
S ( T x , I x , F x ) .
The neutrosophic oracle is
e i π s x | x 〉 .
For the deterministic assignment
( 1 , 0 , 0 ) , x ∈ M , ( 0 , 0 , 1 ) , x ∉ M ,
and a scalarization satisfying
S ( 1 , 0 , 0 ) = 1 , S ( 0 , 0 , 1 ) = 0 ,
we recover the ordinary phase oracle.

8.2. Neutrosophic Diffusion Operator

The standard Grover diffusion operator is
2 | s 〉 〈 s | I .
For a neutrosophic model, define the normalized information-weighted state
1 Z N ∑ x = 0 N − 1 s x | x 〉 ,
where
∑ x = 0 N − 1 s x 2 .
Provided that Z N > 0 , define
2 | s N 〉 〈 s N | I .
The neutrosophic Grover operator is
D N O N .
Consequently, after k iterations,
( G N ) k | s 〉 .

8.3. Neutrosophic Grover Procedure

The algorithm can be summarized as follows.
1.
Prepare the uniform state
| s 〉 = 1 N ∑ x = 0 N − 1 | x 〉 .
2.
Assign to each computational basis state a neutrosophic triple
( T x , I x , F x ) .
3.
Compute the scalarized value
s x = S ( T x , I x , F x ) .
4.
Apply the neutrosophic oracle
O N .
5.
Apply the neutrosophic diffusion operator
D N .
6.
Repeat the oracle and diffusion operations.
7.
Perform neutrosophic measurement.
8.
Select an outcome according to the resulting effective measurement distribution.
For M marked states, the usual amplitude-amplification scale is
O N M
oracle applications. The exact behaviour of the neutrosophic extension depends on the scalarization and on the distribution of the triples ( T x , I x , F x ) .

9. Reduction to the Classical Grover Algorithm

Theorem 1.
Suppose that the scalarization function satisfies
S ( 1 , 0 , 0 ) = 1
and
S ( 0 , 0 , 1 ) = 0 .
If marked states are assigned the triple ( 1 , 0 , 0 ) and unmarked states are assigned the triple ( 0 , 0 , 1 ) , then the neutrosophic oracle reduces to the standard Grover oracle.
Proof. 
For a marked state x,
s x = S ( 1 , 0 , 0 ) = 1 .
Hence
e i π | x 〉 − | x 〉 .
For an unmarked state,
s x = S ( 0 , 0 , 1 ) = 0 ,
and therefore
e 0 | x 〉 | x 〉 .
Thus
− | x 〉 , x ∈ M , | x 〉 , x ∉ M ,
which is precisely the ordinary Grover phase oracle. □

10. Neutrosophic Shor’s Algorithm

Shor’s algorithm converts integer factorization into a period-finding problem [1,2].
Let N be an odd composite integer. Choose an integer a satisfying
1 < a < N .
First compute
gcd ( a , N ) .
If d > 1 , then d is already a nontrivial factor of N.
Otherwise, since a and N are relatively prime, there exists a smallest positive integer r satisfying
a r ≡ 1 ( mod N ) .
This integer r is the multiplicative order of a modulo N.

10.1. Quantum Period Finding

Choose a power of two Q satisfying
N 2 ≤ Q < 2 N 2 .
The first register is initialized in the uniform state
1 Q ∑ x = 0 Q − 1 | x 〉 .
Together with a second register, the initial state is
1 Q ∑ x = 0 Q − 1 | x 〉 | 0 〉 .
Modular exponentiation produces
1 Q ∑ x = 0 Q − 1 | x 〉 | a x mod N 〉 .
The quantum Fourier transform is
1 Q ∑ y = 0 Q − 1 e 2 π i x y / Q | y 〉 .
Applying the QFT to the first register produces information about the period r.

11. Neutrosophic Modular Exponentiation

In the neutrosophic extension, the result of modular exponentiation is associated with a triple
( T x , I x , F x ) .
We write
a x mod N ⟼ ( a x mod N ) [ T x , I x , F x ] .
The neutrosophic modular exponentiation operator is denoted by
U a , N ( N ) .
Its action is
| x 〉 | a x mod N 〉 [ T x , I x , F x ] .
Thus the resulting state is
1 Q ∑ x = 0 Q − 1 | x 〉 | a x mod N 〉 [ T x , I x , F x ] .
The quantum amplitudes are unchanged by this notation; the neutrosophic triples provide an additional information layer.

12. Neutrosophic Quantum Fourier Transform

The ordinary quantum Fourier transform (QFT) on a register of dimension Q is defined by
QFT Q | x 〉 = 1 Q ∑ y = 0 Q − 1 e 2 π i x y / Q | y 〉 , x ∈ { 0 , 1 , … , Q − 1 } .
To incorporate neutrosophic information, we introduce a formal information-weighted extension of the QFT. Let
N x = [ T x , I x , F x ]
be the neutrosophic triple associated with the input state | x 〉 , and let
s x = S ( T x , I x , F x )
be a scalar weight determined by a specified scoring function S. The resulting weighted transformation is defined by
QFT ˜ Q | x 〉 = s x Q ∑ y = 0 Q − 1 e 2 π i x y / Q | y 〉 .
Thus, the neutrosophic triple influences the transformed state through the scalar s x . In particular, the weighting modifies the amplitudes of the Fourier-transformed state without changing the relative phase factors e 2 π i x y / Q .
If s x ≠ 0 , the norm of the weighted state is
QFT ˜ Q | x 〉 2 = | s x | 2 .
Therefore, to obtain a normalized state, we must divide by | s x | . For s x ≠ 0 , the normalized output is
| ψ ˜ x 〉 = s x | s x | 1 Q ∑ y = 0 Q − 1 e 2 π i x y / Q | y 〉 .
If s x is a positive real number, this normalization cancels the scalar weight entirely. Hence, a nonzero scalar weight applied uniformly to all Fourier amplitudes does not change the resulting measurement probabilities.
Remark 3.
The construction above is a formal, information-weighted extension of the quantum Fourier transform. It is not, in general, a new physical quantum gate. In particular, multiplying a quantum state by an arbitrary neutrosophic scalar does not automatically define a unitary operation. Moreover, when the weight s x is a nonzero scalar applied uniformly to every Fourier amplitude, normalization removes its effect on the measurement statistics. To obtain a nontrivial modification of those statistics, one would need a suitably defined state-dependent or outcome-dependent weighting scheme, together with a precise normalization rule and a physically valid quantum implementation.

13. Neutrosophic Period Estimation

Suppose that measurement of the first register produces y.
In ordinary Shor’s algorithm one obtains an approximation of the form
y Q ≈ k r
for some integer k.
Continued fractions are then used to obtain candidate values of r [1,2].
In the neutrosophic setting, the measurement result y is associated with
( T y , I y , F y ) .
Its scalarized confidence is
S ( T y , I y , F y ) .
A candidate period r ′ can therefore be associated with a confidence value c y . The candidate must nevertheless satisfy the exact modular condition
a r ′ ≡ 1 ( mod N ) .
Thus neutrosophic information affects the confidence assigned to a candidate but does not replace the mathematical verification of a period.

14. Neutrosophic Shor Algorithm

The complete procedure is given below.
1.
Choose a random integer a such that
1 < a < N .
2.
Compute
d = gcd ( a , N ) .
3.
If
d > 1 ,
return d as a nontrivial factor.
4.
Choose Q satisfying
N 2 ≤ Q < 2 N 2 .
5.
Prepare
| Ψ 0 〉 = 1 Q ∑ x = 0 Q − 1 | x 〉 | 0 〉 .
6.
Apply neutrosophic modular exponentiation:
| x 〉 | 0 〉 ⟼ | x 〉 | a x mod N 〉 [ T x , I x , F x ] .
7.
Apply the neutrosophic Fourier transformation to the first register.
8.
Perform neutrosophic measurement.
9.
Use the measured value y and continued fractions to obtain candidate periods.
10.
Verify each candidate r ′ by checking
a r ′ ≡ 1 ( mod N ) .
11.
If r ′ is even, calculate
p = gcd a r ′ / 2 − 1 , N
and
q = gcd a r ′ / 2 + 1 , N .
12.
If
1 < p < N
and
1 < q < N ,
then p and q give a nontrivial factorization of N.
13.
Otherwise, repeat the procedure with another choice of a.

16. Example: Neutrosophic Shor Algorithm for N = 15

Consider N = 15 . Choose a = 2 . We calculate
2 1 ≡ 2 ( mod 15 ) ,
2 2 ≡ 4 ( mod 15 ) ,
2 3 ≡ 8 ( mod 15 ) ,
and
2 4 ≡ 1 ( mod 15 ) .
Hence r = 4 . Since r is even, 2 2 . The two factors are obtained from gcd ( 3 , 15 ) = 3 and gcd ( 5 , 15 ) = 5 . Therefore 15 = 3 · 5 . Suppose that the period measurement is associated with ( 0.95 , 0.03 , 0.02 ) . Then
S ( T r , I r , F r ) = T r T r + I r + F r = 0.95 0.95 + 0.03 + 0.02 = 0.95 .
Thus the period r = 4 has scalarized confidence 0.95 in this illustrative model.
The exact factorization step remains classical after the period has been verified.

17. Indeterminacy Propagation

Suppose that the neutrosophic information associated with a state is
T I F .
A general linear information-propagation model is M η , where
m T T m T I m T F m I T m I I m I F m F T m F I m F F .
Thus
T ′ I ′ F ′ = m T T m T I m T F m I T m I I m I F m F T m F I m F F T I F .
For example, an operation that increases the indeterminacy component can be modeled by the transformation
I ′ = I + ε ( 1 − I ) , 0 ≤ ε ≤ 1 .
Since I ∈ [ 0 , 1 ] , we have
ε ( 1 − I ) ≥ 0 .
Consequently, I ′ ≥ I , so the transformation does not decrease the degree of indeterminacy. Moreover, I ′ ∈ [ 0 , 1 ] , ensuring that the transformed value remains within the admissible range. This provides a simple mathematical model for the accumulation of indeterminacy through repeated computational operations.

18. Complexity

The ordinary Grover algorithm requires O ( N ) oracle queries for a unique marked state [4,5]. If the computation of the scalarization function S ( T , I , F ) and the propagation of neutrosophic information have constant or polynomial computational cost, then the corresponding overhead can be included in the overall complexity.
For Shor’s algorithm, the main quantum computational components are modular exponentiation and the quantum Fourier transform [1,2]. If neutrosophic information is propagated using polynomial-time procedures, then the additional computational overhead is polynomial.
Consequently, the proposed neutrosophic framework does not by itself change the asymptotic quantum complexity of the underlying algorithms. It adds an information-processing layer whose cost must be analyzed separately.

19. Classical Limit

The ordinary quantum algorithms should be recovered when the neutrosophic information becomes deterministic.
Let ( 1 , 0 , 0 ) and ( 0 , 0 , 1 ) . Assume S ( 1 , 0 , 0 ) = 1 and S ( 0 , 0 , 1 ) = 0 . Then the neutrosophic oracle becomes
− | x 〉 , x ∈ M , | x 〉 , x ∉ M .
This is exactly the standard Grover oracle.
Likewise, when all neutrosophic triples associated with modular exponentiation and measurement become deterministic, the neutrosophic Shor construction reduces to the ordinary period-finding procedure.
Thus the ordinary quantum algorithms are embedded in the proposed neutrosophic framework.

20. Discussion

The central idea of this paper is to distinguish quantum uncertainty from informational indeterminacy.
The quantum state is represented by complex amplitudes
∑ x α x | x 〉 ,
whereas informational uncertainty is represented by
( T x , I x , F x ) .
This distinction allows a quantum algorithm to retain its usual amplitude structure while carrying additional information concerning the reliability or indeterminacy of computational data.
For Grover’s algorithm, this leads to a generalized oracle
∑ x e i π S ( T x , I x , F x ) | x 〉 〈 x | .
For Shor’s algorithm, the neutrosophic information is associated with the modular-exponentiation and period-estimation stages.

21. Conclusions

We have introduced a mathematical framework for neutrosophic quantum algorithms and applied it to Grover’s search algorithm and Shor’s factoring algorithm.
A neutrosophic quantum state is represented schematically by
∑ x α x | x 〉 [ T x , I x , F x ] .
The complex amplitudes describe the quantum state, while the triple
( T x , I x , F x )
represents truth, indeterminacy, and falsity information associated with the computational state.
We defined neutrosophic measurements, scalarization functions, neutrosophic oracles, and information-weighted quantum transformations. Using these constructions, we obtained generalized versions of Grover’s and Shor’s algorithms.
The ordinary algorithms are recovered in the deterministic limit ( 1 , 0 , 0 ) for true information and ( 0 , 0 , 1 ) for false information, together with a scalarization satisfying
S ( 1 , 0 , 0 ) = 1 , S ( 0 , 0 , 1 ) = 0 .
The framework therefore provides a mathematical bridge between quantum algorithms and neutrosophic representations of indeterminate information.
A complete physical theory of neutrosophic quantum computation would require additional work concerning unitary realizability, quantum channels, measurement theory, noise, complexity, and experimental implementation.

References

  1. Shor, P. W. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science, 1994; IEEE Computer Society; pp. 124–134. [Google Scholar]
  2. Shor, P. W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 1997, 26(no. 5), 1484–1509. [Google Scholar] [CrossRef]
  3. Nielsen, M. A.; Chuang, I. L. Quantum Computation and Quantum Information; Cambridge University Press: Cambridge, 2000. [Google Scholar]
  4. Grover, L. K. A fast quantum mechanical algorithm for database search. In Proceedings of the 28th Annual ACM Symposium on Theory of Computing, 1996; ACM; pp. 212–219. [Google Scholar]
  5. Boyer, M.; Brassard, G.; Hoyer, P.; Tapp, A. Tight bounds on quantum searching. In Proceedings of the 4th Workshop on Physics and Computation, 1996; pp. 36–43. [Google Scholar]
  6. Smarandache, F. Neutrosophy: Neutrosophic Probability, Set, and Logic; American Research Press: Rehoboth, USA, 1998. [Google Scholar]
  7. Smarandache, F.; Jain, S. Neutrosophic logic based quantum computing. Symmetry 2018, 10, 656. [Google Scholar] [CrossRef]
  8. Ekert, A. K.; Jozsa, R. Quantum computation and Shor’s factoring algorithm. Rev. Mod. Phys. 1996, 68, 733–753. [Google Scholar] [CrossRef]
  9. Barenco, A.; Bennett, C. H.; Cleve, R.; DiVincenzo, D. P.; Margolus, N.; Shor, P.; Sleator, T.; Smolin, J.; Weinfurter, H. Elementary gates for quantum computation. Phys. Rev. A 1995, 52, 3457–3467. [Google Scholar] [CrossRef] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.