Steve Wood

Results 137 comments of Steve Wood

[VQC](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.algorithms.VQC.html#qiskit_machine_learning.algorithms.VQC) has a `sampler` parameter > sampler (BaseSampler | None) – an optional Sampler primitive instance to be used by the underlying [SamplerQNN](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.SamplerQNN.html#qiskit_machine_learning.neural_networks.SamplerQNN) neural network. If None is passed then...

Its not a lot to go on. It should work. Maybe add your updated code here just in case. You can also look at the jobs in your account and...

> And 2nd and 4th results of this test are varied every time (1st and 3rd returns always the same) should all the results be the same? Fixing the simulator...

One aspect is the formatting of the code, the style is checked via `black` you need to run that on your code locally - see https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md#style-and-lint > lint: commands[0]> black...

It seems a test, that is a general test for equivalence, is picking up on your new "Gate" and failing. If you look that test has a exclusion list https://github.com/Qiskit/qiskit/blob/a7cc16624a719332b8ad5ab764425dca33f3952c/test/python/circuit/test_gate_definitions.py#L259...

If StatePreparation is excluded from that test it made sense to me that your new class probably should be too. Yes StatePreparation has num_qubits as optional and does that computation...

Its not failing the same way though ``` test.python.circuit.library.test_generalized_uniform_superposition_gate.TestGeneralizedUniformSuperposition.test_generalized_uniform_superposition_gate ------------------------------------------------------------------------------------------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/home/runner/work/qiskit/qiskit/test/python/circuit/library/test_generalized_uniform_superposition_gate.py", line 38, in test_generalized_uniform_superposition_gate gate = Generalized_Uniform_Superposition_Gate(M, n) File "/home/runner/work/qiskit/qiskit/qiskit/circuit/library/data_preparation/state_preparation.py",...

Looks like things are passing - except you need to run `black` on the code to make sure its formatted with that as presently the black check is failing saying...

Could you be using an older version of black? Maybe try updating it - CI will be using the latest version as I do not see any restriction in requirements_dev.txt...

Its just the one file now. You have the pyproject.toml file there from the qiskit root right - that limits line length to 100. I see lines in the docstring...