I am currently trying to implement the VQLS
for a very complex example in 3 Qubit and cost function is very high in spite of adding multiple layers in Variational circuit. I have two questions.
- Can you suggest the best way to choose variational Ansatz and do you think I should consider different optimizers or any other suggestion to reduce cost function?
- My matrix which converts zero state to output b state is not a quantum native matrix and I need to decompose it so how can we implement a linear combination of matrices in penny lane as an addition? Naturally, if we add gates it will be multiplication in circuit.
Thank you in advance
Additional Info
I am trying to solve the linear equation Ax = b and The algorithm am using is VQLS and am trying to implement it in google collab using Pennylane library.
A matrix and its decomposition and output b state am considering 3 qubit hadamard gate as of now
Complete details
Attached is Ansatz am using and I am getting local cost function using optimizer (GradientDescentOptimizer) around 0.10 and if I increase more layers cost function starts increasing so I need suggestions
- Regarding which variational circuit to choose
- (Not relevant to my problem) Do we have any existing function or code which decomposes any 3 qubit matrix into multiplication or sequence of unitary matrices (ex Pauli).
for example (3 qubits) U = Pauli X1.Pauli Y2.Pauli X0